Merge PR #146 into 14.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2021-10-21 07:04:47 +00:00
2 changed files with 15 additions and 5 deletions

View File

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

View File

@@ -13,11 +13,20 @@
<field name="model">intrastat.transaction</field>
<field name="arch" type="xml">
<form string="Intrastat Transaction Type">
<group>
<field name="code" />
<field name="description" />
<field name="company_id" groups="base.group_multi_company" />
</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="description" />
<field name="company_id" groups="base.group_multi_company" />
</group>
</sheet>
</form>
</field>
</record>