mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
[IMP] intrastat_product: Add active field to transactions.
TT30682
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
@@ -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>
|
||||||
<field name="code" />
|
<widget
|
||||||
<field name="description" />
|
name="web_ribbon"
|
||||||
<field name="company_id" groups="base.group_multi_company" />
|
title="Archived"
|
||||||
</group>
|
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>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user