[MIG] project_assignees : migrate to 16.0

This commit is contained in:
Boris Gallet
2023-11-02 09:14:47 +01:00
parent e6595ec6f7
commit 15b21771dd
4 changed files with 29 additions and 25 deletions

View File

@@ -3,7 +3,7 @@
{ {
"name": "project_assignees", "name": "project_assignees",
"version": "14.0.1.1.0", "version": "16.0.1.1.0",
"author": "Elabore", "author": "Elabore",
"website": "https://github.com/elabore-coop/project-tools", "website": "https://github.com/elabore-coop/project-tools",
"maintainer": "Stéphan Sainléger", "maintainer": "Stéphan Sainléger",
@@ -69,6 +69,7 @@ This module is maintained by Elabore.
"depends": [ "depends": [
"base", "base",
"project", "project",
"project_task_portal_form",
], ],
"qweb": [ "qweb": [
# "static/src/xml/*.xml", # "static/src/xml/*.xml",

View File

@@ -4,10 +4,10 @@
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 14.0\n" "Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-07-26 07:38+0000\n" "POT-Creation-Date: 2023-11-02 07:56+0000\n"
"PO-Revision-Date: 2022-07-26 07:38+0000\n" "PO-Revision-Date: 2023-11-02 07:56+0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -16,17 +16,21 @@ msgstr ""
"Plural-Forms: \n" "Plural-Forms: \n"
#. module: project_assignees #. module: project_assignees
#: model_terms:ir.ui.view,arch_db:project_assignees.portal_my_task_timebox #: model_terms:ir.ui.view,arch_db:project_assignees.portal_my_task_assignees
msgid "<strong>Other assignements</strong>" msgid "<strong>Other assignees</strong>"
msgstr "<strong>Autres intervenants</strong>" msgstr "<strong>Autres intervenants</strong>"
#. module: project_assignees #. module: project_assignees
#: model:ir.model.fields,field_description:project_assignees.field_project_task__assignee_ids | #: model:ir.model.fields,field_description:project_assignees.field_project_task__assignee_ids
msgid "Assignees" | msgid "Assignees"
msgstr "Autres assignations" msgstr "Autres assignations"
#. module: project_assignees
#: model_terms:ir.ui.view,arch_db:project_assignees.portal_my_task_assignees
msgid "Contact"
msgstr ""
#. module: project_assignees #. module: project_assignees
#: model:ir.model,name:project_assignees.model_project_task #: model:ir.model,name:project_assignees.model_project_task
msgid "Task" msgid "Task"
msgstr "Tâche" msgstr "Tâche"

View File

@@ -1,21 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<template id="portal_my_task_assignees" name="My Task: Assignees" inherit_id="project.portal_my_task" priority="40"> <template id="portal_my_task_assignees" name="My Task: Assignees" inherit_id="project.portal_my_task" priority="40">
<xpath expr="//div[hasclass('flex-grow-0')]/../../.." position="inside"> <xpath expr="//t[@t-foreach='task.user_ids']" position="after">
<div class="col-12 col-md-6 pb-2" t-if="task.assignee_ids"> <div class="col-12 col-md-12 pb-2" t-if="task.assignee_ids">
<strong>Other assignees</strong> <strong>Other assignees</strong>
<div class="row"> <div class="row">
<t t-foreach="task.assignee_ids" t-as="assignee"> <t t-foreach="task.assignee_ids" t-as="user">
<div class="col flex-grow-0 pr-3"> <div class="d-flex mb-3 flex-nowrap">
<img t-if="assignee.image" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(assignee.image)" alt="Contact" /> <img class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(user.avatar_1024)" alt="Contact"/>
<img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact" /> <div class="ms-2">
<div t-esc="user" t-options='{"widget": "contact", "fields": ["name"]}'/>
<a t-attf-href="tel:{{user.phone}}" t-if="user.phone"><div t-esc="user" t-options='{"widget": "contact", "fields": ["phone"]}'/></a>
<a t-if="user.email" class="text-break" t-attf-href="mailto:{{user.email}}">
<div t-out="user" t-options='{"widget": "contact", "fields": ["email"]}'/>
</a>
</div> </div>
<div class="col pl-md-0">
<strong>
<span t-field="assignee.name" />
</strong>
<span t-field="assignee.email" />
<span t-field="assignee.phone" />
</div> </div>
</t> </t>
</div> </div>

View File

@@ -6,7 +6,7 @@
<field name="inherit_id" ref="project.view_task_form2" /> <field name="inherit_id" ref="project.view_task_form2" />
<field name="priority" eval="99" /> <field name="priority" eval="99" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="after"> <xpath expr="//field[@name='user_ids']" position="after">
<field name="assignee_ids" widget="many2many_tags" /> <field name="assignee_ids" widget="many2many_tags" />
</xpath> </xpath>
</field> </field>
@@ -19,7 +19,7 @@
<field name="priority" eval="99" /> <field name="priority" eval="99" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<filter name="my_tasks" position="attributes"> <filter name="my_tasks" position="attributes">
<attribute name="domain">['|', ('user_id', '=', uid), ('assignee_ids', 'in', uid)]</attribute> <attribute name="domain">['|', ('user_ids', 'in', uid), ('assignee_ids', 'in', uid)]</attribute>
</filter> </filter>
<xpath expr="//field[@name='partner_id']" position="after"> <xpath expr="//field[@name='partner_id']" position="after">
<field name="assignee_ids" filter_domain="[('assignee_ids.user_ids.name', 'ilike', self)]"/> <field name="assignee_ids" filter_domain="[('assignee_ids.user_ids.name', 'ilike', self)]"/>