[13.0][IMP] contract : show tags with colors in the contract

This commit is contained in:
chandni299
2022-07-27 13:52:30 +02:00
parent 8dc859db11
commit d951d9678e
3 changed files with 12 additions and 1 deletions

View File

@@ -13,3 +13,4 @@ class ContractTag(models.Model):
company_id = fields.Many2one(
"res.company", string="Company", default=lambda self: self.env.company.id,
)
color = fields.Integer("Color Index", default=0)

View File

@@ -139,7 +139,11 @@
required="1"
attrs="{'readonly': [('is_terminated','=',True)]}"
/>
<field name="tag_ids" widget="many2many_tags" />
<field
name="tag_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
/>
</group>
</group>
<group name="recurring_invoices">
@@ -527,6 +531,11 @@
<field name="code" />
<field name="journal_id" groups="account.group_account_user" />
<field name="partner_id" />
<field
name="tag_ids"
widget="many2many_tags"
options="{'color_field': 'color'}"
/>
<field name="active" invisible="1" />
<field name="company_id" groups="base.group_multi_company" />
</tree>

View File

@@ -8,6 +8,7 @@
<form>
<group>
<field name="name" />
<field name="color" />
<field
name="company_id"
options="{'no_create': True}"