summaryrefslogtreecommitdiff
path: root/addons/sales_team
diff options
context:
space:
mode:
authorvho <vho@odoo.com>2020-03-12 10:35:49 +0000
committerThibault Delavallée <tde@odoo.com>2020-04-30 08:29:57 +0000
commitcb55b302936010d97eca988c68d8167c8c4360b1 (patch)
tree087733283dfe3d63bc2acdc4d1493c3d49ecf8de /addons/sales_team
parent776d63e5a40fd48aaedb55eb8abfe04aee706688 (diff)
[IMP] sales_team, web: add and improve color widget to improve UX on crm.tag
The color picker help the user to choose a color instead of picking it by id. The title and arial-label "no-color" default value are removed from the picker_preview because they are not accurate. Instead name of currently set color is used. Task ID 2128166 closes odoo/odoo#47474 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/sales_team')
-rw-r--r--addons/sales_team/models/crm_tag.py2
-rw-r--r--addons/sales_team/views/crm_tag_views.xml2
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/sales_team/models/crm_tag.py b/addons/sales_team/models/crm_tag.py
index 205a7ada165..29d0c696202 100644
--- a/addons/sales_team/models/crm_tag.py
+++ b/addons/sales_team/models/crm_tag.py
@@ -14,7 +14,7 @@ class Tag(models.Model):
return randint(1, 11)
name = fields.Char('Tag Name', required=True, translate=True)
- color = fields.Integer('Color Index', default=_get_default_color)
+ color = fields.Integer('Color', default=_get_default_color)
_sql_constraints = [
('name_uniq', 'unique (name)', "Tag name already exists !"),
diff --git a/addons/sales_team/views/crm_tag_views.xml b/addons/sales_team/views/crm_tag_views.xml
index 9862f7637da..e886cf77a9c 100644
--- a/addons/sales_team/views/crm_tag_views.xml
+++ b/addons/sales_team/views/crm_tag_views.xml
@@ -33,7 +33,7 @@
<field name="arch" type="xml">
<tree string="Tags" editable="bottom">
<field name="name"/>
- <field name="color" groups="base.group_no_one"/>
+ <field name="color" widget="color_picker" />
</tree>
</field>
</record>