12.0 improve profiles management #4
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "partner_profiles",
|
"name": "partner_profiles",
|
||||||
"version": "12.0.1.2.0",
|
"version": "12.0.2.0.0",
|
||||||
"author": "Elabore",
|
"author": "Elabore",
|
||||||
"website": "https://elabore.coop",
|
"website": "https://elabore.coop",
|
||||||
"maintainer": "Stéphan Sainléger",
|
"maintainer": "Stéphan Sainléger",
|
||||||
|
@@ -157,7 +157,6 @@ class res_partner(models.Model):
|
|||||||
if self.is_company:
|
if self.is_company:
|
||||||
fields = [
|
fields = [
|
||||||
"name",
|
"name",
|
||||||
"function",
|
|
||||||
"phone",
|
"phone",
|
||||||
"mobile",
|
"mobile",
|
||||||
"email",
|
"email",
|
||||||
@@ -168,7 +167,6 @@ class res_partner(models.Model):
|
|||||||
"country_id",
|
"country_id",
|
||||||
"zip",
|
"zip",
|
||||||
"is_company",
|
"is_company",
|
||||||
"lang",
|
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
fields = ["name"]
|
fields = ["name"]
|
||||||
|
@@ -47,10 +47,6 @@
|
|||||||
</group>
|
</group>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!-- ################ -->
|
|
||||||
<!-- NOTEBOOK UPDATES -->
|
|
||||||
<!-- ################ -->
|
|
||||||
|
|
||||||
<!-- page Contacts & Adresses -->
|
<!-- page Contacts & Adresses -->
|
||||||
<xpath expr="//field[@name='child_ids']/.." position="attributes">
|
<xpath expr="//field[@name='child_ids']/.." position="attributes">
|
||||||
<attribute name="attrs">{'invisible': [('is_company','=', False)]}</attribute>
|
<attribute name="attrs">{'invisible': [('is_company','=', False)]}</attribute>
|
||||||
@@ -92,6 +88,56 @@
|
|||||||
domain="[('is_company', '=', True),('is_main_profile','=', True)]"
|
domain="[('is_company', '=', True),('is_main_profile','=', True)]"
|
||||||
context="{'default_partner_profile': 1, 'default_is_company': True, 'show_vat': True}" />
|
context="{'default_partner_profile': 1, 'default_is_company': True, 'show_vat': True}" />
|
||||||
</xpath>
|
</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>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
</data>
|
</data>
|
||||||
|
Reference in New Issue
Block a user