improve modul ReportIntrastatCode
parent
0f518d433e
commit
b4b39612af
|
|
@ -42,6 +42,9 @@ else:
|
||||||
class ReportIntrastatCode(models.Model):
|
class ReportIntrastatCode(models.Model):
|
||||||
_inherit = "report.intrastat.code"
|
_inherit = "report.intrastat.code"
|
||||||
|
|
||||||
|
_sql_constraints = [
|
||||||
|
('name_uniq', 'unique(name)', 'Der Intrastat-Code muss eindeutig sein'),
|
||||||
|
]
|
||||||
active = fields.Boolean(string='Active', default=True, help="If unchecked, it will allow you to hide the code without removing it.")
|
active = fields.Boolean(string='Active', default=True, help="If unchecked, it will allow you to hide the code without removing it.")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,40 +190,44 @@
|
||||||
action="product_xcategory_action"/>
|
action="product_xcategory_action"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- Intrastat code -->
|
<!-- Intrastat code -->
|
||||||
<record id="view_report_intrastat_code_tz_tree" model="ir.ui.view">
|
<record id="view_report_intrastat_code_tz_tree" model="ir.ui.view">
|
||||||
<field name="name">report.intrastat.code.tz_tree</field>
|
<field name="name">report.intrastat.code.tz_tree</field>
|
||||||
<field name="model">report.intrastat.code</field>
|
<field name="model">report.intrastat.code</field>
|
||||||
<field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_tree"/>
|
<field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<field name="description" position="after">
|
<xpath expr="//tree" position="attributes">
|
||||||
<field name="active" string="Active"/>
|
<attribute name="default_order">name asc</attribute>
|
||||||
</field>
|
</xpath>
|
||||||
|
<field name="description" position="after">
|
||||||
|
<field name="active" string="Active"/>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</field>
|
||||||
<record id="view_report_intrastat_code_tz_form" model="ir.ui.view">
|
</record>
|
||||||
<field name="name">report.intrastat.code.tz_form</field>
|
|
||||||
<field name="model">report.intrastat.code</field>
|
<record id="view_report_intrastat_code_tz_form" model="ir.ui.view">
|
||||||
<field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_form"/>
|
<field name="name">report.intrastat.code.tz_form</field>
|
||||||
<field name="arch" type="xml">
|
<field name="model">report.intrastat.code</field>
|
||||||
|
<field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
<!-- class="oe_stat_button" icon="fa-archive" groups="sales_team.group_sale_manager"> -->
|
<!-- class="oe_stat_button" icon="fa-archive" groups="sales_team.group_sale_manager"> -->
|
||||||
<!--
|
<!--
|
||||||
<xpath expr="//form" position="attributes">
|
<xpath expr="//form" position="attributes">
|
||||||
<attribute name="delete">false</attribute>
|
<attribute name="delete">false</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
-->
|
-->
|
||||||
<xpath expr="//form" position="inside">
|
<xpath expr="//form" position="inside">
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
||||||
<field name="active" widget="boolean_button" options='{"terminology": "active"}'/>
|
<field name="active" widget="boolean_button" options='{"terminology": "active"}'/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<record id="view_report_intrastat_search_view" model="ir.ui.view">
|
<record id="view_report_intrastat_search_view" model="ir.ui.view">
|
||||||
<field name="name">report.intrastat.code.search</field>
|
<field name="name">report.intrastat.code.search</field>
|
||||||
<field name="model">report.intrastat.code</field>
|
<field name="model">report.intrastat.code</field>
|
||||||
<field name="context">{'filter_active': 1}</field>
|
<field name="context">{'filter_active': 1}</field>
|
||||||
|
|
@ -235,7 +239,7 @@
|
||||||
<filter string="All" name="all" domain="['|',('active','=',False),('active','=',True)]"/>
|
<filter string="All" name="all" domain="['|',('active','=',False),('active','=',True)]"/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue