[IMP] intrastat_product: Add active field to transactions.

TT30682
This commit is contained in:
Víctor Martínez
2021-09-22 09:40:20 +02:00
parent a701634c67
commit 01b8156a91
2 changed files with 15 additions and 5 deletions

View File

@@ -25,6 +25,7 @@ class IntrastatTransaction(models.Model):
string="Company", string="Company",
default=lambda self: self._default_company_id(), default=lambda self: self._default_company_id(),
) )
active = fields.Boolean(default=True)
@api.model @api.model
def _default_company_id(self): def _default_company_id(self):

View File

@@ -13,11 +13,20 @@
<field name="model">intrastat.transaction</field> <field name="model">intrastat.transaction</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Intrastat Transaction Type"> <form string="Intrastat Transaction Type">
<group> <sheet>
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<field name="active" invisible="1" />
<group name="main">
<field name="code" /> <field name="code" />
<field name="description" /> <field name="description" />
<field name="company_id" groups="base.group_multi_company" /> <field name="company_id" groups="base.group_multi_company" />
</group> </group>
</sheet>
</form> </form>
</field> </field>
</record> </record>