mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
@@ -129,6 +129,7 @@ class Agreement(models.Model):
|
|||||||
use_parties_content = fields.Boolean(
|
use_parties_content = fields.Boolean(
|
||||||
string="Use parties content",
|
string="Use parties content",
|
||||||
help="Use custom content for parties")
|
help="Use custom content for parties")
|
||||||
|
company_partner_id = fields.Many2one(related="company_id.partner_id")
|
||||||
|
|
||||||
def _get_default_parties(self):
|
def _get_default_parties(self):
|
||||||
deftext = """
|
deftext = """
|
||||||
|
|||||||
@@ -115,6 +115,7 @@
|
|||||||
context="{'show_address': 1}"
|
context="{'show_address': 1}"
|
||||||
options="{"always_reload": True}"/>
|
options="{"always_reload": True}"/>
|
||||||
</div>
|
</div>
|
||||||
|
<field name="company_partner_id" invisible="1" />
|
||||||
</group>
|
</group>
|
||||||
<group name="partner_left" string="Primary Contact">
|
<group name="partner_left" string="Primary Contact">
|
||||||
<field name="partner_contact_id" domain="[('parent_id', '=', partner_id)]" nolabel="1"/>
|
<field name="partner_contact_id" domain="[('parent_id', '=', partner_id)]" nolabel="1"/>
|
||||||
@@ -122,7 +123,7 @@
|
|||||||
<field name="partner_contact_email" widget="email" readonly="1" nolabel="1"/>
|
<field name="partner_contact_email" widget="email" readonly="1" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
<group name="contact_right" string="Primary Contact">
|
<group name="contact_right" string="Primary Contact">
|
||||||
<field name="company_contact_id" domain="[('parent_id', '=', company_id.partner_id)]" nolabel="1"/>
|
<field name="company_contact_id" domain="[('parent_id', '=', company_partner_id)]" nolabel="1"/>
|
||||||
<field name="company_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
<field name="company_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
||||||
<field name="company_contact_email" widget="email" readonly="1" nolabel="1"/>
|
<field name="company_contact_email" widget="email" readonly="1" nolabel="1"/>
|
||||||
</group>
|
</group>
|
||||||
@@ -136,7 +137,7 @@
|
|||||||
<field name="end_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
|
<field name="end_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
|
||||||
<field name="expiration_notice"/>
|
<field name="expiration_notice"/>
|
||||||
<field name="change_notice"/>
|
<field name="change_notice"/>
|
||||||
<field name="notification_address_id" domain="['|', ('parent_id', '=', partner_id), ('parent_id', '=', company_id.partner_id)]"/>
|
<field name="notification_address_id" domain="['|', ('parent_id', '=', partner_id), ('parent_id', '=', company_partner_id)]"/>
|
||||||
<field name="termination_requested"/>
|
<field name="termination_requested"/>
|
||||||
<field name="termination_date"/>
|
<field name="termination_date"/>
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
Reference in New Issue
Block a user