[FIX] *: explicit color_field attribute for m2m_tags

Since the previous commit, the `color_field` needs to be explicitly stated
in the options for the tags to be colored.

The previous behaviour (always read the field `color`) was leading to server
warnings if the field was not present on the comodel.

Thìs commit set the `color_field´ for every many2many_tags on fields that have
a `color` field on the comodel.
This commit is contained in:
Martin Geubelle
2017-07-07 13:40:50 +02:00
parent e26ccdd0b6
commit a29f7f671b
30 changed files with 59 additions and 59 deletions
@@ -268,13 +268,13 @@
domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other'), ('deprecated', '=', False)]"/> domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other'), ('deprecated', '=', False)]"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting" <field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('company_id', '=', parent.company_id)]"/> domain="[('company_id', '=', parent.company_id)]"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/> <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="quantity"/> <field name="quantity"/>
<field name="uom_id" groups="product.group_uom"/> <field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/> <field name="discount" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" context="{'type':parent.type}" <field name="invoice_line_tax_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" context="{'type':parent.type}"
domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]" options="{'no_create': True}"/> domain="[('type_tax_use','=','purchase'),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/> <field name="price_subtotal"/>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
</tree> </tree>
@@ -404,13 +404,13 @@
domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other')]"/> domain="[('company_id', '=', parent.company_id), ('internal_type', '=', 'other')]"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting" <field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('company_id', '=', parent.company_id)]"/> domain="[('company_id', '=', parent.company_id)]"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/> <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="quantity"/> <field name="quantity"/>
<field name="uom_id" groups="product.group_uom"/> <field name="uom_id" groups="product.group_uom"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="discount" groups="base.group_no_one"/> <field name="discount" groups="base.group_no_one"/>
<field name="invoice_line_tax_ids" widget="many2many_tags" context="{'type':parent.type}" <field name="invoice_line_tax_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" context="{'type':parent.type}"
domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]" options="{'no_create': True}"/> domain="[('type_tax_use','=','sale'),('company_id', '=', parent.company_id)]"/>
<field name="price_subtotal"/> <field name="price_subtotal"/>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
</tree> </tree>
+4 -4
View File
@@ -261,8 +261,8 @@
<group> <group>
<group string="Control-Access" groups="base.group_no_one"> <group string="Control-Access" groups="base.group_no_one">
<div class="text-muted" colspan="2">Keep empty for no control</div> <div class="text-muted" colspan="2">Keep empty for no control</div>
<field name="type_control_ids" widget="many2many_tags"/> <field name="type_control_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="account_control_ids" widget="many2many_tags"/> <field name="account_control_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
<group string="Miscellaneous"> <group string="Miscellaneous">
<field name="inbound_payment_method_ids" widget="many2many_checkboxes" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/> <field name="inbound_payment_method_ids" widget="many2many_checkboxes" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
@@ -1892,8 +1892,8 @@
<field name="name"/> <field name="name"/>
<field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/> <field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
<field name="lst_price"/> <field name="lst_price"/>
<field name="taxes_id" widget="many2many_tags"/> <field name="taxes_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="supplier_taxes_id" widget="many2many_tags"/> <field name="supplier_taxes_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
</tree> </tree>
</field> </field>
</record> </record>
+2 -2
View File
@@ -14,13 +14,13 @@
<field name="property_account_income_id" <field name="property_account_income_id"
domain="[('internal_type','=','other'),('deprecated','=',False)]" domain="[('internal_type','=','other'),('deprecated','=',False)]"
groups="account.group_account_user"/> groups="account.group_account_user"/>
<field name="taxes_id" widget="many2many_tags"/> <field name="taxes_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
<group> <group>
<field name="property_account_expense_id" <field name="property_account_expense_id"
domain="[('internal_type','=','other'),('deprecated','=',False)]" domain="[('internal_type','=','other'),('deprecated','=',False)]"
groups="account.group_account_user"/> groups="account.group_account_user"/>
<field name="supplier_taxes_id" widget="many2many_tags"/> <field name="supplier_taxes_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
</group> </group>
<group name="accounting"/> <group name="accounting"/>
@@ -253,7 +253,7 @@
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/> <field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
<field name="quantity"/> <field name="quantity"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="tax_ids" widget="many2many_tags" domain="[('type_tax_use','=','sale')]"/> <field name="tax_ids" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use','=','sale')]"/>
<field name="price_subtotal"/> <field name="price_subtotal"/>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
<field name="company_id" invisible="1"/> <field name="company_id" invisible="1"/>
@@ -369,7 +369,7 @@
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/> <field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
<field name="quantity"/> <field name="quantity"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="tax_ids" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]"/> <field name="tax_ids" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use','=','purchase')]"/>
<field name="price_subtotal"/> <field name="price_subtotal"/>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
<field name="company_id" invisible="1"/> <field name="company_id" invisible="1"/>
+2 -2
View File
@@ -94,7 +94,7 @@
</group> </group>
<group> <group>
<field name="priority" widget="priority"/> <field name="priority" widget="priority"/>
<field name="tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
</group> </group>
</group> </group>
<notebook> <notebook>
@@ -442,7 +442,7 @@
</group> </group>
<group> <group>
<field name="priority" widget="priority"/> <field name="priority" widget="priority"/>
<field name="tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
<field name="lost_reason" attrs="{'invisible': [('active', '=', True)]}"/> <field name="lost_reason" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="date_conversion" invisible="1"/> <field name="date_conversion" invisible="1"/>
</group> </group>
+2 -2
View File
@@ -107,8 +107,8 @@
</group> </group>
<group> <group>
<group> <group>
<field name="country_ids" widget="many2many_tags"/> <field name="country_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="state_ids" widget="many2many_tags"/> <field name="state_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
<group></group> <group></group>
<group> <group>
+1 -1
View File
@@ -66,7 +66,7 @@
<field name="license_plate" class="oe_inline" placeholder="e.g. PAE 326"/> <field name="license_plate" class="oe_inline" placeholder="e.g. PAE 326"/>
</h2> </h2>
<label for="tag_ids" class="oe_edit_only"/> <label for="tag_ids" class="oe_edit_only"/>
<field name="tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
</div> </div>
<group col="2" string="General Properties"> <group col="2" string="General Properties">
<group > <group >
+1 -1
View File
@@ -52,7 +52,7 @@
<field name="name" placeholder="Employee's Name"/> <field name="name" placeholder="Employee's Name"/>
</h1> </h1>
</div> </div>
<field name="category_ids" widget="many2many_tags" placeholder="e.g. Part Time" options="{'no_create_edit': True}" groups="hr.group_hr_user"/> <field name="category_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="e.g. Part Time" groups="hr.group_hr_user"/>
<notebook> <notebook>
<page name="public" string="Work Information"> <page name="public" string="Work Information">
<group> <group>
+2 -2
View File
@@ -299,7 +299,7 @@
</group> </group>
<group string="Accounting"> <group string="Accounting">
<field name="property_account_expense_id"/> <field name="property_account_expense_id"/>
<field name="supplier_taxes_id" widget="many2many_tags"/> <field name="supplier_taxes_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
</group> </group>
</sheet> </sheet>
@@ -464,7 +464,7 @@
<field name="message_unread" invisible="1"/> <field name="message_unread" invisible="1"/>
<field name="attachment_number" string=" "/> <field name="attachment_number" string=" "/>
<button name="action_get_attachment_view" string="View Attachments" type="object" icon="fa-paperclip"/> <button name="action_get_attachment_view" string="View Attachments" type="object" icon="fa-paperclip"/>
<field name="tax_ids" widget="many2many_tags"/> <field name="tax_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="total_amount" sum="Total Amount" widget="monetary"/> <field name="total_amount" sum="Total Amount" widget="monetary"/>
</tree> </tree>
</field> </field>
@@ -112,7 +112,7 @@
</div> </div>
<div> <div>
<label for="categ_ids" class="oe_edit_only"/> <label for="categ_ids" class="oe_edit_only"/>
<field name="categ_ids" widget="many2many_tags" options="{'no_create_edit': True}"/> <field name="categ_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
</div> </div>
</h2> </h2>
</div> </div>
@@ -674,7 +674,7 @@
</div> </div>
<group> <group>
<group> <group>
<field name="member_ids" widget="many2many_tags"/> <field name="member_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
</group> </group>
</sheet> </sheet>
@@ -355,7 +355,7 @@
context="{'search_default_not_opt_out':1}"/> context="{'search_default_not_opt_out':1}"/>
<div attrs="{'invisible': [('mailing_model', '!=', 'mail.mass_mailing.list')]}"> <div attrs="{'invisible': [('mailing_model', '!=', 'mail.mass_mailing.list')]}">
<label for="contact_list_ids" string="Select mailing lists:" class="oe_edit_only"/> <label for="contact_list_ids" string="Select mailing lists:" class="oe_edit_only"/>
<field name="contact_list_ids" widget="many2many_tags" <field name="contact_list_ids" widget="many2many_tags" options="{'color_field': 'color'}"
placeholder="Select mailing lists..." class="oe_inline"/> placeholder="Select mailing lists..." class="oe_inline"/>
</div> </div>
</div> </div>
@@ -690,7 +690,7 @@
<group> <group>
<field name="name" string="Campaign Name"/> <field name="name" string="Campaign Name"/>
<field name="user_id"/> <field name="user_id"/>
<field name="tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
<field name="unique_ab_testing" groups="base.group_no_one"/> <field name="unique_ab_testing" groups="base.group_no_one"/>
</group> </group>
<notebook> <notebook>
+1 -1
View File
@@ -68,7 +68,7 @@
<field name="list_price" string="Membership Fee"/> <field name="list_price" string="Membership Fee"/>
<field <field
name="property_account_income_id"/> name="property_account_income_id"/>
<field name="taxes_id" widget="many2many_tags" string="Taxes"/> <field name="taxes_id" widget="many2many_tags" options="{'color_field': 'color'}" string="Taxes"/>
</group> </group>
</group> </group>
<label for="description"/> <label for="description"/>
+1 -1
View File
@@ -47,7 +47,7 @@
<button name="action_see_attachments" type="object" icon="fa-file" attrs="{'invisible': [('has_attachments', '=', True)]}"/> <button name="action_see_attachments" type="object" icon="fa-file" attrs="{'invisible': [('has_attachments', '=', True)]}"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/> <field name="product_uom_id" options="{'no_open':True,'no_create':True}" groups="product.group_uom"/>
<field name="attribute_value_ids" widget="many2many_tags" domain="[('product_ids.product_tmpl_id', '=', parent.product_tmpl_id)]" options="{'no_create':True}" groups="product.group_product_variant"/> <field name="attribute_value_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('product_ids.product_tmpl_id', '=', parent.product_tmpl_id)]" groups="product.group_product_variant"/>
<field name="operation_id" groups="mrp.group_mrp_routings" domain="[('routing_id', '=', parent.routing_id)]" options="{'no_quick_create':True,'no_create_edit':True}"/> <field name="operation_id" groups="mrp.group_mrp_routings" domain="[('routing_id', '=', parent.routing_id)]" options="{'no_quick_create':True,'no_create_edit':True}"/>
</tree> </tree>
</field> </field>
+4 -4
View File
@@ -89,7 +89,7 @@
</div> </div>
<field name="type" invisible="1"/> <field name="type" invisible="1"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale')]"/> <field name="tax_id" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use','=','sale')]"/>
<field name="invoiced" invisible="1"/> <field name="invoiced" invisible="1"/>
<field name="price_subtotal" widget="monetary" invisible="1"/> <field name="price_subtotal" widget="monetary" invisible="1"/>
</group> </group>
@@ -117,7 +117,7 @@
<field name="product_uom_qty" string="Quantity"/> <field name="product_uom_qty" string="Quantity"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/> <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="tax_id" widget="many2many_tags"/> <field name="tax_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="price_subtotal" widget="monetary"/> <field name="price_subtotal" widget="monetary"/>
</tree> </tree>
</field> </field>
@@ -146,7 +146,7 @@
<field name="product_uom" groups="product.group_uom"/> <field name="product_uom" groups="product.group_uom"/>
</div> </div>
<field name="price_unit"/> <field name="price_unit"/>
<field widget="many2many_tags" name="tax_id" domain="[('type_tax_use','=','sale')]"/> <field widget="many2many_tags" options="{'color_field': 'color'}" name="tax_id" domain="[('type_tax_use','=','sale')]"/>
<field name="price_subtotal" widget="monetary" invisible="1"/> <field name="price_subtotal" widget="monetary" invisible="1"/>
</group> </group>
</form> </form>
@@ -156,7 +156,7 @@
<field name="product_uom_qty" string="Quantity"/> <field name="product_uom_qty" string="Quantity"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/> <field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="tax_id" domain="[('type_tax_use', '=', 'sale')]" widget="many2many_tags"/> <field name="tax_id" domain="[('type_tax_use', '=', 'sale')]" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="price_subtotal" widget="monetary"/> <field name="price_subtotal" widget="monetary"/>
</tree> </tree>
</field> </field>
+2 -2
View File
@@ -143,7 +143,7 @@
<field name="name"/> <field name="name"/>
<field name="open"/> <field name="open"/>
<field name="stage_id"/> <field name="stage_id"/>
<field name="tag_ids" widget="many2many_tags"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</tree> </tree>
</field> </field>
</record> </record>
@@ -158,7 +158,7 @@
<field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/> <field name="stage_id" domain="[('user_id','=',uid)]" widget="statusbar" clickable="1"/>
</header> </header>
<sheet> <sheet>
<field name="tag_ids" widget="many2many_tags" placeholder="Tags"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" placeholder="Tags"/>
<field name="memo" widget="html" class="oe_memo" editor_height="450px" /> <field name="memo" widget="html" class="oe_memo" editor_height="450px" />
</sheet> </sheet>
<div class="oe_chatter"> <div class="oe_chatter">
@@ -37,8 +37,8 @@
<field name="qty"/> <field name="qty"/>
<field name="price_unit" widget="monetary"/> <field name="price_unit" widget="monetary"/>
<field name="discount" widget="monetary"/> <field name="discount" widget="monetary"/>
<field name="tax_ids_after_fiscal_position" widget="many2many_tags"/> <field name="tax_ids_after_fiscal_position" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="tax_ids" widget="many2many_tags" invisible="1"/> <field name="tax_ids" widget="many2many_tags" options="{'color_field': 'color'}" invisible="1"/>
<field name="price_subtotal" widget="monetary"/> <field name="price_subtotal" widget="monetary"/>
<field name="price_subtotal_incl" widget="monetary"/> <field name="price_subtotal_incl" widget="monetary"/>
</tree> </tree>
@@ -50,8 +50,8 @@
<field name="price_unit" widget="monetary"/> <field name="price_unit" widget="monetary"/>
<field name="price_subtotal" invisible="1" widget="monetary"/> <field name="price_subtotal" invisible="1" widget="monetary"/>
<field name="price_subtotal_incl" invisible="1" widget="monetary"/> <field name="price_subtotal_incl" invisible="1" widget="monetary"/>
<field name="tax_ids_after_fiscal_position" widget="many2many_tags"/> <field name="tax_ids_after_fiscal_position" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="tax_ids" widget="many2many_tags" invisible="1"/> <field name="tax_ids" widget="many2many_tags" options="{'color_field': 'color'}" invisible="1"/>
<field name="notice"/> <field name="notice"/>
</group> </group>
</form> </form>
+1 -1
View File
@@ -378,7 +378,7 @@ action = model.activate_sample_project()
</group> </group>
<group> <group>
<field name="date_deadline"/> <field name="date_deadline"/>
<field name="tag_ids" widget="many2many_tags" options="{'no_create_edit': True}"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
</group> </group>
</group> </group>
<notebook> <notebook>
@@ -25,7 +25,7 @@
<group> <group>
<field name="user_id"/> <field name="user_id"/>
<field name="priority" groups="base.group_user" widget="priority"/> <field name="priority" groups="base.group_user" widget="priority"/>
<field name="tag_ids" widget="many2many_tags"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
<group> <group>
<field name="partner_id"/> <field name="partner_id"/>
+4 -4
View File
@@ -218,13 +218,13 @@
<field name="date_planned"/> <field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/> <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="account_analytic_id" context="{'default_partner_id':parent.partner_id}" groups="purchase.group_analytic_accounting"/> <field name="account_analytic_id" context="{'default_partner_id':parent.partner_id}" groups="purchase.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="purchase.group_analytic_accounting" widget="many2many_tags"/> <field name="analytic_tag_ids" groups="purchase.group_analytic_accounting" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="product_qty"/> <field name="product_qty"/>
<field name="qty_received" invisible="not context.get('show_purchase', False)"/> <field name="qty_received" invisible="not context.get('show_purchase', False)"/>
<field name="qty_invoiced" invisible="not context.get('show_purchase', False)"/> <field name="qty_invoiced" invisible="not context.get('show_purchase', False)"/>
<field name="product_uom" groups="product.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}"/> <field name="product_uom" groups="product.group_uom" attrs="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))]}"/>
<field name="price_unit"/> <field name="price_unit"/>
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase'}"/> <field name="taxes_id" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use','=','purchase')]" context="{'default_type_tax_use': 'purchase'}"/>
<field name="price_subtotal" widget="monetary"/> <field name="price_subtotal" widget="monetary"/>
</tree> </tree>
<form string="Purchase Order Line"> <form string="Purchase Order Line">
@@ -242,7 +242,7 @@
<field name="price_unit"/> <field name="price_unit"/>
</group> </group>
<group> <group>
<field name="taxes_id" widget="many2many_tags" domain="[('type_tax_use', '=', 'purchase')]"/> <field name="taxes_id" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use', '=', 'purchase')]"/>
<field name="date_planned" widget="date"/> <field name="date_planned" widget="date"/>
<field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/> <field name="account_analytic_id" colspan="2" groups="purchase.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/> <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
@@ -609,7 +609,7 @@
<field name="property_account_expense_id" domain="[('deprecated','=',False)]" attrs="{'readonly': [('purchase_ok', '=', 0)]}" groups="account.group_account_user"/> <field name="property_account_expense_id" domain="[('deprecated','=',False)]" attrs="{'readonly': [('purchase_ok', '=', 0)]}" groups="account.group_account_user"/>
</field> </field>
<field name='supplier_taxes_id' position="replace" > <field name='supplier_taxes_id' position="replace" >
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/> <field name="supplier_taxes_id" colspan="2" widget="many2many_tags" options="{'color_field': 'color'}" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
</field> </field>
</field> </field>
</record> </record>
+4 -4
View File
@@ -237,7 +237,7 @@
</div> </div>
</group> </group>
<group> <group>
<field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]" <field name="tax_id" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/> attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/>
<label for="customer_lead"/> <label for="customer_lead"/>
<div> <div>
@@ -245,7 +245,7 @@
</div> </div>
<label for="analytic_tag_ids"/> <label for="analytic_tag_ids"/>
<div> <div>
<field name="analytic_tag_ids" widget="many2many_tags"/> <field name="analytic_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</div> </div>
</group> </group>
</group> </group>
@@ -278,10 +278,10 @@
attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}" attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}"
context="{'company_id': parent.company_id}" context="{'company_id': parent.company_id}"
groups="product.group_uom" options='{"no_open": True}'/> groups="product.group_uom" options='{"no_open": True}'/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags"/> <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="price_unit" <field name="price_unit"
attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/> attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/>
<field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]" <field name="tax_id" widget="many2many_tags" options="{'color_field': 'color'}" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]"
attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/> attrs="{'readonly': [('qty_invoiced', '&gt;', 0)]}"/>
<field name="discount" groups="sale.group_discount_per_so_line"/> <field name="discount" groups="sale.group_discount_per_so_line"/>
<field name="price_subtotal" widget="monetary" groups="sale.group_show_price_subtotal"/> <field name="price_subtotal" widget="monetary" groups="sale.group_show_price_subtotal"/>
+1 -1
View File
@@ -128,7 +128,7 @@
<group name="inventory"> <group name="inventory">
<group> <group>
<field name="route_ids" widget="many2many_checkboxes" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}"/> <field name="route_ids" widget="many2many_checkboxes" attrs="{'invisible':[('type', 'in', ['service', 'digital'])]}"/>
<field name="route_from_categ_ids" widget="many2many_tags" readonly="1" attrs="{'invisible':[('route_from_categ_ids', '=', [])]}"/> <field name="route_from_categ_ids" widget="many2many_tags" options="{'color_field': 'color'}" readonly="1" attrs="{'invisible':[('route_from_categ_ids', '=', [])]}"/>
</group> </group>
<group name="group_lots_and_weight"> <group name="group_lots_and_weight">
<label for="weight" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"/> <label for="weight" attrs="{'invisible':[('type', 'not in', ['product', 'consu'])]}"/>
@@ -7,7 +7,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="//field[@name='company_id']" position="after"> <xpath expr="//field[@name='company_id']" position="after">
<field name="website_tag_ids" widget="many2many_tags" string="Website Tags"/> <field name="website_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" string="Website Tags"/>
</xpath> </xpath>
</data> </data>
</field> </field>
@@ -147,7 +147,7 @@
<field name="duration" class="oe_inline" widget="float_time"/> hours <field name="duration" class="oe_inline" widget="float_time"/> hours
</div> </div>
<field name="location_id"/> <field name="location_id"/>
<field name="tag_ids" widget="many2many_tags"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
</group> </group>
</sheet> </sheet>
+1 -1
View File
@@ -159,7 +159,7 @@
<field name="forum_id"/> <field name="forum_id"/>
<field name="parent_id"/> <field name="parent_id"/>
</group><group> </group><group>
<field name="tag_ids" widget="many2many_tags"/> <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="state"/> <field name="state"/>
<field name="closed_reason_id"/> <field name="closed_reason_id"/>
<field name="closed_uid"/> <field name="closed_uid"/>
+2 -2
View File
@@ -70,8 +70,8 @@
<group name="website" string="Website" > <group name="website" string="Website" >
<field name="website_url" invisible="1"/> <field name="website_url" invisible="1"/>
<field name="public_categ_ids" widget="many2many_tags" string="Website Categories"/> <field name="public_categ_ids" widget="many2many_tags" string="Website Categories"/>
<field name="alternative_product_ids" widget="many2many_tags"/> <field name="alternative_product_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="accessory_product_ids" widget="many2many_tags"/> <field name="accessory_product_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<field name="availability" widget="selection"/> <field name="availability" widget="selection"/>
<field name="availability_warning" attrs="{'invisible': [('availability', '!=', 'warning')]}"/> <field name="availability_warning" attrs="{'invisible': [('availability', '!=', 'warning')]}"/>
<field name="website_style_ids" widget="many2many_tags" groups="base.group_no_one"/> <field name="website_style_ids" widget="many2many_tags" groups="base.group_no_one"/>
@@ -7,7 +7,7 @@
<field name="inherit_id" ref="website_sale.product_template_form_view"/> <field name="inherit_id" ref="website_sale.product_template_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="accessory_product_ids" position="after"> <field name="accessory_product_ids" position="after">
<field name="optional_product_ids" widget="many2many_tags"/> <field name="optional_product_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
</field> </field>
</field> </field>
</record> </record>
+1 -1
View File
@@ -181,7 +181,7 @@
</div> </div>
<field name="vat" placeholder="e.g. BE0477472701"/> <field name="vat" placeholder="e.g. BE0477472701"/>
<field name="website" widget="url" placeholder="e.g. www.odoo.com"/> <field name="website" widget="url" placeholder="e.g. www.odoo.com"/>
<field name="category_id" widget="many2many_tags" placeholder="Tags..." options="{'no_create_edit': True}"/> <field name="category_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Tags..."/>
</group> </group>
<group> <group>
<field name="function" placeholder="e.g. Sales Director" <field name="function" placeholder="e.g. Sales Director"
+1 -1
View File
@@ -155,7 +155,7 @@
<label for="groups_id" string="Access Rights" <label for="groups_id" string="Access Rights"
attrs="{'invisible': [('id', '>', 0)]}" groups="base.group_no_one"/> attrs="{'invisible': [('id', '>', 0)]}" groups="base.group_no_one"/>
<div attrs="{'invisible': [('id', '>', 0)]}" groups="base.group_no_one"> <div attrs="{'invisible': [('id', '>', 0)]}" groups="base.group_no_one">
<field name="groups_id" readonly="1" widget="many2many_tags" style="display: inline;"/> You will be able to define additional access rights by editing the newly created user under the Settings / Users menu. <field name="groups_id" readonly="1" widget="many2many_tags" options="{'color_field': 'color'}" style="display: inline;"/> You will be able to define additional access rights by editing the newly created user under the Settings / Users menu.
</div> </div>
<field name="phone" widget="phone"/> <field name="phone" widget="phone"/>
<field name="mobile" widget="phone"/> <field name="mobile" widget="phone"/>
+2 -2
View File
@@ -47,7 +47,7 @@
<!-- <!--
Bug if the view contains at least 5 fields. Bug if the view contains at least 5 fields.
The order of the dic values changes and the _check_author constraint raise. The order of the dic values changes and the _check_author constraint raise.
<field name="categories" widget="many2many_tags"/> <field name="categories" widget="many2many_tags" options="{'color_field': 'color'}"/>
--> -->
<field name="moderator"/> <field name="moderator"/>
</group> </group>
@@ -118,7 +118,7 @@
<sheet> <sheet>
<group> <group>
<field name="name"/> <field name="name"/>
<field name="categories" widget="many2many_tags"/> <field name="categories" widget="many2many_tags" options="{'color_field': 'color'}"/>
</group> </group>
<notebook> <notebook>
<page string="Messages"> <page string="Messages">