diff options
| author | Xavier Bol (xbo) <xbo@odoo.com> | 2019-11-20 12:54:35 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-01-21 09:22:46 +0000 |
| commit | 51b36c3dbbce04ba6d459c8890f82ac3fdbd91bd (patch) | |
| tree | 5ba445b8a98a0c6084904d0827d500a2dfc333c4 /addons/project/views/project_views.xml | |
| parent | be01db2f712952a6c1d3688c8587d9624ef5dcc5 (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/project/views/project_views.xml')
| -rw-r--r-- | addons/project/views/project_views.xml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index a42c64e6c05..47573ae7024 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -256,7 +256,8 @@ </div> <div class="col-4"> <div class="oe_kanban_bottom_right"> - <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> </div> @@ -660,7 +661,8 @@ </div> <div class="oe_kanban_bottom_right" t-if="!selection_mode"> <field name="kanban_state" widget="state_selection" groups="base.group_user" invisible="context.get('fsm_mode', False)"/> - <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"/> + <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"/> </div> </div> </div> |
