[IMP] partner_profiles: clarify position profiles display

separates the notebook pages of the child_ids and the position
profiles in both company and individual partner form views.
This commit is contained in:
Stéphan Sainléger
2023-06-12 16:37:00 +02:00
committed by Stéphan Sainléger
parent 9438f19140
commit 019019aa93
4 changed files with 186 additions and 14 deletions

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-23 15:09+0000\n"
"PO-Revision-Date: 2023-05-23 15:09+0000\n"
"POT-Creation-Date: 2023-06-13 15:25+0000\n"
"PO-Revision-Date: 2023-06-13 15:25+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,6 +15,38 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all the position profiles</strong> linked\n"
" to this main profile.</span>"
msgstr "<span>Vous trouverez ici <strong>tous les profils Position</strong> liés\n"
" à ce profil principal</span>"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all the position profiles</strong> linked to\n"
" this main profile.</span>"
msgstr "<span>Vous trouverez ici <strong>tous les profils Position</strong> liés à\n"
" ce profil principal</span>"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all</strong> the addresses linked with this\n"
" main profile. Adress creation from this tab <strong>only\n"
" generates new main profiles</strong>.</span>"
msgstr "<span>Vous trouverez ici <strong>toutes</strong> les adresses liées avec ce\n"
" profil principal. La création d'adresse depuis cet onglet <strong>génère\n"
" uniquement des profils principaux</strong>.</span>"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all</strong> the profiles/addresses/contacts\n"
" linked to this main profile. Contact creation from this tab <strong>only\n"
" generates new main profiles</strong>.</span>"
msgstr "<span>Vous trouverez ici <strong>tou(te)s</strong> les profils/adresses/contacts lié(e)s avec ce\n"
" profil principal. La création de contact depuis cet onglet <strong>génère\n"
" uniquement des profils principaux</strong>.</span>"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.create_position_wizard_view_form
msgid "<span>You are about to create a <strong>Position Profile</strong> which\n"
@@ -170,6 +202,11 @@ msgstr "Fiche principale"
msgid "Main Profile"
msgstr "Profil principal"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Mobile:"
msgstr "Mobile :"
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_partner_profile__name
msgid "Name"
@@ -232,12 +269,22 @@ msgstr "Personne"
msgid "Phone"
msgstr "Téléphone"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Phone:"
msgstr "Téléphone :"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
#: model:partner.profile,name:partner_profiles.partner_profile_position
msgid "Position Profile"
msgstr "Profil position"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Positions"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
#: model:partner.profile,name:partner_profiles.partner_profile_public
@@ -273,7 +320,13 @@ msgstr "Rue.."
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_create_position_profile__structure_id
msgid "Structure"
msgstr "Structure"
msgstr ""
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_res_partner__structure_position_ids
#: model:ir.model.fields,field_description:partner_profiles.field_res_users__structure_position_ids
msgid "Structure's positions"
msgstr "Position occupées dans la structures"
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_res_partner__to_migrate
@@ -284,7 +337,7 @@ msgstr "A migrer"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "ZIP"
msgstr ""
msgstr "Code postal"
#. module: partner_profiles
#: model:ir.model,name:partner_profiles.model_create_position_profile

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-23 15:04+0000\n"
"PO-Revision-Date: 2023-05-23 15:04+0000\n"
"POT-Creation-Date: 2023-06-13 15:24+0000\n"
"PO-Revision-Date: 2023-06-13 15:24+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -15,6 +15,32 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all the position profiles</strong> linked\n"
" to this main profile.</span>"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all the position profiles</strong> linked to\n"
" this main profile.</span>"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all</strong> the addresses linked with this\n"
" main profile. Adress creation from this tab <strong>only\n"
" generates new main profiles</strong>.</span>"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "<span>Please find here <strong>all</strong> the profiles/addresses/contacts\n"
" linked to this main profile. Contact creation from this tab <strong>only\n"
" generates new main profiles</strong>.</span>"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.create_position_wizard_view_form
msgid "<span>You are about to create a <strong>Position Profile</strong> which\n"
@@ -169,6 +195,11 @@ msgstr ""
msgid "Main Profile"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Mobile:"
msgstr ""
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_partner_profile__name
msgid "Name"
@@ -231,12 +262,22 @@ msgstr ""
msgid "Phone"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Phone:"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
#: model:partner.profile,name:partner_profiles.partner_profile_position
msgid "Position Profile"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
msgid "Positions"
msgstr ""
#. module: partner_profiles
#: model_terms:ir.ui.view,arch_db:partner_profiles.partner_profiles_form_view
#: model:partner.profile,name:partner_profiles.partner_profile_public
@@ -274,6 +315,12 @@ msgstr ""
msgid "Structure"
msgstr ""
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_res_partner__structure_position_ids
#: model:ir.model.fields,field_description:partner_profiles.field_res_users__structure_position_ids
msgid "Structure's positions"
msgstr ""
#. module: partner_profiles
#: model:ir.model.fields,field_description:partner_profiles.field_res_partner__to_migrate
#: model:ir.model.fields,field_description:partner_profiles.field_res_users__to_migrate

