[IMP] partner_profiles: refactoring of position profile creation
This commit is contained in:
committed by
Stéphan Sainléger
parent
379b598754
commit
a4c1c467c5
@@ -56,36 +56,24 @@
|
||||
position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='child_ids']/form/sheet/group/group/field[@name='name']"
|
||||
position="before">
|
||||
<field name="is_position_profile" readonly="1" invisible="1" />
|
||||
<field name="partner_profile" string="Partner profile" invisible="1" />
|
||||
<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>
|
||||
|
||||
<!-- 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']/field[@name='other_contact_ids']/kanban"
|
||||
position="attributes">
|
||||
<attribute name="create">true</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='other_position']/field[@name='other_contact_ids']"
|
||||
position="attributes">
|
||||
<attribute name="context">{'default_partner_profile': 3, 'default_contact_id':
|
||||
active_id, 'default_name': name, 'default_street': street,
|
||||
'default_street2': street2, 'default_city': city, 'default_state_id':
|
||||
state_id, 'default_zip': zip, 'default_country_id': country_id,
|
||||
'default_supplier': supplier}</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='other_contact_ids']/form/sheet/group/group/field[@name='name']"
|
||||
position="after">
|
||||
<field name="is_position_profile" readonly="1" invisible="1" />
|
||||
<field name="partner_profile" string="Partner profile" />
|
||||
<field name="parent_id" widget="res_partner_many2one" placeholder="Company"
|
||||
domain="[('is_company', '=', True),('is_main_profile','=', True)]"
|
||||
context="{'default_partner_profile': 1, 'default_is_company': True, 'show_vat': True}" />
|
||||
<xpath expr="//page[@name='other_position']/field[@name='other_contact_ids']/form"
|
||||
position="replace" />
|
||||
<xpath expr="//field[@name='other_contact_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>
|
||||
|
||||
<!-- #################################### -->
|
||||
@@ -160,6 +148,9 @@
|
||||
<field name="phone" widget="phone" />
|
||||
<field name="email" widget="email" context="{'gravatar_image': True}" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="comment" />
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
Reference in New Issue
Block a user