[IMP] partner_profiles: add sync function for admin and public data
This commit is contained in:
@@ -42,6 +42,10 @@
|
||||
<button type="object" name="create_public_profile"
|
||||
string="Create Public Profile"
|
||||
attrs="{'invisible': [('public_profile_id','!=',False)]}" />
|
||||
<button string="Sync data"
|
||||
name="sync_admin_and_public_data" type="object"
|
||||
icon="fa-refresh"
|
||||
attrs="{'invisible': [('public_profile_id','=',False)]}" />
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
@@ -196,6 +200,7 @@
|
||||
options='{"no_open": True, "no_create": True}'
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" />
|
||||
</div>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
<field name="phone" widget="phone" />
|
||||
@@ -258,5 +263,13 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sync_public_data_action_server" model="ir.actions.server">
|
||||
<field name="name">Synchronize main and public data</field>
|
||||
<field name="model_id" ref="model_res_partner" />
|
||||
<field name="groups_id" eval="[(4,ref('base.group_no_one'))]" />
|
||||
<field name="state">code</field>
|
||||
<field name="code">records.sync_admin_and_public_data() </field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
Reference in New Issue
Block a user