View File

@@ -40,6 +40,8 @@ class res_partner(models.Model):
domain=[("is_position_profile", "=", True)]
)
structure_position_ids = fields.One2many('res.partner', 'parent_id', string="Structure's positions", domain=[('active', '=', True), ('is_position_profile', '=', True)])
@api.depends("partner_profile", "other_contact_ids")
def _compute_profile_booleans(self):
for partner in self:

View File

@@ -48,28 +48,98 @@
</xpath>
<!-- page Contacts & Adresses -->
<xpath expr="//field[@name='child_ids']/.." position="attributes">
<attribute name="attrs">{'invisible': [('is_company','=', False)]}</attribute>
</xpath>
<xpath
expr="//field[@name='child_ids']/form/sheet/group/group/field[@name='contact_type']"
position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='child_ids']" position="before">
<button name="%(action_create_position_profile_wizard)d"
string="Create New Position"
class="oe_highlight" type="action"
attrs="{'invisible': [('is_main_profile','=',False)]}" />
<xpath
expr="//field[@name='child_ids']" position="before">
<div class="alert alert-info" role="alert" style="margin-bottom:0px;"
attrs="{'invisible': [('is_company','=', False)]}">
<span>Please find here <strong>all</strong> the profiles/addresses/contacts
linked to this main profile. Contact creation from this tab <strong>only
generates new main profiles</strong>.</span>
</div>
<div class="alert alert-info" role="alert" style="margin-bottom:0px;"
attrs="{'invisible': [('is_company','=', True)]}">
<span>Please find here <strong>all</strong> the addresses linked with this
main profile. Adress creation from this tab <strong>only
generates new main profiles</strong>.</span>
</div>
</xpath>
<!-- page Structure's position -->
<xpath expr="//page[@name='other_position']" position="after">
<page name="strecture_positions" string="Positions"
attrs="{'invisible': [('is_company','=', False)]}">
<div class="alert alert-info" role="alert" style="margin-bottom:0px;">
<span>Please find here <strong>all the position profiles</strong> linked
to this main profile.</span>
</div>
<field name="structure_position_ids" mode="kanban"
domain="[('is_position_profile', '=', True)]">
<kanban create="false">
<field name="id" />
<field name="color" />
<field name="name" />
<field name="title" />
<field name="email" />
<field name="function" />
<field name="phone" />
<field name="mobile" />
<field name="image_small" />
<templates>
<t t-name="kanban-box">
<t t-set="color"
t-value="kanban_color(record.color.raw_value)" />
<div
t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '') + ' oe_kanban_global_click'">
<div class="o_kanban_image">
<img alt="" t-if="record.image_small.raw_value"
t-att-src="kanban_image('res.partner', 'image_small', record.id.raw_value)" />
</div>
<div class="oe_kanban_details">
<field name="name" />
<div t-if="record.function.raw_value">
<field name="function" />
</div>
<div t-if="record.email.raw_value">
<field name="email" widget="email" />
</div>
<div t-if="record.phone.raw_value">Phone: <field
name="phone" widget="phone" /></div>
<div t-if="record.mobile.raw_value">Mobile: <field
name="mobile" widget="phone" /></div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
<button name="%(action_create_position_profile_wizard)d"
string="Create New Position"
class="oe_highlight" type="action"
attrs="{'invisible': [('is_main_profile','=',False)]}" />
</page>
</xpath>
<!-- page Other Positions -->
<xpath expr="//page[@name='other_position']" position="attributes">
<attribute name="attrs">{'invisible': [('is_company','=',True)]}</attribute>
</xpath>
<xpath expr="//page[@name='other_position']" position="attributes">
<attribute name="string">Positions</attribute>
</xpath>
<xpath expr="//page[@name='other_position']/field[@name='other_contact_ids']/form"
position="replace" />
<xpath expr="//field[@name='other_contact_ids']" position="before">
<div class="alert alert-info" role="alert" style="margin-bottom:0px;">
<span>Please find here <strong>all the position profiles</strong> linked to
this main profile.</span>
</div>
</xpath>
<xpath expr="//field[@name='other_contact_ids']" position="after">
<button name="%(action_create_position_profile_wizard)d"
string="Create New Position"
class="oe_highlight" type="action"