[FIX] *: add color option on m2m_tags widgets in kanban
There is a bit of magic in the kanban with many2many: the widget many2many_tags is automatically set on many2many fields. Since the previous commit, the `color_field` needs to be explicitly stated in the options for the tags to be colored. In kanban views where tags were previously colored, we thus have specified the widget and the color option.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[contains(@class, 'oe_kanban_partner_categories')]" position="inside">
|
||||
<span class="oe_kanban_list_many2many">
|
||||
<field name="category_id"/>
|
||||
<field name="category_id" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
</span>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -247,7 +247,6 @@
|
||||
<field name="user_id"/>
|
||||
<field name="partner_address_email"/>
|
||||
<field name="message_needaction_counter"/>
|
||||
<field name="tag_ids"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="activity_summary"/>
|
||||
<field name="active"/>
|
||||
@@ -273,7 +272,7 @@
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<div>
|
||||
<field name="tag_ids"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong><field name="name"/></strong>
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<div class="o_kanban_tags_section">
|
||||
<field name="tag_ids"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
</div>
|
||||
<div class="o_kanban_image">
|
||||
<img t-att-src="kanban_image('fleet.vehicle', 'image_small', record.id.value)"/>
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<field name="category_ids"/>
|
||||
<field name="category_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<div class="o_kanban_image">
|
||||
<img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)"/>
|
||||
<div class="o_employee_summary_icons">
|
||||
|
||||
@@ -255,7 +255,6 @@
|
||||
<field name="type_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="categ_ids"/>
|
||||
<field name="message_needaction_counter"/>
|
||||
<field name="attachment_number"/>
|
||||
<field name="active"/>
|
||||
@@ -283,7 +282,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_content" tooltip="kanban-tooltip">
|
||||
<field name="categ_ids"/>
|
||||
<field name="categ_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<b t-if="record.partner_name.raw_value">
|
||||
<field name="partner_name"/>
|
||||
</b><t t-else="1">
|
||||
|
||||
@@ -749,11 +749,11 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<div>
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)"
|
||||
t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
|
||||
<h3 class="oe_margin_bottom_8"><field name="name"/></h3>
|
||||
<field name="tag_ids"/>
|
||||
<a name="%(action_view_mass_mailings_from_campaign)d" type="action"
|
||||
class="oe_mailings">
|
||||
<h4 class="oe_margin_top_8"><t t-raw="record.mass_mailing_ids.raw_value.length"/> Mailings</h4>
|
||||
|
||||
@@ -87,7 +87,6 @@
|
||||
<field name="memo"/>
|
||||
<field name="date_done"/>
|
||||
<field name="message_partner_ids"/>
|
||||
<field name="tag_ids"/>
|
||||
<field name="activity_ids" />
|
||||
<field name="activity_state" />
|
||||
<templates>
|
||||
@@ -95,7 +94,7 @@
|
||||
|
||||
<div t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_global_click_edit oe_semantic_html_override oe_kanban_card">
|
||||
|
||||
<field name="tag_ids"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
|
||||
<div class="o_dropdown_kanban dropdown">
|
||||
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#" >
|
||||
|
||||
@@ -427,7 +427,6 @@ action = model.activate_sample_project()
|
||||
<field name="remaining_hours" groups="project.group_time_work_estimation_tasks"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="message_needaction_counter"/>
|
||||
<field name="tag_ids"/>
|
||||
<field name="attachment_ids"/>
|
||||
<field name="displayed_image_id"/>
|
||||
<field name="active"/>
|
||||
@@ -453,7 +452,7 @@ action = model.activate_sample_project()
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<div>
|
||||
<field name="tag_ids"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
</div>
|
||||
<div>
|
||||
<strong><field name="name"/></strong>
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_content" tooltip="kanban-tooltip">
|
||||
<field name="tag_ids"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<div>
|
||||
<b><field name="name"/></b> <br/>
|
||||
<field name="partner_id"/> <br/>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<field name="tag_ids"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
|
||||
<h4><field name="name"/></h4>
|
||||
<div>
|
||||
<t t-if="duration"><field name="duration" widget="float_time"/> hours</t>
|
||||
|
||||
Reference in New Issue
Block a user