12.0 improve profiles management #4

Merged
stephansainleger merged 28 commits from 12.0-improve_profiles_management into 12.0 2023-06-27 15:31:24 +00:00
3 changed files with 51 additions and 7 deletions
Showing only changes of commit 6f7629aba8 - Show all commits

View File

@@ -3,7 +3,7 @@
{
"name": "partner_profiles",
"version": "12.0.1.2.0",
"version": "12.0.2.0.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Stéphan Sainléger",

View File

@@ -157,7 +157,6 @@ class res_partner(models.Model):
if self.is_company:
fields = [
"name",
"function",
"phone",
"mobile",
"email",
@@ -168,7 +167,6 @@ class res_partner(models.Model):
"country_id",
"zip",
"is_company",
"lang",
]
else:
fields = ["name"]

View File

@@ -47,10 +47,6 @@
</group>
</xpath>
<!-- ################ -->
<!-- NOTEBOOK UPDATES -->
<!-- ################ -->
<!-- page Contacts & Adresses -->
<xpath expr="//field[@name='child_ids']/.." position="attributes">
<attribute name="attrs">{'invisible': [('is_company','=', False)]}</attribute>
@@ -92,6 +88,56 @@
domain="[('is_company', '=', True),('is_main_profile','=', True)]"
context="{'default_partner_profile': 1, 'default_is_company': True, 'show_vat': True}" />
</xpath>
<!-- ###################### -->
<!-- PUBLIC PROFILE DISPLAY -->
<!-- ###################### -->
<xpath expr="//div[@name='button_box']" position="attributes">
<attribute name="attrs">{'invisible': [('is_public_profile','=', True)]}</attribute>
</xpath>
<xpath expr="//field[@name='image']" position="attributes">
<attribute name="attrs">{'invisible': [('is_public_profile','=', True)]}</attribute>
</xpath>
<xpath expr="//field[@name='type']/../.." position="attributes">
<attribute name="attrs">{'invisible': [('is_public_profile','=', True)]}</attribute>
</xpath>
<xpath expr="//field[@name='type']/../.." position="after">
<group attrs="{'invisible': [('is_public_profile','=',False)]}">
<group>
<label for="street" string="Address" />
<div class="o_address_format">
<field name="street" placeholder="Street..."
class="o_address_street"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
<field name="street2" placeholder="Street 2..."
class="o_address_street"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
<field name="city" placeholder="City" class="o_address_city"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
<field name="state_id" class="o_address_state" placeholder="State"
options='{"no_open": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"
context="{'country_id': country_id, 'zip': zip}" />
<field name="zip" placeholder="ZIP" class="o_address_zip"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
<field name="country_id" placeholder="Country"
class="o_address_country"
options='{"no_open": True, "no_create": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
</div>
</group>
<group>
<field name="phone" widget="phone" />
<field name="mobile" widget="phone" />
<field name="email" widget="email" context="{'gravatar_image': True}" />
<field name="website" widget="url"
placeholder="e.g. https://www.odoo.com" />
</group>
</group>
</xpath>
<xpath expr="//notebook" position="attributes">
<attribute name="attrs">{'invisible': [('is_public_profile','=', True)]}</attribute>
</xpath>
</field>
</record>
</data>