improve modul ReportIntrastatCode

develop
Andreas Osim 2022-10-04 12:48:52 +02:00
parent 0f518d433e
commit b4b39612af
2 changed files with 36 additions and 29 deletions

View File

@ -42,6 +42,9 @@ else:
class ReportIntrastatCode(models.Model):
_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.")

View File

@ -196,11 +196,15 @@
<field name="model">report.intrastat.code</field>
<field name="inherit_id" ref="report_intrastat.view_report_intrastat_code_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="default_order">name asc</attribute>
</xpath>
<field name="description" position="after">
<field name="active" string="Active"/>
</field>
</field>
</record>
<record id="view_report_intrastat_code_tz_form" model="ir.ui.view">
<field name="name">report.intrastat.code.tz_form</field>
<field name="model">report.intrastat.code</field>