summaryrefslogtreecommitdiff
path: root/addons/account_analytic_default/views/account_analytic_default_view.xml
diff options
context:
space:
mode:
authorXavier Bol (xbo) <xbo@odoo.com>2019-11-20 12:54:35 +0000
committerYannick Tivisse <yti@odoo.com>2020-01-21 09:22:46 +0000
commit51b36c3dbbce04ba6d459c8890f82ac3fdbd91bd (patch)
tree5ba445b8a98a0c6084904d0827d500a2dfc333c4 /addons/account_analytic_default/views/account_analytic_default_view.xml
parentbe01db2f712952a6c1d3688c8587d9624ef5dcc5 (diff)
[IMP] base: add default image for users + placeholder if unassigned
1/ When the new database is created without demo data, the admin has a 'silhouette' as a default picture. When a new user is created without picture given by the current user, the new user will have a 'silhouette' as a default profile picture. 2/ web: image for fa-user-slash. This image will be used when a record is unassigned. 3/ web, *: Change placeholder by default when record is unassigned. We want to have a fa-user-slash icon when a record is unassigned instead of 'placeholder.png'. A method is created in the BaseModel to have a generic method to change easily the placeholder for other models. 4/ Adapt kanban test to keep the same behaviour. Attention the behaviour is a bit different. Because, now the default image is given by the server to change easily the default image when a record doesn't have an image. Thus, we don't say if it's the default placeholder, but we can say it's not the same image of the record (in this test, the record, it's the partner). 5/ misc: display 'Unassigned' in the hover on kanban cards if record is unassigned closes odoo/odoo#41356 Taskid: 2060206 Related: odoo/enterprise#7758 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Co-authored-by: jdoutreloux <jud@odoo.com> Co-authored-by: Yannick Tivisse <yti@odoo.com>
Diffstat (limited to 'addons/account_analytic_default/views/account_analytic_default_view.xml')
-rw-r--r--addons/account_analytic_default/views/account_analytic_default_view.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/account_analytic_default/views/account_analytic_default_view.xml b/addons/account_analytic_default/views/account_analytic_default_view.xml
index 805ec5250ca..bddeeaf80eb 100644
--- a/addons/account_analytic_default/views/account_analytic_default_view.xml
+++ b/addons/account_analytic_default/views/account_analytic_default_view.xml
@@ -59,7 +59,8 @@
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div>
<strong><span><field name="analytic_id"/></span></strong>
- <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
+ <t t-set="unassigned"><t t-esc="_t('Unassigned')"/></t>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value || unassigned" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
<div t-if="record.date_start.value"><i class="fa fa-calendar"></i> From <field name="date_start"/> <t t-if="record.date_stop.value">to <field name="date_stop"/></t></div>
<div t-if="record.product_id.value"><strong>Product</strong> <field name="product_id"/> </div>