mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] agreement_legal: black, isort, prettier
This commit is contained in:
@@ -7,6 +7,8 @@ from . import models
|
|||||||
|
|
||||||
def post_init_agreement_legal(cr, registry):
|
def post_init_agreement_legal(cr, registry):
|
||||||
env = api.Environment(cr, SUPERUSER_ID, dict())
|
env = api.Environment(cr, SUPERUSER_ID, dict())
|
||||||
cr.execute('UPDATE agreement SET stage_id = %s WHERE stage_id IS NULL;',
|
cr.execute(
|
||||||
(env.ref('agreement_legal.agreement_stage_new').id,))
|
"UPDATE agreement SET stage_id = %s WHERE stage_id IS NULL;",
|
||||||
|
(env.ref("agreement_legal.agreement_stage_new").id,),
|
||||||
|
)
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -35,17 +35,10 @@
|
|||||||
"views/agreement.xml",
|
"views/agreement.xml",
|
||||||
"views/menu.xml",
|
"views/menu.xml",
|
||||||
],
|
],
|
||||||
"demo": [
|
"demo": ["demo/demo.xml"],
|
||||||
"demo/demo.xml"
|
"qweb": ["static/src/xml/domain_widget_view.xml"],
|
||||||
],
|
|
||||||
'qweb': [
|
|
||||||
"static/src/xml/domain_widget_view.xml"
|
|
||||||
],
|
|
||||||
"post_init_hook": "post_init_agreement_legal",
|
"post_init_hook": "post_init_agreement_legal",
|
||||||
"application": True,
|
"application": True,
|
||||||
"development_status": "Beta",
|
"development_status": "Beta",
|
||||||
"maintainers": [
|
"maintainers": ["max3903", "ygol"],
|
||||||
"max3903",
|
|
||||||
"ygol"
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +1,45 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="agreement_stage_new" model="agreement.stage">
|
<record id="agreement_stage_new" model="agreement.stage">
|
||||||
<field name="name">New</field>
|
<field name="name">New</field>
|
||||||
<field name="sequence">10</field>
|
<field name="sequence">10</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_draft" model="agreement.stage">
|
<record id="agreement_stage_draft" model="agreement.stage">
|
||||||
<field name="name">Draft</field>
|
<field name="name">Draft</field>
|
||||||
<field name="sequence">20</field>
|
<field name="sequence">20</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_reviewed" model="agreement.stage">
|
<record id="agreement_stage_reviewed" model="agreement.stage">
|
||||||
<field name="name">Reviewed</field>
|
<field name="name">Reviewed</field>
|
||||||
<field name="sequence">30</field>
|
<field name="sequence">30</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_negotiation" model="agreement.stage">
|
<record id="agreement_stage_negotiation" model="agreement.stage">
|
||||||
<field name="name">Negotiation</field>
|
<field name="name">Negotiation</field>
|
||||||
<field name="sequence">40</field>
|
<field name="sequence">40</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_out" model="agreement.stage">
|
<record id="agreement_stage_out" model="agreement.stage">
|
||||||
<field name="name">Out for Customer Signature</field>
|
<field name="name">Out for Customer Signature</field>
|
||||||
<field name="sequence">50</field>
|
<field name="sequence">50</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_internal" model="agreement.stage">
|
<record id="agreement_stage_internal" model="agreement.stage">
|
||||||
<field name="name">Waiting Internal Signature</field>
|
<field name="name">Waiting Internal Signature</field>
|
||||||
<field name="sequence">60</field>
|
<field name="sequence">60</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_active" model="agreement.stage">
|
<record id="agreement_stage_active" model="agreement.stage">
|
||||||
<field name="name">Active</field>
|
<field name="name">Active</field>
|
||||||
<field name="sequence">70</field>
|
<field name="sequence">70</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_expired" model="agreement.stage">
|
<record id="agreement_stage_expired" model="agreement.stage">
|
||||||
<field name="name">Expired</field>
|
<field name="name">Expired</field>
|
||||||
<field name="sequence">80</field>
|
<field name="sequence">80</field>
|
||||||
<field name="stage_type">agreement</field>
|
<field name="stage_type">agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_stage_cancelled" model="agreement.stage">
|
<record id="agreement_stage_cancelled" model="agreement.stage">
|
||||||
<field name="name">Cancelled</field>
|
<field name="name">Cancelled</field>
|
||||||
<field name="sequence">100</field>
|
<field name="sequence">100</field>
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="agreement_type_agreement" model="agreement.type">
|
<record id="agreement_type_agreement" model="agreement.type">
|
||||||
<field name="name">Agreement</field>
|
<field name="name">Agreement</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_type_contract" model="agreement.type">
|
<record id="agreement_type_contract" model="agreement.type">
|
||||||
<field name="name">Contract</field>
|
<field name="name">Contract</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_type_loi" model="agreement.type">
|
<record id="agreement_type_loi" model="agreement.type">
|
||||||
<field name="name">Letter of Intent</field>
|
<field name="name">Letter of Intent</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo noupdate="1">
|
<odoo noupdate="1">
|
||||||
|
|
||||||
<!-- Sequence for agreement -->
|
<!-- Sequence for agreement -->
|
||||||
<record id="seq_agreement" model="ir.sequence">
|
<record id="seq_agreement" model="ir.sequence">
|
||||||
<field name="name">Agreements</field>
|
<field name="name">Agreements</field>
|
||||||
@@ -9,5 +8,4 @@
|
|||||||
<field name="padding">3</field>
|
<field name="padding">3</field>
|
||||||
<field name="company_id" eval="False" />
|
<field name="company_id" eval="False" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="agreement" model="ir.module.category">
|
<record id="agreement" model="ir.module.category">
|
||||||
<field name="name">Agreement</field>
|
<field name="name">Agreement</field>
|
||||||
<field name="sequence">80</field>
|
<field name="sequence">80</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -3,38 +3,32 @@
|
|||||||
© 2019 Ygol Internetwork (yves@ygol.com)
|
© 2019 Ygol Internetwork (yves@ygol.com)
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<odoo noupdate="1">
|
<odoo noupdate="1">
|
||||||
|
|
||||||
<record id="agreement.market1" model="agreement">
|
<record id="agreement.market1" model="agreement">
|
||||||
<field name="description">Hardware IT (C2C-IT0042)</field>
|
<field name="description">Hardware IT (C2C-IT0042)</field>
|
||||||
<field name="agreement_type_id" ref="agreement_type_agreement" />
|
<field name="agreement_type_id" ref="agreement_type_agreement" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement.market2" model="agreement">
|
<record id="agreement.market2" model="agreement">
|
||||||
<field name="description">Fiber access office Lausanne (C2C-IT0043)</field>
|
<field name="description">Fiber access office Lausanne (C2C-IT0043)</field>
|
||||||
<field name="agreement_type_id" ref="agreement_type_contract" />
|
<field name="agreement_type_id" ref="agreement_type_contract" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement.market3" model="agreement">
|
<record id="agreement.market3" model="agreement">
|
||||||
<field name="description">Vétérinaire (AGR-VETO001)</field>
|
<field name="description">Vétérinaire (AGR-VETO001)</field>
|
||||||
<field name="agreement_type_id" ref="agreement_type_loi" />
|
<field name="agreement_type_id" ref="agreement_type_loi" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement.market4" model="agreement">
|
<record id="agreement.market4" model="agreement">
|
||||||
<field name="description">Wazo IPBX deployment and maintenance (AGR-TEL001)</field>
|
<field
|
||||||
|
name="description"
|
||||||
|
>Wazo IPBX deployment and maintenance (AGR-TEL001)</field>
|
||||||
<field name="agreement_type_id" ref="agreement_type_loi" />
|
<field name="agreement_type_id" ref="agreement_type_loi" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement.market5" model="agreement">
|
<record id="agreement.market5" model="agreement">
|
||||||
<field name="description">SIP Phones supply (BUY-VOIP012)</field>
|
<field name="description">SIP Phones supply (BUY-VOIP012)</field>
|
||||||
<field name="agreement_type_id" ref="agreement_type_agreement" />
|
<field name="agreement_type_id" ref="agreement_type_agreement" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement.market6" model="agreement">
|
<record id="agreement.market6" model="agreement">
|
||||||
<field name="is_template">True</field>
|
<field name="is_template">True</field>
|
||||||
<field name="description">SIP-ISDN gateways (BUY-VOIP013)</field>
|
<field name="description">SIP-ISDN gateways (BUY-VOIP013)</field>
|
||||||
<field name="agreement_type_id" ref="agreement_legal.agreement_type_contract" />
|
<field name="agreement_type_id" ref="agreement_legal.agreement_type_contract" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -6,5 +6,7 @@ def migrate(env, version):
|
|||||||
if not version:
|
if not version:
|
||||||
return
|
return
|
||||||
|
|
||||||
env.execute("UPDATE agreement_stage SET stage_type = 'agreement' "
|
env.execute(
|
||||||
"WHERE stage_type IS NULL;")
|
"UPDATE agreement_stage SET stage_type = 'agreement' "
|
||||||
|
"WHERE stage_type IS NULL;"
|
||||||
|
)
|
||||||
|
|||||||
@@ -14,122 +14,146 @@ class Agreement(models.Model):
|
|||||||
default=1,
|
default=1,
|
||||||
copy=False,
|
copy=False,
|
||||||
help="The versions are used to keep track of document history and "
|
help="The versions are used to keep track of document history and "
|
||||||
"previous versions can be referenced.")
|
"previous versions can be referenced.",
|
||||||
|
)
|
||||||
revision = fields.Integer(
|
revision = fields.Integer(
|
||||||
string="Revision",
|
string="Revision",
|
||||||
default=0,
|
default=0,
|
||||||
copy=False,
|
copy=False,
|
||||||
help="The revision will increase with every save event.")
|
help="The revision will increase with every save event.",
|
||||||
|
)
|
||||||
description = fields.Text(
|
description = fields.Text(
|
||||||
string="Description",
|
string="Description",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Description of the agreement")
|
help="Description of the agreement",
|
||||||
|
)
|
||||||
dynamic_description = fields.Text(
|
dynamic_description = fields.Text(
|
||||||
compute="_compute_dynamic_description",
|
compute="_compute_dynamic_description",
|
||||||
string="Dynamic Description",
|
string="Dynamic Description",
|
||||||
help="Compute dynamic description")
|
help="Compute dynamic description",
|
||||||
|
)
|
||||||
start_date = fields.Date(
|
start_date = fields.Date(
|
||||||
string="Start Date",
|
string="Start Date",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="When the agreement starts.")
|
help="When the agreement starts.",
|
||||||
|
)
|
||||||
end_date = fields.Date(
|
end_date = fields.Date(
|
||||||
string="End Date",
|
string="End Date", track_visibility="onchange", help="When the agreement ends."
|
||||||
track_visibility="onchange",
|
)
|
||||||
help="When the agreement ends.")
|
|
||||||
color = fields.Integer(string="Color")
|
color = fields.Integer(string="Color")
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
help="If unchecked, it will allow you to hide the agreement without "
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
"removing it.")
|
"removing it.",
|
||||||
|
)
|
||||||
company_signed_date = fields.Date(
|
company_signed_date = fields.Date(
|
||||||
string="Signed on",
|
string="Signed on",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Date the contract was signed by Company.")
|
help="Date the contract was signed by Company.",
|
||||||
|
)
|
||||||
partner_signed_date = fields.Date(
|
partner_signed_date = fields.Date(
|
||||||
string="Signed on (Partner)",
|
string="Signed on (Partner)",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Date the contract was signed by the Partner.")
|
help="Date the contract was signed by the Partner.",
|
||||||
|
)
|
||||||
term = fields.Integer(
|
term = fields.Integer(
|
||||||
string="Term (Months)",
|
string="Term (Months)",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Number of months this agreement/contract is in effect with the "
|
help="Number of months this agreement/contract is in effect with the "
|
||||||
"partner.")
|
"partner.",
|
||||||
|
)
|
||||||
expiration_notice = fields.Integer(
|
expiration_notice = fields.Integer(
|
||||||
string="Exp. Notice (Days)",
|
string="Exp. Notice (Days)",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Number of Days before expiration to be notified.")
|
help="Number of Days before expiration to be notified.",
|
||||||
|
)
|
||||||
change_notice = fields.Integer(
|
change_notice = fields.Integer(
|
||||||
string="Change Notice (Days)",
|
string="Change Notice (Days)",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Number of Days to be notified before changes.")
|
help="Number of Days to be notified before changes.",
|
||||||
|
)
|
||||||
special_terms = fields.Text(
|
special_terms = fields.Text(
|
||||||
string="Special Terms",
|
string="Special Terms",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Any terms that you have agreed to and want to track on the "
|
help="Any terms that you have agreed to and want to track on the "
|
||||||
"agreement/contract.")
|
"agreement/contract.",
|
||||||
|
)
|
||||||
dynamic_special_terms = fields.Text(
|
dynamic_special_terms = fields.Text(
|
||||||
compute="_compute_dynamic_special_terms",
|
compute="_compute_dynamic_special_terms",
|
||||||
string="Dynamic Special Terms",
|
string="Dynamic Special Terms",
|
||||||
help="Compute dynamic special terms")
|
help="Compute dynamic special terms",
|
||||||
|
)
|
||||||
code = fields.Char(
|
code = fields.Char(
|
||||||
string="Reference",
|
string="Reference",
|
||||||
required=True,
|
required=True,
|
||||||
default=lambda self: _("New"),
|
default=lambda self: _("New"),
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
copy=False,
|
copy=False,
|
||||||
help="ID used for internal contract tracking.")
|
help="ID used for internal contract tracking.",
|
||||||
|
)
|
||||||
increase_type_id = fields.Many2one(
|
increase_type_id = fields.Many2one(
|
||||||
"agreement.increasetype",
|
"agreement.increasetype",
|
||||||
string="Increase Type",
|
string="Increase Type",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="The amount that certain rates may increase.")
|
help="The amount that certain rates may increase.",
|
||||||
|
)
|
||||||
termination_requested = fields.Date(
|
termination_requested = fields.Date(
|
||||||
string="Termination Requested Date",
|
string="Termination Requested Date",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Date that a request for termination was received.")
|
help="Date that a request for termination was received.",
|
||||||
|
)
|
||||||
termination_date = fields.Date(
|
termination_date = fields.Date(
|
||||||
string="Termination Date",
|
string="Termination Date",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Date that the contract was terminated.")
|
help="Date that the contract was terminated.",
|
||||||
reviewed_date = fields.Date(
|
)
|
||||||
string="Reviewed Date", track_visibility="onchange")
|
reviewed_date = fields.Date(string="Reviewed Date", track_visibility="onchange")
|
||||||
reviewed_user_id = fields.Many2one(
|
reviewed_user_id = fields.Many2one(
|
||||||
"res.users", string="Reviewed By", track_visibility="onchange")
|
"res.users", string="Reviewed By", track_visibility="onchange"
|
||||||
approved_date = fields.Date(
|
)
|
||||||
string="Approved Date", track_visibility="onchange")
|
approved_date = fields.Date(string="Approved Date", track_visibility="onchange")
|
||||||
approved_user_id = fields.Many2one(
|
approved_user_id = fields.Many2one(
|
||||||
"res.users", string="Approved By", track_visibility="onchange")
|
"res.users", string="Approved By", track_visibility="onchange"
|
||||||
|
)
|
||||||
currency_id = fields.Many2one("res.currency", string="Currency")
|
currency_id = fields.Many2one("res.currency", string="Currency")
|
||||||
partner_id = fields.Many2one(
|
partner_id = fields.Many2one(
|
||||||
"res.partner",
|
"res.partner",
|
||||||
string="Partner",
|
string="Partner",
|
||||||
required=False,
|
required=False,
|
||||||
copy=True,
|
copy=True,
|
||||||
help="The customer or vendor this agreement is related to.")
|
help="The customer or vendor this agreement is related to.",
|
||||||
|
)
|
||||||
partner_contact_id = fields.Many2one(
|
partner_contact_id = fields.Many2one(
|
||||||
"res.partner",
|
"res.partner",
|
||||||
string="Partner Contact",
|
string="Partner Contact",
|
||||||
copy=True,
|
copy=True,
|
||||||
help="The primary partner contact (If Applicable).")
|
help="The primary partner contact (If Applicable).",
|
||||||
|
)
|
||||||
partner_contact_phone = fields.Char(
|
partner_contact_phone = fields.Char(
|
||||||
related="partner_contact_id.phone", string="Partner Phone")
|
related="partner_contact_id.phone", string="Partner Phone"
|
||||||
|
)
|
||||||
partner_contact_email = fields.Char(
|
partner_contact_email = fields.Char(
|
||||||
related="partner_contact_id.email", string="Partner Email")
|
related="partner_contact_id.email", string="Partner Email"
|
||||||
|
)
|
||||||
company_contact_id = fields.Many2one(
|
company_contact_id = fields.Many2one(
|
||||||
"res.partner",
|
"res.partner",
|
||||||
string="Company Contact",
|
string="Company Contact",
|
||||||
copy=True,
|
copy=True,
|
||||||
help="The primary contact in the company.")
|
help="The primary contact in the company.",
|
||||||
|
)
|
||||||
company_contact_phone = fields.Char(
|
company_contact_phone = fields.Char(
|
||||||
related="company_contact_id.phone", string="Phone")
|
related="company_contact_id.phone", string="Phone"
|
||||||
|
)
|
||||||
company_contact_email = fields.Char(
|
company_contact_email = fields.Char(
|
||||||
related="company_contact_id.email", string="Email")
|
related="company_contact_id.email", string="Email"
|
||||||
|
)
|
||||||
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(
|
company_partner_id = fields.Many2one(
|
||||||
related="company_id.partner_id", string="Company's Partner")
|
related="company_id.partner_id", string="Company's Partner"
|
||||||
|
)
|
||||||
|
|
||||||
def _get_default_parties(self):
|
def _get_default_parties(self):
|
||||||
deftext = """
|
deftext = """
|
||||||
@@ -160,97 +184,108 @@ class Agreement(models.Model):
|
|||||||
string="Parties",
|
string="Parties",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
default=_get_default_parties,
|
default=_get_default_parties,
|
||||||
help="Parties of the agreement")
|
help="Parties of the agreement",
|
||||||
|
)
|
||||||
dynamic_parties = fields.Html(
|
dynamic_parties = fields.Html(
|
||||||
compute="_compute_dynamic_parties",
|
compute="_compute_dynamic_parties",
|
||||||
string="Dynamic Parties",
|
string="Dynamic Parties",
|
||||||
help="Compute dynamic parties")
|
help="Compute dynamic parties",
|
||||||
agreement_type_id = fields.Many2one(
|
|
||||||
track_visibility="onchange",
|
|
||||||
)
|
)
|
||||||
|
agreement_type_id = fields.Many2one(track_visibility="onchange",)
|
||||||
agreement_subtype_id = fields.Many2one(
|
agreement_subtype_id = fields.Many2one(
|
||||||
"agreement.subtype",
|
"agreement.subtype",
|
||||||
string="Agreement Sub-type",
|
string="Agreement Sub-type",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Select the sub-type of this agreement. Sub-Types are related to "
|
help="Select the sub-type of this agreement. Sub-Types are related to "
|
||||||
"agreement types.")
|
"agreement types.",
|
||||||
product_ids = fields.Many2many(
|
)
|
||||||
"product.template", string="Products & Services")
|
product_ids = fields.Many2many("product.template", string="Products & Services")
|
||||||
assigned_user_id = fields.Many2one(
|
assigned_user_id = fields.Many2one(
|
||||||
"res.users",
|
"res.users",
|
||||||
string="Assigned To",
|
string="Assigned To",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Select the user who manages this agreement.")
|
help="Select the user who manages this agreement.",
|
||||||
|
)
|
||||||
company_signed_user_id = fields.Many2one(
|
company_signed_user_id = fields.Many2one(
|
||||||
"res.users",
|
"res.users",
|
||||||
string="Signed By",
|
string="Signed By",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="The user at our company who authorized/signed the agreement or "
|
help="The user at our company who authorized/signed the agreement or "
|
||||||
"contract.")
|
"contract.",
|
||||||
|
)
|
||||||
partner_signed_user_id = fields.Many2one(
|
partner_signed_user_id = fields.Many2one(
|
||||||
"res.partner",
|
"res.partner",
|
||||||
string="Signed By (Partner)",
|
string="Signed By (Partner)",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Contact on the account that signed the agreement/contract.")
|
help="Contact on the account that signed the agreement/contract.",
|
||||||
|
)
|
||||||
parent_agreement_id = fields.Many2one(
|
parent_agreement_id = fields.Many2one(
|
||||||
"agreement",
|
"agreement",
|
||||||
string="Parent Agreement",
|
string="Parent Agreement",
|
||||||
help="Link this agreement to a parent agreement. For example if this "
|
help="Link this agreement to a parent agreement. For example if this "
|
||||||
"agreement is an amendment to another agreement. This list will "
|
"agreement is an amendment to another agreement. This list will "
|
||||||
"only show other agreements related to the same account.")
|
"only show other agreements related to the same account.",
|
||||||
|
)
|
||||||
renewal_type_id = fields.Many2one(
|
renewal_type_id = fields.Many2one(
|
||||||
"agreement.renewaltype",
|
"agreement.renewaltype",
|
||||||
string="Renewal Type",
|
string="Renewal Type",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="Describes what happens after the contract expires.")
|
help="Describes what happens after the contract expires.",
|
||||||
|
)
|
||||||
recital_ids = fields.One2many(
|
recital_ids = fields.One2many(
|
||||||
"agreement.recital", "agreement_id", string="Recitals", copy=True)
|
"agreement.recital", "agreement_id", string="Recitals", copy=True
|
||||||
|
)
|
||||||
sections_ids = fields.One2many(
|
sections_ids = fields.One2many(
|
||||||
"agreement.section", "agreement_id", string="Sections", copy=True)
|
"agreement.section", "agreement_id", string="Sections", copy=True
|
||||||
clauses_ids = fields.One2many(
|
)
|
||||||
"agreement.clause", "agreement_id", string="Clauses")
|
clauses_ids = fields.One2many("agreement.clause", "agreement_id", string="Clauses")
|
||||||
appendix_ids = fields.One2many(
|
appendix_ids = fields.One2many(
|
||||||
"agreement.appendix", "agreement_id", string="Appendices", copy=True)
|
"agreement.appendix", "agreement_id", string="Appendices", copy=True
|
||||||
|
)
|
||||||
previous_version_agreements_ids = fields.One2many(
|
previous_version_agreements_ids = fields.One2many(
|
||||||
"agreement",
|
"agreement",
|
||||||
"parent_agreement_id",
|
"parent_agreement_id",
|
||||||
string="Previous Versions",
|
string="Previous Versions",
|
||||||
copy=False,
|
copy=False,
|
||||||
domain=[("active", "=", False)])
|
domain=[("active", "=", False)],
|
||||||
|
)
|
||||||
child_agreements_ids = fields.One2many(
|
child_agreements_ids = fields.One2many(
|
||||||
"agreement",
|
"agreement",
|
||||||
"parent_agreement_id",
|
"parent_agreement_id",
|
||||||
string="Child Agreements",
|
string="Child Agreements",
|
||||||
copy=False,
|
copy=False,
|
||||||
domain=[("active", "=", True)])
|
domain=[("active", "=", True)],
|
||||||
|
)
|
||||||
line_ids = fields.One2many(
|
line_ids = fields.One2many(
|
||||||
"agreement.line",
|
"agreement.line", "agreement_id", string="Products/Services", copy=False
|
||||||
"agreement_id",
|
)
|
||||||
string="Products/Services",
|
|
||||||
copy=False)
|
|
||||||
state = fields.Selection(
|
state = fields.Selection(
|
||||||
[("draft", "Draft"), ("active", "Active"), ("inactive", "Inactive")],
|
[("draft", "Draft"), ("active", "Active"), ("inactive", "Inactive")],
|
||||||
default="draft",
|
default="draft",
|
||||||
track_visibility="always")
|
track_visibility="always",
|
||||||
|
)
|
||||||
notification_address_id = fields.Many2one(
|
notification_address_id = fields.Many2one(
|
||||||
"res.partner",
|
"res.partner",
|
||||||
string="Notification Address",
|
string="Notification Address",
|
||||||
help="The address to send notificaitons to, if different from "
|
help="The address to send notificaitons to, if different from "
|
||||||
"customer address.(Address Type = Other)")
|
"customer address.(Address Type = Other)",
|
||||||
|
)
|
||||||
signed_contract_filename = fields.Char(string="Filename")
|
signed_contract_filename = fields.Char(string="Filename")
|
||||||
signed_contract = fields.Binary(
|
signed_contract = fields.Binary(string="Signed Document", track_visibility="always")
|
||||||
string="Signed Document", track_visibility="always")
|
|
||||||
|
|
||||||
# Dynamic field editor
|
# Dynamic field editor
|
||||||
field_domain = fields.Char(string='Field Expression',
|
field_domain = fields.Char(
|
||||||
default='[["active", "=", True]]')
|
string="Field Expression", default='[["active", "=", True]]'
|
||||||
|
)
|
||||||
default_value = fields.Char(
|
default_value = fields.Char(
|
||||||
string="Default Value",
|
string="Default Value",
|
||||||
help="Optional value to use if the target field is empty.")
|
help="Optional value to use if the target field is empty.",
|
||||||
|
)
|
||||||
copyvalue = fields.Char(
|
copyvalue = fields.Char(
|
||||||
string="Placeholder Expression",
|
string="Placeholder Expression",
|
||||||
help="""Final placeholder expression, to be copy-pasted in the desired
|
help="""Final placeholder expression, to be copy-pasted in the desired
|
||||||
template field.""")
|
template field.""",
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange("field_domain", "default_value")
|
@api.onchange("field_domain", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
@@ -260,8 +295,8 @@ class Agreement(models.Model):
|
|||||||
if string_list:
|
if string_list:
|
||||||
field_domain = string_list[0][3:-1]
|
field_domain = string_list[0][3:-1]
|
||||||
self.copyvalue = "${{object.{} or {}}}".format(
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
field_domain,
|
field_domain, self.default_value or "''"
|
||||||
self.default_value or "''")
|
)
|
||||||
|
|
||||||
# compute the dynamic content for mako expression
|
# compute the dynamic content for mako expression
|
||||||
@api.multi
|
@api.multi
|
||||||
@@ -269,9 +304,7 @@ class Agreement(models.Model):
|
|||||||
MailTemplates = self.env["mail.template"]
|
MailTemplates = self.env["mail.template"]
|
||||||
for agreement in self:
|
for agreement in self:
|
||||||
lang = agreement.partner_id.lang or "en_US"
|
lang = agreement.partner_id.lang or "en_US"
|
||||||
description = MailTemplates.with_context(
|
description = MailTemplates.with_context(lang=lang)._render_template(
|
||||||
lang=lang
|
|
||||||
)._render_template(
|
|
||||||
agreement.description, "agreement", agreement.id
|
agreement.description, "agreement", agreement.id
|
||||||
)
|
)
|
||||||
agreement.dynamic_description = description
|
agreement.dynamic_description = description
|
||||||
@@ -281,9 +314,7 @@ class Agreement(models.Model):
|
|||||||
MailTemplates = self.env["mail.template"]
|
MailTemplates = self.env["mail.template"]
|
||||||
for agreement in self:
|
for agreement in self:
|
||||||
lang = agreement.partner_id.lang or "en_US"
|
lang = agreement.partner_id.lang or "en_US"
|
||||||
parties = MailTemplates.with_context(
|
parties = MailTemplates.with_context(lang=lang)._render_template(
|
||||||
lang=lang
|
|
||||||
)._render_template(
|
|
||||||
agreement.parties, "agreement", agreement.id
|
agreement.parties, "agreement", agreement.id
|
||||||
)
|
)
|
||||||
agreement.dynamic_parties = parties
|
agreement.dynamic_parties = parties
|
||||||
@@ -293,9 +324,7 @@ class Agreement(models.Model):
|
|||||||
MailTemplates = self.env["mail.template"]
|
MailTemplates = self.env["mail.template"]
|
||||||
for agreement in self:
|
for agreement in self:
|
||||||
lang = agreement.partner_id.lang or "en_US"
|
lang = agreement.partner_id.lang or "en_US"
|
||||||
special_terms = MailTemplates.with_context(
|
special_terms = MailTemplates.with_context(lang=lang)._render_template(
|
||||||
lang=lang
|
|
||||||
)._render_template(
|
|
||||||
agreement.special_terms, "agreement", agreement.id
|
agreement.special_terms, "agreement", agreement.id
|
||||||
)
|
)
|
||||||
agreement.dynamic_special_terms = special_terms
|
agreement.dynamic_special_terms = special_terms
|
||||||
@@ -304,7 +333,8 @@ class Agreement(models.Model):
|
|||||||
@api.model
|
@api.model
|
||||||
def _read_group_stage_ids(self, stages, domain, order):
|
def _read_group_stage_ids(self, stages, domain, order):
|
||||||
stage_ids = self.env["agreement.stage"].search(
|
stage_ids = self.env["agreement.stage"].search(
|
||||||
[('stage_type', '=', 'agreement')])
|
[("stage_type", "=", "agreement")]
|
||||||
|
)
|
||||||
return stage_ids
|
return stage_ids
|
||||||
|
|
||||||
stage_id = fields.Many2one(
|
stage_id = fields.Many2one(
|
||||||
@@ -313,7 +343,8 @@ class Agreement(models.Model):
|
|||||||
group_expand="_read_group_stage_ids",
|
group_expand="_read_group_stage_ids",
|
||||||
help="Select the current stage of the agreement.",
|
help="Select the current stage of the agreement.",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
index=True)
|
index=True,
|
||||||
|
)
|
||||||
|
|
||||||
# Create New Version Button
|
# Create New Version Button
|
||||||
@api.multi
|
@api.multi
|
||||||
@@ -345,7 +376,7 @@ class Agreement(models.Model):
|
|||||||
"stage_id": self.env.ref("agreement_legal.agreement_stage_new").id,
|
"stage_id": self.env.ref("agreement_legal.agreement_stage_new").id,
|
||||||
}
|
}
|
||||||
res = self.copy(default=default_vals)
|
res = self.copy(default=default_vals)
|
||||||
res.sections_ids.mapped('clauses_ids').write({'agreement_id': res.id})
|
res.sections_ids.mapped("clauses_ids").write({"agreement_id": res.id})
|
||||||
return {
|
return {
|
||||||
"res_model": "agreement",
|
"res_model": "agreement",
|
||||||
"type": "ir.actions.act_window",
|
"type": "ir.actions.act_window",
|
||||||
@@ -357,12 +388,9 @@ class Agreement(models.Model):
|
|||||||
@api.model
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
if vals.get("code", _("New")) == _("New"):
|
if vals.get("code", _("New")) == _("New"):
|
||||||
vals["code"] = self.env["ir.sequence"].next_by_code(
|
vals["code"] = self.env["ir.sequence"].next_by_code("agreement") or _("New")
|
||||||
"agreement"
|
if not vals.get("stage_id"):
|
||||||
) or _("New")
|
vals["stage_id"] = self.env.ref("agreement_legal.agreement_stage_new").id
|
||||||
if not vals.get('stage_id'):
|
|
||||||
vals["stage_id"] = \
|
|
||||||
self.env.ref("agreement_legal.agreement_stage_new").id
|
|
||||||
return super(Agreement, self).create(vals)
|
return super(Agreement, self).create(vals)
|
||||||
|
|
||||||
# Increments the revision on each save action
|
# Increments the revision on each save action
|
||||||
|
|||||||
@@ -15,19 +15,14 @@ class AgreementAppendix(models.Model):
|
|||||||
required=True,
|
required=True,
|
||||||
help="The title is displayed on the PDF." "The name is not.",
|
help="The title is displayed on the PDF." "The name is not.",
|
||||||
)
|
)
|
||||||
sequence = fields.Integer(
|
sequence = fields.Integer(string="Sequence", default=10)
|
||||||
string="Sequence",
|
|
||||||
default=10)
|
|
||||||
content = fields.Html(string="Content")
|
content = fields.Html(string="Content")
|
||||||
dynamic_content = fields.Html(
|
dynamic_content = fields.Html(
|
||||||
compute="_compute_dynamic_content",
|
compute="_compute_dynamic_content",
|
||||||
string="Dynamic Content",
|
string="Dynamic Content",
|
||||||
help="compute dynamic Content",
|
help="compute dynamic Content",
|
||||||
)
|
)
|
||||||
agreement_id = fields.Many2one(
|
agreement_id = fields.Many2one("agreement", string="Agreement", ondelete="cascade")
|
||||||
"agreement",
|
|
||||||
string="Agreement",
|
|
||||||
ondelete="cascade")
|
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
@@ -36,15 +31,18 @@ class AgreementAppendix(models.Model):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Dynamic field editor
|
# Dynamic field editor
|
||||||
field_domain = fields.Char(string='Field Expression',
|
field_domain = fields.Char(
|
||||||
default='[["active", "=", True]]')
|
string="Field Expression", default='[["active", "=", True]]'
|
||||||
|
)
|
||||||
default_value = fields.Char(
|
default_value = fields.Char(
|
||||||
string="Default Value",
|
string="Default Value",
|
||||||
help="Optional value to use if the target field is empty.")
|
help="Optional value to use if the target field is empty.",
|
||||||
|
)
|
||||||
copyvalue = fields.Char(
|
copyvalue = fields.Char(
|
||||||
string="Placeholder Expression",
|
string="Placeholder Expression",
|
||||||
help="""Final placeholder expression, to be copy-pasted in the desired
|
help="""Final placeholder expression, to be copy-pasted in the desired
|
||||||
template field.""")
|
template field.""",
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange("field_domain", "default_value")
|
@api.onchange("field_domain", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
@@ -54,8 +52,8 @@ class AgreementAppendix(models.Model):
|
|||||||
if string_list:
|
if string_list:
|
||||||
field_domain = string_list[0][3:-1]
|
field_domain = string_list[0][3:-1]
|
||||||
self.copyvalue = "${{object.{} or {}}}".format(
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
field_domain,
|
field_domain, self.default_value or "''"
|
||||||
self.default_value or "''")
|
)
|
||||||
|
|
||||||
# compute the dynamic content for mako expression
|
# compute the dynamic content for mako expression
|
||||||
@api.multi
|
@api.multi
|
||||||
|
|||||||
@@ -11,38 +11,39 @@ class AgreementClause(models.Model):
|
|||||||
|
|
||||||
name = fields.Char(string="Name", required=True)
|
name = fields.Char(string="Name", required=True)
|
||||||
title = fields.Char(
|
title = fields.Char(
|
||||||
string="Title",
|
string="Title", help="The title is displayed on the PDF." "The name is not."
|
||||||
help="The title is displayed on the PDF." "The name is not.")
|
)
|
||||||
sequence = fields.Integer(string="Sequence")
|
sequence = fields.Integer(string="Sequence")
|
||||||
agreement_id = fields.Many2one(
|
agreement_id = fields.Many2one("agreement", string="Agreement", ondelete="cascade")
|
||||||
"agreement",
|
|
||||||
string="Agreement",
|
|
||||||
ondelete="cascade")
|
|
||||||
section_id = fields.Many2one(
|
section_id = fields.Many2one(
|
||||||
"agreement.section",
|
"agreement.section", string="Section", ondelete="cascade"
|
||||||
string="Section",
|
)
|
||||||
ondelete="cascade")
|
|
||||||
content = fields.Html(string="Clause Content")
|
content = fields.Html(string="Clause Content")
|
||||||
dynamic_content = fields.Html(
|
dynamic_content = fields.Html(
|
||||||
compute="_compute_dynamic_content",
|
compute="_compute_dynamic_content",
|
||||||
string="Dynamic Content",
|
string="Dynamic Content",
|
||||||
help="compute dynamic Content")
|
help="compute dynamic Content",
|
||||||
|
)
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
help="If unchecked, it will allow you to hide the agreement without "
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
"removing it.")
|
"removing it.",
|
||||||
|
)
|
||||||
|
|
||||||
# Dynamic field editor
|
# Dynamic field editor
|
||||||
field_domain = fields.Char(string='Field Expression',
|
field_domain = fields.Char(
|
||||||
default='[["active", "=", True]]')
|
string="Field Expression", default='[["active", "=", True]]'
|
||||||
|
)
|
||||||
default_value = fields.Char(
|
default_value = fields.Char(
|
||||||
string="Default Value",
|
string="Default Value",
|
||||||
help="Optional value to use if the target field is empty.")
|
help="Optional value to use if the target field is empty.",
|
||||||
|
)
|
||||||
copyvalue = fields.Char(
|
copyvalue = fields.Char(
|
||||||
string="Placeholder Expression",
|
string="Placeholder Expression",
|
||||||
help="""Final placeholder expression, to be copy-pasted in the desired
|
help="""Final placeholder expression, to be copy-pasted in the desired
|
||||||
template field.""")
|
template field.""",
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange("field_domain", "default_value")
|
@api.onchange("field_domain", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
@@ -52,8 +53,8 @@ class AgreementClause(models.Model):
|
|||||||
if string_list:
|
if string_list:
|
||||||
field_domain = string_list[0][3:-1]
|
field_domain = string_list[0][3:-1]
|
||||||
self.copyvalue = "${{object.{} or {}}}".format(
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
field_domain,
|
field_domain, self.default_value or "''"
|
||||||
self.default_value or "''")
|
)
|
||||||
|
|
||||||
# compute the dynamic content for mako expression
|
# compute the dynamic content for mako expression
|
||||||
@api.multi
|
@api.multi
|
||||||
@@ -61,9 +62,7 @@ class AgreementClause(models.Model):
|
|||||||
MailTemplates = self.env["mail.template"]
|
MailTemplates = self.env["mail.template"]
|
||||||
for clause in self:
|
for clause in self:
|
||||||
lang = (
|
lang = (
|
||||||
clause.agreement_id
|
clause.agreement_id and clause.agreement_id.partner_id.lang or "en_US"
|
||||||
and clause.agreement_id.partner_id.lang
|
|
||||||
or "en_US"
|
|
||||||
)
|
)
|
||||||
content = MailTemplates.with_context(lang=lang)._render_template(
|
content = MailTemplates.with_context(lang=lang)._render_template(
|
||||||
clause.content, "agreement.clause", clause.id
|
clause.content, "agreement.clause", clause.id
|
||||||
|
|||||||
@@ -17,11 +17,8 @@ class AgreementIncreaseType(models.Model):
|
|||||||
"the contract.",
|
"the contract.",
|
||||||
)
|
)
|
||||||
description = fields.Text(
|
description = fields.Text(
|
||||||
string="Description",
|
string="Description", required=True, help="Description of the renewal type."
|
||||||
required=True,
|
|
||||||
help="Description of the renewal type."
|
|
||||||
)
|
)
|
||||||
increase_percent = fields.Integer(
|
increase_percent = fields.Integer(
|
||||||
string="Increase Percentage",
|
string="Increase Percentage", help="Percentage that the amount will increase."
|
||||||
help="Percentage that the amount will increase."
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,21 +8,11 @@ class AgreementLine(models.Model):
|
|||||||
_name = "agreement.line"
|
_name = "agreement.line"
|
||||||
_description = "Agreement Lines"
|
_description = "Agreement Lines"
|
||||||
|
|
||||||
product_id = fields.Many2one(
|
product_id = fields.Many2one("product.product", string="Product")
|
||||||
"product.product",
|
name = fields.Char(string="Description", required=True)
|
||||||
string="Product")
|
agreement_id = fields.Many2one("agreement", string="Agreement", ondelete="cascade")
|
||||||
name = fields.Char(
|
|
||||||
string="Description",
|
|
||||||
required=True)
|
|
||||||
agreement_id = fields.Many2one(
|
|
||||||
"agreement",
|
|
||||||
string="Agreement",
|
|
||||||
ondelete="cascade")
|
|
||||||
qty = fields.Float(string="Quantity")
|
qty = fields.Float(string="Quantity")
|
||||||
uom_id = fields.Many2one(
|
uom_id = fields.Many2one("uom.uom", string="Unit of Measure", required=True)
|
||||||
"uom.uom",
|
|
||||||
string="Unit of Measure",
|
|
||||||
required=True)
|
|
||||||
|
|
||||||
@api.onchange("product_id")
|
@api.onchange("product_id")
|
||||||
def _onchange_product_id(self):
|
def _onchange_product_id(self):
|
||||||
|
|||||||
@@ -11,32 +11,36 @@ class AgreementRecital(models.Model):
|
|||||||
|
|
||||||
name = fields.Char(string="Name", required=True)
|
name = fields.Char(string="Name", required=True)
|
||||||
title = fields.Char(
|
title = fields.Char(
|
||||||
string="Title",
|
string="Title", help="The title is displayed on the PDF." "The name is not."
|
||||||
help="The title is displayed on the PDF." "The name is not.")
|
)
|
||||||
sequence = fields.Integer(string="Sequence", default=10)
|
sequence = fields.Integer(string="Sequence", default=10)
|
||||||
content = fields.Html(string="Content")
|
content = fields.Html(string="Content")
|
||||||
dynamic_content = fields.Html(
|
dynamic_content = fields.Html(
|
||||||
compute="_compute_dynamic_content",
|
compute="_compute_dynamic_content",
|
||||||
string="Dynamic Content",
|
string="Dynamic Content",
|
||||||
help="compute dynamic Content")
|
help="compute dynamic Content",
|
||||||
agreement_id = fields.Many2one(
|
)
|
||||||
"agreement", string="Agreement", ondelete="cascade")
|
agreement_id = fields.Many2one("agreement", string="Agreement", ondelete="cascade")
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
help="If unchecked, it will allow you to hide this recital without "
|
help="If unchecked, it will allow you to hide this recital without "
|
||||||
"removing it.")
|
"removing it.",
|
||||||
|
)
|
||||||
|
|
||||||
# Dynamic field editor
|
# Dynamic field editor
|
||||||
field_domain = fields.Char(string='Field Expression',
|
field_domain = fields.Char(
|
||||||
default='[["active", "=", True]]')
|
string="Field Expression", default='[["active", "=", True]]'
|
||||||
|
)
|
||||||
default_value = fields.Char(
|
default_value = fields.Char(
|
||||||
string="Default Value",
|
string="Default Value",
|
||||||
help="Optional value to use if the target field is empty.")
|
help="Optional value to use if the target field is empty.",
|
||||||
|
)
|
||||||
copyvalue = fields.Char(
|
copyvalue = fields.Char(
|
||||||
string="Placeholder Expression",
|
string="Placeholder Expression",
|
||||||
help="""Final placeholder expression, to be copy-pasted in the desired
|
help="""Final placeholder expression, to be copy-pasted in the desired
|
||||||
template field.""")
|
template field.""",
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange("field_domain", "default_value")
|
@api.onchange("field_domain", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
@@ -46,8 +50,8 @@ class AgreementRecital(models.Model):
|
|||||||
if string_list:
|
if string_list:
|
||||||
field_domain = string_list[0][3:-1]
|
field_domain = string_list[0][3:-1]
|
||||||
self.copyvalue = "${{object.{} or {}}}".format(
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
field_domain,
|
field_domain, self.default_value or "''"
|
||||||
self.default_value or "''")
|
)
|
||||||
|
|
||||||
# compute the dynamic content for mako expression
|
# compute the dynamic content for mako expression
|
||||||
@api.multi
|
@api.multi
|
||||||
@@ -55,9 +59,9 @@ class AgreementRecital(models.Model):
|
|||||||
MailTemplates = self.env["mail.template"]
|
MailTemplates = self.env["mail.template"]
|
||||||
for recital in self:
|
for recital in self:
|
||||||
lang = (
|
lang = (
|
||||||
recital.agreement_id
|
recital.agreement_id and recital.agreement_id.partner_id.lang or "en_US"
|
||||||
and recital.agreement_id.partner_id.lang
|
)
|
||||||
or "en_US")
|
|
||||||
content = MailTemplates.with_context(lang=lang)._render_template(
|
content = MailTemplates.with_context(lang=lang)._render_template(
|
||||||
recital.content, "agreement.recital", recital.id)
|
recital.content, "agreement.recital", recital.id
|
||||||
|
)
|
||||||
recital.dynamic_content = content
|
recital.dynamic_content = content
|
||||||
|
|||||||
@@ -17,7 +17,5 @@ class AgreementRenewalType(models.Model):
|
|||||||
"agreement/contract expires.",
|
"agreement/contract expires.",
|
||||||
)
|
)
|
||||||
description = fields.Text(
|
description = fields.Text(
|
||||||
string="Description",
|
string="Description", required=True, help="Description of the renewal type."
|
||||||
required=True,
|
|
||||||
help="Description of the renewal type."
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -11,34 +11,39 @@ class AgreementSection(models.Model):
|
|||||||
|
|
||||||
name = fields.Char(string="Name", required=True)
|
name = fields.Char(string="Name", required=True)
|
||||||
title = fields.Char(
|
title = fields.Char(
|
||||||
string="Title",
|
string="Title", help="The title is displayed on the PDF. The name is not."
|
||||||
help="The title is displayed on the PDF. The name is not.")
|
)
|
||||||
sequence = fields.Integer(string="Sequence")
|
sequence = fields.Integer(string="Sequence")
|
||||||
agreement_id = fields.Many2one(
|
agreement_id = fields.Many2one("agreement", string="Agreement", ondelete="cascade")
|
||||||
"agreement", string="Agreement", ondelete="cascade")
|
|
||||||
clauses_ids = fields.One2many(
|
clauses_ids = fields.One2many(
|
||||||
"agreement.clause", "section_id", string="Clauses", copy=True)
|
"agreement.clause", "section_id", string="Clauses", copy=True
|
||||||
|
)
|
||||||
content = fields.Html(string="Section Content")
|
content = fields.Html(string="Section Content")
|
||||||
dynamic_content = fields.Html(
|
dynamic_content = fields.Html(
|
||||||
compute="_compute_dynamic_content",
|
compute="_compute_dynamic_content",
|
||||||
string="Dynamic Content",
|
string="Dynamic Content",
|
||||||
help="compute dynamic Content")
|
help="compute dynamic Content",
|
||||||
|
)
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
help="If unchecked, it will allow you to hide the agreement without "
|
help="If unchecked, it will allow you to hide the agreement without "
|
||||||
"removing it.")
|
"removing it.",
|
||||||
|
)
|
||||||
|
|
||||||
# Dynamic field editor
|
# Dynamic field editor
|
||||||
field_domain = fields.Char(string='Field Expression',
|
field_domain = fields.Char(
|
||||||
default='[["active", "=", True]]')
|
string="Field Expression", default='[["active", "=", True]]'
|
||||||
|
)
|
||||||
default_value = fields.Char(
|
default_value = fields.Char(
|
||||||
string="Default Value",
|
string="Default Value",
|
||||||
help="Optional value to use if the target field is empty.")
|
help="Optional value to use if the target field is empty.",
|
||||||
|
)
|
||||||
copyvalue = fields.Char(
|
copyvalue = fields.Char(
|
||||||
string="Placeholder Expression",
|
string="Placeholder Expression",
|
||||||
help="""Final placeholder expression, to be copy-pasted in the desired
|
help="""Final placeholder expression, to be copy-pasted in the desired
|
||||||
template field.""")
|
template field.""",
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange("field_domain", "default_value")
|
@api.onchange("field_domain", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
@@ -48,16 +53,18 @@ class AgreementSection(models.Model):
|
|||||||
if string_list:
|
if string_list:
|
||||||
field_domain = string_list[0][3:-1]
|
field_domain = string_list[0][3:-1]
|
||||||
self.copyvalue = "${{object.{} or {}}}".format(
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
field_domain,
|
field_domain, self.default_value or "''"
|
||||||
self.default_value or "''")
|
)
|
||||||
|
|
||||||
# compute the dynamic content for mako expression
|
# compute the dynamic content for mako expression
|
||||||
@api.multi
|
@api.multi
|
||||||
def _compute_dynamic_content(self):
|
def _compute_dynamic_content(self):
|
||||||
MailTemplates = self.env["mail.template"]
|
MailTemplates = self.env["mail.template"]
|
||||||
for section in self:
|
for section in self:
|
||||||
lang = (section.agreement_id and
|
lang = (
|
||||||
section.agreement_id.partner_id.lang or "en_US")
|
section.agreement_id and section.agreement_id.partner_id.lang or "en_US"
|
||||||
|
)
|
||||||
content = MailTemplates.with_context(lang=lang)._render_template(
|
content = MailTemplates.with_context(lang=lang)._render_template(
|
||||||
section.content, "agreement.section", section.id)
|
section.content, "agreement.section", section.id
|
||||||
|
)
|
||||||
section.dynamic_content = content
|
section.dynamic_content = content
|
||||||
|
|||||||
@@ -11,21 +11,14 @@ class AgreementStage(models.Model):
|
|||||||
_order = "sequence"
|
_order = "sequence"
|
||||||
|
|
||||||
# General
|
# General
|
||||||
name = fields.Char(
|
name = fields.Char(string="Stage Name", required=True)
|
||||||
string="Stage Name",
|
description = fields.Text(string="Description", required=False)
|
||||||
required=True)
|
sequence = fields.Integer(string="Sequence", default="1", required=False)
|
||||||
description = fields.Text(
|
|
||||||
string="Description",
|
|
||||||
required=False)
|
|
||||||
sequence = fields.Integer(
|
|
||||||
string="Sequence",
|
|
||||||
default="1",
|
|
||||||
required=False)
|
|
||||||
fold = fields.Boolean(
|
fold = fields.Boolean(
|
||||||
string="Is Folded",
|
string="Is Folded",
|
||||||
required=False,
|
required=False,
|
||||||
help="This stage is folded in the kanban view by default.",
|
help="This stage is folded in the kanban view by default.",
|
||||||
)
|
)
|
||||||
stage_type = fields.Selection(
|
stage_type = fields.Selection(
|
||||||
[('agreement', 'Agreement')],
|
[("agreement", "Agreement")], string="Type", required=True
|
||||||
string='Type', required=True)
|
)
|
||||||
|
|||||||
@@ -9,6 +9,4 @@ class AgreementSubtype(models.Model):
|
|||||||
_description = "Agreement Subtypes"
|
_description = "Agreement Subtypes"
|
||||||
|
|
||||||
name = fields.Char(string="Name", required=True)
|
name = fields.Char(string="Name", required=True)
|
||||||
agreement_type_id = fields.Many2one(
|
agreement_type_id = fields.Many2one("agreement.type", string="Agreement Type")
|
||||||
"agreement.type",
|
|
||||||
string="Agreement Type")
|
|
||||||
|
|||||||
@@ -9,7 +9,5 @@ class AgreementType(models.Model):
|
|||||||
_description = "Agreement Types"
|
_description = "Agreement Types"
|
||||||
|
|
||||||
agreement_subtypes_ids = fields.One2many(
|
agreement_subtypes_ids = fields.One2many(
|
||||||
"agreement.subtype",
|
"agreement.subtype", "agreement_type_id", string="Subtypes"
|
||||||
"agreement_type_id",
|
|
||||||
string="Subtypes"
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,4 @@ from odoo import fields, models
|
|||||||
class Product(models.Model):
|
class Product(models.Model):
|
||||||
_inherit = "product.template"
|
_inherit = "product.template"
|
||||||
|
|
||||||
agreements_ids = fields.Many2many(
|
agreements_ids = fields.Many2many("agreement", string="Agreements")
|
||||||
"agreement",
|
|
||||||
string="Agreements")
|
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
module_agreement_repair = fields.Boolean(
|
module_agreement_repair = fields.Boolean(
|
||||||
string="Link your repair orders to an agreement."
|
string="Link your repair orders to an agreement."
|
||||||
)
|
)
|
||||||
module_agreement_rma = fields.Boolean(
|
module_agreement_rma = fields.Boolean(string="Link your RMAs to an agreement.")
|
||||||
string="Link your RMAs to an agreement.")
|
|
||||||
module_agreement_sale = fields.Boolean(
|
module_agreement_sale = fields.Boolean(
|
||||||
string="Create an agreement when the sale order is confirmed."
|
string="Create an agreement when the sale order is confirmed."
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,7 +7,4 @@ from odoo import fields, models
|
|||||||
class Partner(models.Model):
|
class Partner(models.Model):
|
||||||
_inherit = "res.partner"
|
_inherit = "res.partner"
|
||||||
|
|
||||||
agreement_ids = fields.One2many(
|
agreement_ids = fields.One2many("agreement", "partner_id", string="Agreements")
|
||||||
"agreement",
|
|
||||||
"partner_id",
|
|
||||||
string="Agreements")
|
|
||||||
|
|||||||
@@ -1,22 +1,21 @@
|
|||||||
<?xml version="1.0" ?>
|
<?xml version="1.0" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<report
|
<report
|
||||||
id="partner_agreement_contract_document"
|
id="partner_agreement_contract_document"
|
||||||
model="agreement"
|
model="agreement"
|
||||||
string="Contract Document"
|
string="Contract Document"
|
||||||
name="agreement_legal.report_agreement_document"
|
name="agreement_legal.report_agreement_document"
|
||||||
file="agreement_legal.report_agreement_document"
|
file="agreement_legal.report_agreement_document"
|
||||||
report_type="qweb-pdf"/>
|
report_type="qweb-pdf"
|
||||||
|
/>
|
||||||
<report
|
<report
|
||||||
id="partner_agreement_contract_document_preview"
|
id="partner_agreement_contract_document_preview"
|
||||||
model="agreement"
|
model="agreement"
|
||||||
string="Contract Document Preview"
|
string="Contract Document Preview"
|
||||||
name="agreement_legal.report_agreement_document"
|
name="agreement_legal.report_agreement_document"
|
||||||
file="agreement_legal.report_agreement_document"
|
file="agreement_legal.report_agreement_document"
|
||||||
report_type="qweb-html"/>
|
report_type="qweb-html"
|
||||||
|
/>
|
||||||
<template id="report_agreement_document">
|
<template id="report_agreement_document">
|
||||||
<t t-name="agreement.report_agreement_document">
|
<t t-name="agreement.report_agreement_document">
|
||||||
<t t-call="web.html_container">
|
<t t-call="web.html_container">
|
||||||
@@ -36,19 +35,27 @@
|
|||||||
<t t-if="not doc.use_parties_content">
|
<t t-if="not doc.use_parties_content">
|
||||||
<h3>Company Information</h3>
|
<h3>Company Information</h3>
|
||||||
<div name="company_address">
|
<div name="company_address">
|
||||||
<address t-field="doc.company_id.partner_id"
|
<address
|
||||||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
|
t-field="doc.company_id.partner_id"
|
||||||
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div name="company_contact">
|
<div name="company_contact">
|
||||||
Represented by <span t-field="doc.company_contact_id.name"/>.
|
Represented by <span
|
||||||
|
t-field="doc.company_contact_id.name"
|
||||||
|
/>.
|
||||||
</div>
|
</div>
|
||||||
<h3>Partner Information</h3>
|
<h3>Partner Information</h3>
|
||||||
<div name="partner_address">
|
<div name="partner_address">
|
||||||
<address t-field="doc.partner_id"
|
<address
|
||||||
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
|
t-field="doc.partner_id"
|
||||||
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div name="partner_contact">
|
<div name="partner_contact">
|
||||||
Represented by <span t-field="doc.partner_contact_id.name"/>.
|
Represented by <span
|
||||||
|
t-field="doc.partner_contact_id.name"
|
||||||
|
/>.
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<h2>Agreement</h2>
|
<h2>Agreement</h2>
|
||||||
@@ -58,7 +65,10 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<ol>
|
<ol>
|
||||||
<li t-foreach="doc.recital_ids" t-as="r">
|
<li
|
||||||
|
t-foreach="doc.recital_ids"
|
||||||
|
t-as="r"
|
||||||
|
>
|
||||||
<t t-if="r.title">
|
<t t-if="r.title">
|
||||||
<h3 t-field="r.title" />
|
<h3 t-field="r.title" />
|
||||||
</t>
|
</t>
|
||||||
@@ -74,17 +84,25 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<ol>
|
<ol>
|
||||||
<li t-foreach="doc.sections_ids" t-as="s">
|
<li
|
||||||
|
t-foreach="doc.sections_ids"
|
||||||
|
t-as="s"
|
||||||
|
>
|
||||||
<t t-if="s.title">
|
<t t-if="s.title">
|
||||||
<h3 t-field="s.title" />
|
<h3 t-field="s.title" />
|
||||||
</t>
|
</t>
|
||||||
<p t-field="s.dynamic_content" />
|
<p t-field="s.dynamic_content" />
|
||||||
<ol>
|
<ol>
|
||||||
<li t-foreach="s.clauses_ids" t-as="c">
|
<li
|
||||||
|
t-foreach="s.clauses_ids"
|
||||||
|
t-as="c"
|
||||||
|
>
|
||||||
<t t-if="c.title">
|
<t t-if="c.title">
|
||||||
<h4 t-field="c.title" />
|
<h4 t-field="c.title" />
|
||||||
</t>
|
</t>
|
||||||
<p t-field="c.dynamic_content"/>
|
<p
|
||||||
|
t-field="c.dynamic_content"
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
@@ -113,10 +131,14 @@
|
|||||||
<p t-field="doc.partner_id" />
|
<p t-field="doc.partner_id" />
|
||||||
<p>By: </p>
|
<p>By: </p>
|
||||||
<p>
|
<p>
|
||||||
Name: <span t-field="doc.partner_contact_id.name"/>
|
Name: <span
|
||||||
|
t-field="doc.partner_contact_id.name"
|
||||||
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Title: <span t-field="doc.partner_contact_id.function"/>
|
Title: <span
|
||||||
|
t-field="doc.partner_contact_id.function"
|
||||||
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p>Date: </p>
|
<p>Date: </p>
|
||||||
</td>
|
</td>
|
||||||
@@ -124,10 +146,14 @@
|
|||||||
<p t-field="doc.company_id.partner_id" />
|
<p t-field="doc.company_id.partner_id" />
|
||||||
<p>By: </p>
|
<p>By: </p>
|
||||||
<p>
|
<p>
|
||||||
Name: <span t-field="doc.company_contact_id.name"/>
|
Name: <span
|
||||||
|
t-field="doc.company_contact_id.name"
|
||||||
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Title: <span t-field="doc.company_contact_id.function"/>
|
Title: <span
|
||||||
|
t-field="doc.company_contact_id.function"
|
||||||
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p>Date: </p>
|
<p>Date: </p>
|
||||||
</td>
|
</td>
|
||||||
@@ -137,8 +163,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div t-foreach="doc.appendix_ids" t-as="a">
|
<div t-foreach="doc.appendix_ids" t-as="a">
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<h1 t-field="a.title"
|
<h1
|
||||||
style="page-break-before: always;"/>
|
t-field="a.title"
|
||||||
|
style="page-break-before: always;"
|
||||||
|
/>
|
||||||
<p t-field="a.dynamic_content" />
|
<p t-field="a.dynamic_content" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,5 +175,4 @@
|
|||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -4,27 +4,29 @@
|
|||||||
<field name="name">Agreement</field>
|
<field name="name">Agreement</field>
|
||||||
<field name="sequence">17</field>
|
<field name="sequence">17</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Readonly group -->
|
<!-- Readonly group -->
|
||||||
<record id="group_agreement_readonly" model="res.groups">
|
<record id="group_agreement_readonly" model="res.groups">
|
||||||
<field name="name">Read-Only Users</field>
|
<field name="name">Read-Only Users</field>
|
||||||
<field name="category_id" ref="module_agreement_legal_category" />
|
<field name="category_id" ref="module_agreement_legal_category" />
|
||||||
<field name="implied_ids" eval="[(4, ref('base.group_user')), (4, ref('agreement.group_use_agreement_type')), (4, ref('agreement.group_use_agreement_template'))]"/>
|
<field
|
||||||
|
name="implied_ids"
|
||||||
|
eval="[(4, ref('base.group_user')), (4, ref('agreement.group_use_agreement_type')), (4, ref('agreement.group_use_agreement_template'))]"
|
||||||
|
/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- User group -->
|
<!-- User group -->
|
||||||
<record id="group_agreement_user" model="res.groups">
|
<record id="group_agreement_user" model="res.groups">
|
||||||
<field name="name">User</field>
|
<field name="name">User</field>
|
||||||
<field name="category_id" ref="module_agreement_legal_category" />
|
<field name="category_id" ref="module_agreement_legal_category" />
|
||||||
<field name="implied_ids" eval="[(4, ref('group_agreement_readonly'))]" />
|
<field name="implied_ids" eval="[(4, ref('group_agreement_readonly'))]" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Manager group -->
|
<!-- Manager group -->
|
||||||
<record id="group_agreement_manager" model="res.groups">
|
<record id="group_agreement_manager" model="res.groups">
|
||||||
<field name="name">Manager</field>
|
<field name="name">Manager</field>
|
||||||
<field name="category_id" ref="module_agreement_legal_category" />
|
<field name="category_id" ref="module_agreement_legal_category" />
|
||||||
<field name="implied_ids" eval="[(4, ref('group_agreement_user'))]" />
|
<field name="implied_ids" eval="[(4, ref('group_agreement_user'))]" />
|
||||||
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
<field
|
||||||
|
name="users"
|
||||||
|
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
||||||
|
/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
odoo.define('agreement_legal.domain_widget_ext', function (require) {
|
odoo.define("agreement_legal.domain_widget_ext", function(require) {
|
||||||
'use strict';
|
"use strict";
|
||||||
|
|
||||||
var basic_fields = require('web.basic_fields');
|
var basic_fields = require("web.basic_fields");
|
||||||
var DomainSelector = require('web.DomainSelector');
|
var DomainSelector = require("web.DomainSelector");
|
||||||
var session = require('web.session');
|
var session = require("web.session");
|
||||||
var core = require('web.core');
|
var core = require("web.core");
|
||||||
var qweb = core.qweb;
|
var qweb = core.qweb;
|
||||||
var _t = core._t;
|
var _t = core._t;
|
||||||
|
|
||||||
@@ -42,12 +42,16 @@ odoo.define('agreement_legal.domain_widget_ext', function (require) {
|
|||||||
var def;
|
var def;
|
||||||
if (!this.domainSelector) {
|
if (!this.domainSelector) {
|
||||||
this.domainSelector = new DomainSelector(
|
this.domainSelector = new DomainSelector(
|
||||||
this, this._domainModel, value, {
|
this,
|
||||||
|
this._domainModel,
|
||||||
|
value,
|
||||||
|
{
|
||||||
readonly: this.mode === "readonly" || this.inDialog,
|
readonly: this.mode === "readonly" || this.inDialog,
|
||||||
filters: this.fsFilters,
|
filters: this.fsFilters,
|
||||||
debugMode: session.debug,
|
debugMode: session.debug,
|
||||||
partialUse: this.partialUse || false,
|
partialUse: this.partialUse || false,
|
||||||
});
|
}
|
||||||
|
);
|
||||||
def = this.domainSelector.prependTo(this.$el);
|
def = this.domainSelector.prependTo(this.$el);
|
||||||
} else {
|
} else {
|
||||||
def = this.domainSelector.setDomain(value);
|
def = this.domainSelector.setDomain(value);
|
||||||
@@ -67,13 +71,15 @@ odoo.define('agreement_legal.domain_widget_ext', function (require) {
|
|||||||
if (this._$content) {
|
if (this._$content) {
|
||||||
this._$content.remove();
|
this._$content.remove();
|
||||||
}
|
}
|
||||||
this._$content = $(qweb.render("FieldDomain.content", {
|
this._$content = $(
|
||||||
hasModel: !!this._domainModel,
|
qweb.render("FieldDomain.content", {
|
||||||
isValid: !!this._isValidForModel,
|
hasModel: Boolean(this._domainModel),
|
||||||
|
isValid: Boolean(this._isValidForModel),
|
||||||
nbRecords: this.record.specialData[this.name].nbRecords || 0,
|
nbRecords: this.record.specialData[this.name].nbRecords || 0,
|
||||||
inDialogEdit: this.inDialog && this.mode === "edit",
|
inDialogEdit: this.inDialog && this.mode === "edit",
|
||||||
partialUse: this.partialUse || false,
|
partialUse: this.partialUse || false,
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
this._$content.appendTo(this.$el);
|
this._$content.appendTo(this.$el);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,57 +18,85 @@
|
|||||||
</t>
|
</t>
|
||||||
<t t-if="!partialUse">
|
<t t-if="!partialUse">
|
||||||
<div t-if="hasModel" class="o_field_domain_panel">
|
<div t-if="hasModel" class="o_field_domain_panel">
|
||||||
<i class="fa fa-arrow-right" role="img" aria-label="Domain" title="Domain"/>
|
<i
|
||||||
|
class="fa fa-arrow-right"
|
||||||
<button t-if="isValid" class="btn btn-sm btn-secondary o_domain_show_selection_button" type="button">
|
role="img"
|
||||||
|
aria-label="Domain"
|
||||||
|
title="Domain"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
t-if="isValid"
|
||||||
|
class="btn btn-sm btn-secondary o_domain_show_selection_button"
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
<t t-esc="nbRecords" /> record(s)
|
<t t-esc="nbRecords" /> record(s)
|
||||||
</button>
|
</button>
|
||||||
<span t-else="" class="text-warning" role="alert"><i class="fa fa-exclamation-triangle" role="img" aria-label="Warning" title="Warning"/> Invalid domain</span>
|
<span t-else="" class="text-warning" role="alert"><i
|
||||||
|
class="fa fa-exclamation-triangle"
|
||||||
<button t-if="inDialogEdit" class="btn btn-sm btn-primary o_field_domain_dialog_button">Edit Domain</button>
|
role="img"
|
||||||
|
aria-label="Warning"
|
||||||
|
title="Warning"
|
||||||
|
/> Invalid domain</span>
|
||||||
|
<button
|
||||||
|
t-if="inDialogEdit"
|
||||||
|
class="btn btn-sm btn-primary o_field_domain_dialog_button"
|
||||||
|
>Edit Domain</button>
|
||||||
</div>
|
</div>
|
||||||
<div t-else="">Select a model to add a filter.</div>
|
<div t-else="">Select a model to add a filter.</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
<div
|
||||||
<div aria-atomic="true" t-name="DomainSelector" t-attf-class="o_domain_node o_domain_tree o_domain_selector #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
|
aria-atomic="true"
|
||||||
|
t-name="DomainSelector"
|
||||||
|
t-attf-class="o_domain_node o_domain_tree o_domain_selector #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}"
|
||||||
|
>
|
||||||
<t t-if="widget.options.partialUse">
|
<t t-if="widget.options.partialUse">
|
||||||
<t t-if="widget.children.length === 0">
|
<t t-if="widget.children.length === 0">
|
||||||
<span>SMatch <strong>all records</strong></span>
|
<span>SMatch <strong>all records</strong></span>
|
||||||
<button t-if="!widget.readonly" class="btn btn-sm btn-primary o_domain_add_first_node_button"><i class="fa fa-plus"/> Add filter</button>
|
<button
|
||||||
|
t-if="!widget.readonly"
|
||||||
|
class="btn btn-sm btn-primary o_domain_add_first_node_button"
|
||||||
|
><i class="fa fa-plus" /> Add filter</button>
|
||||||
</t>
|
</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
<div class="o_domain_tree_header">
|
<div class="o_domain_tree_header">
|
||||||
<t t-if="widget.children.length === 1">Please navigate below and select field:</t>
|
<t
|
||||||
|
t-if="widget.children.length === 1"
|
||||||
|
>Please navigate below and select field:</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
<span>SSMatch records with</span>
|
<span>SSMatch records with</span>
|
||||||
<t t-call="DomainTree.OperatorSelector" />
|
<t t-call="DomainTree.OperatorSelector" />
|
||||||
<span>of the following rules:</span>
|
<span>of the following rules:</span>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="o_domain_node_children_container" />
|
<div class="o_domain_node_children_container" />
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="!widget.options.partialUse">
|
<t t-if="!widget.options.partialUse">
|
||||||
<t t-if="widget.children.length === 0">
|
<t t-if="widget.children.length === 0">
|
||||||
<span>Match <strong>all records</strong></span>
|
<span>Match <strong>all records</strong></span>
|
||||||
<button t-if="!widget.readonly" class="btn btn-sm btn-primary o_domain_add_first_node_button"><i class="fa fa-plus"/> Add filter</button>
|
<button
|
||||||
|
t-if="!widget.readonly"
|
||||||
|
class="btn btn-sm btn-primary o_domain_add_first_node_button"
|
||||||
|
><i class="fa fa-plus" /> Add filter</button>
|
||||||
</t>
|
</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
<div class="o_domain_tree_header">
|
<div class="o_domain_tree_header">
|
||||||
<t t-if="widget.children.length === 1">Match records with the following rule:</t>
|
<t
|
||||||
|
t-if="widget.children.length === 1"
|
||||||
|
>Match records with the following rule:</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
<span>Match records with</span>
|
<span>Match records with</span>
|
||||||
<t t-call="DomainTree.OperatorSelector" />
|
<t t-call="DomainTree.OperatorSelector" />
|
||||||
<span>of the following rules:</span>
|
<span>of the following rules:</span>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="o_domain_node_children_container" />
|
<div class="o_domain_node_children_container" />
|
||||||
</t>
|
</t>
|
||||||
|
<label
|
||||||
<label t-if="widget.debug && !widget.readonly" class="o_domain_debug_container">
|
t-if="widget.debug && !widget.readonly"
|
||||||
|
class="o_domain_debug_container"
|
||||||
|
>
|
||||||
<span class="small"># Code editor</span>
|
<span class="small"># Code editor</span>
|
||||||
<input type="text" class="o_domain_debug_input" />
|
<input type="text" class="o_domain_debug_input" />
|
||||||
</label>
|
</label>
|
||||||
@@ -76,38 +104,78 @@
|
|||||||
</div>
|
</div>
|
||||||
<t t-name="DomainNode.ControlPanel">
|
<t t-name="DomainNode.ControlPanel">
|
||||||
<t t-if="widget.options.partialUse">
|
<t t-if="widget.options.partialUse">
|
||||||
<div t-if="!widget.readonly && !widget.noControlPanel" class="o_domain_node_control_panel" role="toolbar" aria-label="Domain node">
|
<div
|
||||||
|
t-if="!widget.readonly && !widget.noControlPanel"
|
||||||
|
class="o_domain_node_control_panel"
|
||||||
|
role="toolbar"
|
||||||
|
aria-label="Domain node"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="!widget.options.partialUse">
|
<t t-if="!widget.options.partialUse">
|
||||||
<div t-if="!widget.readonly && !widget.noControlPanel" class="o_domain_node_control_panel" role="toolbar" aria-label="Domain node">
|
<div
|
||||||
<button class="btn o_domain_delete_node_button" title="Delete node" aria-label="Delete node"><i class="fa fa-times"/></button>
|
t-if="!widget.readonly && !widget.noControlPanel"
|
||||||
<button class="btn o_domain_add_node_button" title="Add node" aria-label="Add node"><i class="fa fa-plus-circle"/></button>
|
class="o_domain_node_control_panel"
|
||||||
<button class="btn o_domain_add_node_button" title="Add branch" aria-label="Add branch" data-branch="1"><i class="fa fa-ellipsis-h"/></button>
|
role="toolbar"
|
||||||
|
aria-label="Domain node"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
class="btn o_domain_delete_node_button"
|
||||||
|
title="Delete node"
|
||||||
|
aria-label="Delete node"
|
||||||
|
>
|
||||||
|
<i class="fa fa-times" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn o_domain_add_node_button"
|
||||||
|
title="Add node"
|
||||||
|
aria-label="Add node"
|
||||||
|
>
|
||||||
|
<i class="fa fa-plus-circle" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn o_domain_add_node_button"
|
||||||
|
title="Add branch"
|
||||||
|
aria-label="Add branch"
|
||||||
|
data-branch="1"
|
||||||
|
>
|
||||||
|
<i class="fa fa-ellipsis-h" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<div t-name="DomainLeaf" t-attf-class="o_domain_node o_domain_leaf o_domain_selector_row #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
|
<div
|
||||||
|
t-name="DomainLeaf"
|
||||||
|
t-attf-class="o_domain_node o_domain_leaf o_domain_selector_row #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}"
|
||||||
|
>
|
||||||
<t t-call="DomainNode.ControlPanel" />
|
<t t-call="DomainNode.ControlPanel" />
|
||||||
|
|
||||||
<div t-if="!widget.readonly" class="o_domain_leaf_edition">
|
<div t-if="!widget.readonly" class="o_domain_leaf_edition">
|
||||||
<!-- field selector will be instantiated here -->
|
<!-- field selector will be instantiated here -->
|
||||||
<t t-if="!widget.options.partialUse">
|
<t t-if="!widget.options.partialUse">
|
||||||
<div> <!-- used for flex stretching -->
|
<div>
|
||||||
|
<!-- used for flex stretching -->
|
||||||
<select class="o_domain_leaf_operator_select o_input">
|
<select class="o_domain_leaf_operator_select o_input">
|
||||||
<option t-foreach="widget.operators" t-as="key"
|
<option
|
||||||
|
t-foreach="widget.operators"
|
||||||
|
t-as="key"
|
||||||
t-att-value="key"
|
t-att-value="key"
|
||||||
t-att-selected="widget.displayOperator === key ? 'selected' : None">
|
t-att-selected="widget.displayOperator === key ? 'selected' : None"
|
||||||
|
>
|
||||||
<t t-esc="key_value" />
|
<t t-esc="key_value" />
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div t-attf-class="o_ds_value_cell#{_.contains(['set', 'not set'], widget.displayOperator) ? ' d-none' : ''}">
|
<div
|
||||||
|
t-attf-class="o_ds_value_cell#{_.contains(['set', 'not set'], widget.displayOperator) ? ' d-none' : ''}"
|
||||||
|
>
|
||||||
<t t-if="widget.selectionChoices !== null">
|
<t t-if="widget.selectionChoices !== null">
|
||||||
<select class="o_domain_leaf_value_input o_input">
|
<select class="o_domain_leaf_value_input o_input">
|
||||||
<option t-foreach="widget.selectionChoices" t-as="val"
|
<option
|
||||||
|
t-foreach="widget.selectionChoices"
|
||||||
|
t-as="val"
|
||||||
t-att-value="val[0]"
|
t-att-value="val[0]"
|
||||||
t-att-selected="_.contains(val, widget.displayValue) ? 'selected' : None">
|
t-att-selected="_.contains(val, widget.displayValue) ? 'selected' : None"
|
||||||
|
>
|
||||||
<t t-esc="val[1]" />
|
<t t-esc="val[1]" />
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -115,17 +183,40 @@
|
|||||||
<t t-else="">
|
<t t-else="">
|
||||||
<t t-if="_.contains(['in', 'not in'], widget.operator)">
|
<t t-if="_.contains(['in', 'not in'], widget.operator)">
|
||||||
<div class="o_domain_leaf_value_input">
|
<div class="o_domain_leaf_value_input">
|
||||||
<span class="badge badge-pill" t-foreach="widget.displayValue" t-as="val">
|
<span
|
||||||
<t t-esc="val"/> <i class="o_domain_leaf_value_remove_tag_button fa fa-times" t-att-data-value="val" role="img" aria-label="Remove tag" title="Remove tag"/>
|
class="badge badge-pill"
|
||||||
|
t-foreach="widget.displayValue"
|
||||||
|
t-as="val"
|
||||||
|
>
|
||||||
|
<t t-esc="val" />
|
||||||
|
<i
|
||||||
|
class="o_domain_leaf_value_remove_tag_button fa fa-times"
|
||||||
|
t-att-data-value="val"
|
||||||
|
role="img"
|
||||||
|
aria-label="Remove tag"
|
||||||
|
title="Remove tag"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_domain_leaf_value_tags">
|
<div class="o_domain_leaf_value_tags">
|
||||||
<input placeholder="Add new value" type="text" class="o_input"/>
|
<input
|
||||||
<button class="btn btn-sm btn-primary fa fa-plus o_domain_leaf_value_add_tag_button" aria-label="Add tag" title="Add tag"/>
|
placeholder="Add new value"
|
||||||
|
type="text"
|
||||||
|
class="o_input"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
class="btn btn-sm btn-primary fa fa-plus o_domain_leaf_value_add_tag_button"
|
||||||
|
aria-label="Add tag"
|
||||||
|
title="Add tag"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
<input class="o_domain_leaf_value_input o_input" type="text" t-att-value="widget.displayValue"/>
|
<input
|
||||||
|
class="o_domain_leaf_value_input o_input"
|
||||||
|
type="text"
|
||||||
|
t-att-value="widget.displayValue"
|
||||||
|
/>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
@@ -134,44 +225,84 @@
|
|||||||
<div t-else="" class="o_domain_leaf_info">
|
<div t-else="" class="o_domain_leaf_info">
|
||||||
<!-- field selector will be instantiated here -->
|
<!-- field selector will be instantiated here -->
|
||||||
<t t-if="_.isString(widget.value)">
|
<t t-if="_.isString(widget.value)">
|
||||||
<span class="o_domain_leaf_operator"><t t-esc="widget.operator_mapping[widget.operator]"/></span>
|
<span class="o_domain_leaf_operator">
|
||||||
<span class="o_domain_leaf_value text-primary">"<t t-esc="widget.value"/>"</span>
|
<t t-esc="widget.operator_mapping[widget.operator]" />
|
||||||
|
</span>
|
||||||
|
<span class="o_domain_leaf_value text-primary">"<t
|
||||||
|
t-esc="widget.value"
|
||||||
|
/>"</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="_.isArray(widget.value)">
|
<t t-if="_.isArray(widget.value)">
|
||||||
<span class="o_domain_leaf_operator"><t t-esc="widget.operator_mapping[widget.operator]"/></span>
|
<span class="o_domain_leaf_operator">
|
||||||
|
<t t-esc="widget.operator_mapping[widget.operator]" />
|
||||||
|
</span>
|
||||||
<t t-foreach="widget.value" t-as="v">
|
<t t-foreach="widget.value" t-as="v">
|
||||||
<span class="o_domain_leaf_value text-primary">"<t t-esc="v"/>"</span>
|
<span class="o_domain_leaf_value text-primary">"<t
|
||||||
|
t-esc="v"
|
||||||
|
/>"</span>
|
||||||
<t t-if="!v_last"> or </t>
|
<t t-if="!v_last"> or </t>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="_.isNumber(widget.value)">
|
<t t-if="_.isNumber(widget.value)">
|
||||||
<span class="o_domain_leaf_operator"><t t-esc="widget.operator_mapping[widget.operator]"/></span>
|
<span class="o_domain_leaf_operator">
|
||||||
<span class="o_domain_leaf_value text-primary"><t t-esc="widget.value"></t></span>
|
<t t-esc="widget.operator_mapping[widget.operator]" />
|
||||||
|
</span>
|
||||||
|
<span class="o_domain_leaf_value text-primary">
|
||||||
|
<t t-esc="widget.value" />
|
||||||
|
</span>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="_.isBoolean(widget.value)">
|
<t t-if="_.isBoolean(widget.value)">
|
||||||
is
|
is
|
||||||
<t t-if="widget.operator === '=' && widget.value === false || widget.operator === '!=' && widget.value === true">not</t>
|
<t
|
||||||
|
t-if="widget.operator === '=' && widget.value === false || widget.operator === '!=' && widget.value === true"
|
||||||
|
>not</t>
|
||||||
set
|
set
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div aria-atomic="true" t-name="ModelFieldSelector" t-attf-class="o_field_selector#{!widget.options.readonly ? ' o_edit_mode o_input' : ''}">
|
<div
|
||||||
|
aria-atomic="true"
|
||||||
|
t-name="ModelFieldSelector"
|
||||||
|
t-attf-class="o_field_selector#{!widget.options.readonly ? ' o_edit_mode o_input' : ''}"
|
||||||
|
>
|
||||||
<div class="o_field_selector_value" tabindex="0" />
|
<div class="o_field_selector_value" tabindex="0" />
|
||||||
<t t-if="!widget.options.partialUse">
|
<t t-if="!widget.options.partialUse">
|
||||||
<div class="o_field_selector_controls" tabindex="0">
|
<div class="o_field_selector_controls" tabindex="0">
|
||||||
<i role="alert" class="fa fa-exclamation-triangle o_field_selector_warning d-none" title="Invalid field chain" aria-label="Invalid field chain"/>
|
<i
|
||||||
|
role="alert"
|
||||||
|
class="fa fa-exclamation-triangle o_field_selector_warning d-none"
|
||||||
|
title="Invalid field chain"
|
||||||
|
aria-label="Invalid field chain"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<div t-if="!widget.options.readonly" class="o_field_selector_popover d-none" tabindex="0">
|
<div
|
||||||
|
t-if="!widget.options.readonly"
|
||||||
|
class="o_field_selector_popover d-none"
|
||||||
|
tabindex="0"
|
||||||
|
>
|
||||||
<div class="o_field_selector_popover_header text-center">
|
<div class="o_field_selector_popover_header text-center">
|
||||||
<i class="fa fa-arrow-left o_field_selector_popover_option o_field_selector_prev_page" title="Previous" role="img" aria-label="Previous"/>
|
<i
|
||||||
|
class="fa fa-arrow-left o_field_selector_popover_option o_field_selector_prev_page"
|
||||||
|
title="Previous"
|
||||||
|
role="img"
|
||||||
|
aria-label="Previous"
|
||||||
|
/>
|
||||||
<div class="o_field_selector_title" />
|
<div class="o_field_selector_title" />
|
||||||
<i class="fa fa-times o_field_selector_popover_option o_field_selector_close" title="Close" role="img" aria-label="Close"/>
|
<i
|
||||||
|
class="fa fa-times o_field_selector_popover_option o_field_selector_close"
|
||||||
|
title="Close"
|
||||||
|
role="img"
|
||||||
|
aria-label="Close"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_field_selector_popover_body">
|
<div class="o_field_selector_popover_body">
|
||||||
<ul class="o_field_selector_page" />
|
<ul class="o_field_selector_page" />
|
||||||
</div>
|
</div>
|
||||||
<div t-if="widget.options.debugMode" class="o_field_selector_popover_footer">
|
<div
|
||||||
|
t-if="widget.options.debugMode"
|
||||||
|
class="o_field_selector_popover_footer"
|
||||||
|
>
|
||||||
<input type="text" class="o_input" />
|
<input type="text" class="o_input" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
<template
|
||||||
<template id="assets_backend" name="agreement_legal assets"
|
id="assets_backend"
|
||||||
inherit_id="web.assets_backend">
|
name="agreement_legal assets"
|
||||||
|
inherit_id="web.assets_backend"
|
||||||
|
>
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript"
|
<script
|
||||||
src="/agreement_legal/static/src/js/domain_widget_ext.js"/>
|
type="text/javascript"
|
||||||
|
src="/agreement_legal/static/src/js/domain_widget_ext.js"
|
||||||
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Agreement List View-->
|
<!-- Agreement List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_list_view">
|
<record model="ir.ui.view" id="partner_agreement_list_view">
|
||||||
<field name="name">Agreement List</field>
|
<field name="name">Agreement List</field>
|
||||||
@@ -25,7 +28,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Form View -->
|
<!-- Agreement Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_form_view">
|
<record model="ir.ui.view" id="partner_agreement_form_view">
|
||||||
<field name="name">Agreement Form</field>
|
<field name="name">Agreement Form</field>
|
||||||
@@ -34,15 +36,37 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Agreement">
|
<form string="Agreement">
|
||||||
<header>
|
<header>
|
||||||
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
|
<button
|
||||||
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
|
string="New Version"
|
||||||
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}" domain="[('stage_type', '=', 'agreement')]"/>
|
type="object"
|
||||||
|
name="create_new_version"
|
||||||
|
class="oe_highlight"
|
||||||
|
attrs="{'invisible': [('state', '=', 'active')]}"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
string="New Agreement"
|
||||||
|
type="object"
|
||||||
|
name="create_new_agreement"
|
||||||
|
class="oe_highlight"
|
||||||
|
attrs="{'invisible': [('is_template', '=', False)]}"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="stage_id"
|
||||||
|
widget="statusbar"
|
||||||
|
clickable="True"
|
||||||
|
options="{'fold_field': 'fold'}"
|
||||||
|
domain="[('stage_type', '=', 'agreement')]"
|
||||||
|
/>
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Agreement Name"/>
|
<label
|
||||||
|
for="name"
|
||||||
|
class="oe_edit_only"
|
||||||
|
string="Agreement Name"
|
||||||
|
/>
|
||||||
<h1>
|
<h1>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
</h1>
|
</h1>
|
||||||
@@ -50,32 +74,42 @@
|
|||||||
<group string="General">
|
<group string="General">
|
||||||
<group>
|
<group>
|
||||||
<field name="code" readonly="1" />
|
<field name="code" readonly="1" />
|
||||||
<field name="parent_agreement_id"
|
<field
|
||||||
domain="[('partner_id', '=', partner_id)]"/>
|
name="parent_agreement_id"
|
||||||
|
domain="[('partner_id', '=', partner_id)]"
|
||||||
|
/>
|
||||||
<field name="is_template" />
|
<field name="is_template" />
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement_type_id"
|
<field
|
||||||
|
name="agreement_type_id"
|
||||||
widget="selection"
|
widget="selection"
|
||||||
required="True"/>
|
required="True"
|
||||||
<field name="agreement_subtype_id"
|
/>
|
||||||
|
<field
|
||||||
|
name="agreement_subtype_id"
|
||||||
widget="selection"
|
widget="selection"
|
||||||
domain="[('agreement_type_id', '=', agreement_type_id)]"/>
|
domain="[('agreement_type_id', '=', agreement_type_id)]"
|
||||||
<field name="assigned_user_id"
|
/>
|
||||||
attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
|
<field
|
||||||
|
name="assigned_user_id"
|
||||||
|
attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"
|
||||||
|
/>
|
||||||
<field name="active" invisible="1" />
|
<field name="active" invisible="1" />
|
||||||
<field name="state" invisible="1" />
|
<field name="state" invisible="1" />
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group string="Description">
|
<group string="Description">
|
||||||
<field name="description"
|
<field name="description" required="True" nolabel="1" />
|
||||||
required="True"
|
|
||||||
nolabel="1"/>
|
|
||||||
</group>
|
</group>
|
||||||
<group class="oe_edit_only">
|
<group class="oe_edit_only">
|
||||||
<field name="field_domain" widget="domain" nolabel="1"
|
<field
|
||||||
|
name="field_domain"
|
||||||
|
widget="domain"
|
||||||
|
nolabel="1"
|
||||||
options="{'model': 'agreement',
|
options="{'model': 'agreement',
|
||||||
'partial_use': True}" />
|
'partial_use': True}"
|
||||||
|
/>
|
||||||
<group>
|
<group>
|
||||||
<field name="default_value" />
|
<field name="default_value" />
|
||||||
<field name="copyvalue" />
|
<field name="copyvalue" />
|
||||||
@@ -85,105 +119,178 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li>Select the agreement field using the popup</li>
|
<li>Select the agreement field using the popup</li>
|
||||||
<li>Enter the default value if the field is empty</li>
|
<li>Enter the default value if the field is empty</li>
|
||||||
<li>Copy and paste the placeholder expression in the description or the special terms</li>
|
<li
|
||||||
|
>Copy and paste the placeholder expression in the description or the special terms</li>
|
||||||
</ol>
|
</ol>
|
||||||
</p>
|
</p>
|
||||||
</group>
|
</group>
|
||||||
<group name="parties" string="Parties">
|
<group name="parties" string="Parties">
|
||||||
<group name="cust_parties">
|
<group name="cust_parties">
|
||||||
<field name="use_parties_content" string="Use custom content" />
|
<field
|
||||||
|
name="use_parties_content"
|
||||||
|
string="Use custom content"
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
<group name="cust_parties">
|
<group name="cust_parties">
|
||||||
<p>
|
<p>
|
||||||
This section (on the left) allows you to replace the default listing of the parties with custom dynamic content.
|
This section (on the left) allows you to replace the default listing of the parties with custom dynamic content.
|
||||||
</p>
|
</p>
|
||||||
</group>
|
</group>
|
||||||
<group name="partner"
|
<group name="partner" string="Partner">
|
||||||
string="Partner">
|
|
||||||
<div class="o_address_format">
|
<div class="o_address_format">
|
||||||
<field name="partner_id"
|
<field
|
||||||
|
name="partner_id"
|
||||||
domain="['|',('customer', '=', True),('supplier', '=', True)]"
|
domain="['|',('customer', '=', True),('supplier', '=', True)]"
|
||||||
context="{'show_address': 1}"
|
context="{'show_address': 1}"
|
||||||
options="{"always_reload": True}"/>
|
options="{"always_reload": True}"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<group name="company"
|
<group name="company" string="Company">
|
||||||
string="Company">
|
|
||||||
<div class="o_address_format">
|
<div class="o_address_format">
|
||||||
<field name="company_id"
|
<field
|
||||||
|
name="company_id"
|
||||||
readonly="1"
|
readonly="1"
|
||||||
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" />
|
<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
|
||||||
<field name="partner_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
name="partner_contact_id"
|
||||||
<field name="partner_contact_email" widget="email" readonly="1" nolabel="1"/>
|
domain="[('parent_id', '=', partner_id)]"
|
||||||
|
nolabel="1"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="partner_contact_phone"
|
||||||
|
widget="phone"
|
||||||
|
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_partner_id)]" nolabel="1"/>
|
<field
|
||||||
<field name="company_contact_phone" widget="phone" readonly="1" nolabel="1"/>
|
name="company_contact_id"
|
||||||
<field name="company_contact_email" widget="email" readonly="1" nolabel="1"/>
|
domain="[('parent_id', '=', company_partner_id)]"
|
||||||
|
nolabel="1"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="company_contact_phone"
|
||||||
|
widget="phone"
|
||||||
|
readonly="1"
|
||||||
|
nolabel="1"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="company_contact_email"
|
||||||
|
widget="email"
|
||||||
|
readonly="1"
|
||||||
|
nolabel="1"
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group name="parties_content" string="Parties Content" attrs="{'invisible':[('use_parties_content', '=', False)]}">
|
<group
|
||||||
|
name="parties_content"
|
||||||
|
string="Parties Content"
|
||||||
|
attrs="{'invisible':[('use_parties_content', '=', False)]}"
|
||||||
|
>
|
||||||
<field name="parties" nolabel="1" />
|
<field name="parties" nolabel="1" />
|
||||||
</group>
|
</group>
|
||||||
<group name="term_information">
|
<group name="term_information">
|
||||||
<group name="termdates_left" string="Term Dates">
|
<group name="termdates_left" string="Term Dates">
|
||||||
<field name="start_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
|
<field
|
||||||
<field name="end_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
|
name="start_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_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>
|
||||||
</group>
|
</group>
|
||||||
<group string="Special Terms">
|
<group string="Special Terms">
|
||||||
<field name="special_terms"
|
<field name="special_terms" nolabel="1" />
|
||||||
nolabel="1"/>
|
|
||||||
</group>
|
</group>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page name="structure" string="Structure">
|
<page name="structure" string="Structure">
|
||||||
<div>
|
<div>
|
||||||
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
|
<button
|
||||||
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
|
name="%(partner_agreement_contract_document_preview)d"
|
||||||
|
string="Preview"
|
||||||
|
type="action"
|
||||||
|
class="oe_highlight"
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
name="%(partner_agreement_contract_document)d"
|
||||||
|
string="Print"
|
||||||
|
type="action"
|
||||||
|
class="oe_highlight"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<separator string="Recitals" />
|
<separator string="Recitals" />
|
||||||
<field name="recital_ids"
|
<field
|
||||||
|
name="recital_ids"
|
||||||
default_order="sequence"
|
default_order="sequence"
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_agreement': active_id}"/>
|
context="{'default_agreement': active_id}"
|
||||||
|
/>
|
||||||
<separator string="Sections" />
|
<separator string="Sections" />
|
||||||
<field name="sections_ids"
|
<field
|
||||||
|
name="sections_ids"
|
||||||
default_order='sequence'
|
default_order='sequence'
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_agreement': active_id}"/>
|
context="{'default_agreement': active_id}"
|
||||||
|
/>
|
||||||
<separator string="Clauses" />
|
<separator string="Clauses" />
|
||||||
<field name="clauses_ids"
|
<field
|
||||||
|
name="clauses_ids"
|
||||||
default_order='clause_id, sequence'
|
default_order='clause_id, sequence'
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_agreement': active_id}"/>
|
context="{'default_agreement': active_id}"
|
||||||
|
/>
|
||||||
<separator string="Appendices" />
|
<separator string="Appendices" />
|
||||||
<field name="appendix_ids"
|
<field
|
||||||
|
name="appendix_ids"
|
||||||
default_order='sequence'
|
default_order='sequence'
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_agreement': active_id}"/>
|
context="{'default_agreement': active_id}"
|
||||||
|
/>
|
||||||
</page>
|
</page>
|
||||||
<page name="signature" string="Signatures">
|
<page name="signature" string="Signatures">
|
||||||
<group>
|
<group>
|
||||||
<group string="Partner">
|
<group string="Partner">
|
||||||
<field name="partner_signed_date" />
|
<field name="partner_signed_date" />
|
||||||
<field name="partner_signed_user_id" domain="[('parent_id', '=', partner_id)]"/>
|
<field
|
||||||
|
name="partner_signed_user_id"
|
||||||
|
domain="[('parent_id', '=', partner_id)]"
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
<group string="Company">
|
<group string="Company">
|
||||||
<field name="company_signed_date" />
|
<field name="company_signed_date" />
|
||||||
<field name="company_signed_user_id" />
|
<field name="company_signed_user_id" />
|
||||||
<field name="signed_contract" filename="signed_contract_filename"/>
|
<field
|
||||||
<field name="signed_contract_filename" invisible="1"/>
|
name="signed_contract"
|
||||||
|
filename="signed_contract_filename"
|
||||||
|
/>
|
||||||
|
<field
|
||||||
|
name="signed_contract_filename"
|
||||||
|
invisible="1"
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
@@ -207,7 +314,10 @@
|
|||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page name="old_versions" string="Revisions">
|
<page name="old_versions" string="Revisions">
|
||||||
<field name="previous_version_agreements_ids" string="Previouse Versions">
|
<field
|
||||||
|
name="previous_version_agreements_ids"
|
||||||
|
string="Previouse Versions"
|
||||||
|
>
|
||||||
<tree default_order='version desc'>
|
<tree default_order='version desc'>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="version" />
|
<field name="version" />
|
||||||
@@ -216,18 +326,34 @@
|
|||||||
</field>
|
</field>
|
||||||
</page>
|
</page>
|
||||||
<page name="performance" string="Performance">
|
<page name="performance" string="Performance">
|
||||||
<p>This section is a place where financial records will show the current performance of this agreement.</p>
|
<p
|
||||||
|
>This section is a place where financial records will show the current performance of this agreement.</p>
|
||||||
<p>Perhaps include invoices with total vs costs? </p>
|
<p>Perhaps include invoices with total vs costs? </p>
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
<group string="Administration">
|
<group string="Administration">
|
||||||
<div>
|
<div>
|
||||||
<p>Reviewed by <field name="reviewed_user_id" class="oe_inline"/> on <field name="reviewed_date" class="oe_inline"/>.</p>
|
<p>Reviewed by <field
|
||||||
<p>Approved by <field name="approved_user_id" class="oe_inline"/> on <field name="approved_date" class="oe_inline"/>.</p>
|
name="reviewed_user_id"
|
||||||
|
class="oe_inline"
|
||||||
|
/> on <field
|
||||||
|
name="reviewed_date"
|
||||||
|
class="oe_inline"
|
||||||
|
/>.</p>
|
||||||
|
<p>Approved by <field
|
||||||
|
name="approved_user_id"
|
||||||
|
class="oe_inline"
|
||||||
|
/> on <field
|
||||||
|
name="approved_date"
|
||||||
|
class="oe_inline"
|
||||||
|
/>.</p>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
|
Version: <field name="version" readonly="True" />.<field
|
||||||
|
name="revision"
|
||||||
|
readonly="True"
|
||||||
|
/>
|
||||||
| Created By: <field name="create_uid" readonly="True" />
|
| Created By: <field name="create_uid" readonly="True" />
|
||||||
| Created On: <field name="create_date" readonly="True" />
|
| Created On: <field name="create_date" readonly="True" />
|
||||||
</footer>
|
</footer>
|
||||||
@@ -240,7 +366,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Kanban View -->
|
<!-- Agreement Kanban View -->
|
||||||
<record id="view_project_agreement_kanban" model="ir.ui.view">
|
<record id="view_project_agreement_kanban" model="ir.ui.view">
|
||||||
<field name="name">Agreement Kanban</field>
|
<field name="name">Agreement Kanban</field>
|
||||||
@@ -251,44 +376,88 @@
|
|||||||
<field name="assigned_user_id" />
|
<field name="assigned_user_id" />
|
||||||
<templates>
|
<templates>
|
||||||
<t t-name="kanban-box">
|
<t t-name="kanban-box">
|
||||||
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
<div
|
||||||
|
t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click"
|
||||||
|
>
|
||||||
<div class="oe_kanban_content">
|
<div class="oe_kanban_content">
|
||||||
<div class="o_kanban_record_top">
|
<div class="o_kanban_record_top">
|
||||||
<div class="o_kanban_record_headings">
|
<div class="o_kanban_record_headings">
|
||||||
<strong class="o_kanban_record_title">
|
<strong class="o_kanban_record_title">
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
</strong><br/>
|
</strong>
|
||||||
<div class="o_kanban_record_subtitle text-muted">
|
<br />
|
||||||
<field name="partner_id" invisible="context.get('default_partner_id', False)"/>
|
<div
|
||||||
<t t-if="record.end_date.raw_value and record.end_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
class="o_kanban_record_subtitle text-muted"
|
||||||
|
>
|
||||||
|
<field
|
||||||
|
name="partner_id"
|
||||||
|
invisible="context.get('default_partner_id', False)"
|
||||||
|
/>
|
||||||
|
<t
|
||||||
|
t-if="record.end_date.raw_value and record.end_date.raw_value lt (new Date())"
|
||||||
|
t-set="red"
|
||||||
|
>oe_kanban_text_red</t>
|
||||||
<div t-attf-class="#{red || ''}">
|
<div t-attf-class="#{red || ''}">
|
||||||
<i><field name="end_date"/></i>
|
<i>
|
||||||
|
<field name="end_date" />
|
||||||
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
<div
|
||||||
<a role="button" class="dropdown-toggle btn" data-toggle="dropdown" href="#">
|
class="o_dropdown_kanban dropdown"
|
||||||
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
|
groups="base.group_user"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
role="button"
|
||||||
|
class="dropdown-toggle btn"
|
||||||
|
data-toggle="dropdown"
|
||||||
|
href="#"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="fa fa-ellipsis-v"
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
<ul
|
||||||
<li t-if="widget.editable"><a type="edit">Edit</a></li>
|
class="dropdown-menu"
|
||||||
|
role="menu"
|
||||||
|
aria-labelledby="dLabel"
|
||||||
|
>
|
||||||
|
<li t-if="widget.editable">
|
||||||
|
<a type="edit">Edit</a>
|
||||||
|
</li>
|
||||||
<li class="divider" />
|
<li class="divider" />
|
||||||
<li class="dropdown-header">Record's Colour</li>
|
<li
|
||||||
|
class="dropdown-header"
|
||||||
|
>Record's Colour</li>
|
||||||
<li>
|
<li>
|
||||||
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
<ul
|
||||||
|
class="oe_kanban_colorpicker"
|
||||||
|
data-field="color"
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_kanban_record_body">
|
<div class="o_kanban_record_body">
|
||||||
<field name="agreement_type_id"/> - <field name="agreement_subtype_id"/>
|
<field name="agreement_type_id" /> - <field
|
||||||
|
name="agreement_subtype_id"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="o_kanban_record_bottom">
|
<div class="o_kanban_record_bottom">
|
||||||
<div class="oe_kanban_bottom_left">
|
<div class="oe_kanban_bottom_left">
|
||||||
V: <field name="version" />
|
V: <field name="version" />
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_kanban_bottom_right">
|
<div class="oe_kanban_bottom_right">
|
||||||
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_user_id.raw_value)" t-att-title="record.assigned_user_id.value" width="36" height="36" class="oe_kanban_avatar" alt="user & picture"/>
|
<img
|
||||||
|
t-att-src="kanban_image('res.users', 'image_small', record.assigned_user_id.raw_value)"
|
||||||
|
t-att-title="record.assigned_user_id.value"
|
||||||
|
width="36"
|
||||||
|
height="36"
|
||||||
|
class="oe_kanban_avatar"
|
||||||
|
alt="user & picture"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -299,7 +468,6 @@
|
|||||||
</kanban>
|
</kanban>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Search View -->
|
<!-- Agreement Search View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_search_view">
|
<record model="ir.ui.view" id="partner_agreement_search_view">
|
||||||
<field name="name">Agreement Search</field>
|
<field name="name">Agreement Search</field>
|
||||||
@@ -310,15 +478,36 @@
|
|||||||
<field name="partner_id" />
|
<field name="partner_id" />
|
||||||
<field name="agreement_type_id" />
|
<field name="agreement_type_id" />
|
||||||
<field name="agreement_subtype_id" />
|
<field name="agreement_subtype_id" />
|
||||||
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
|
<filter
|
||||||
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
|
name="filter_non_template"
|
||||||
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
|
string="Non-Templates"
|
||||||
<filter name="group_partner_id" string="Partners" icon="terp-partner" context="{'group_by':'partner_id'}"/>
|
domain="[('active','=',True),('is_template', '=', False)]"
|
||||||
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
|
/>
|
||||||
|
<filter
|
||||||
|
name="filter_inactive"
|
||||||
|
string="Archived"
|
||||||
|
domain="[('active','=',False)]"
|
||||||
|
/>
|
||||||
|
<filter
|
||||||
|
name="filter_templates"
|
||||||
|
string="Templates"
|
||||||
|
domain="[('active','=',True),('is_template', '=', True)]"
|
||||||
|
/>
|
||||||
|
<filter
|
||||||
|
name="group_partner_id"
|
||||||
|
string="Partners"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'partner_id'}"
|
||||||
|
/>
|
||||||
|
<filter
|
||||||
|
name="group_status"
|
||||||
|
string="Status"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'state'}"
|
||||||
|
/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Reporting -->
|
<!-- Agreement Reporting -->
|
||||||
<record id="agreement_graph_view" model="ir.ui.view">
|
<record id="agreement_graph_view" model="ir.ui.view">
|
||||||
<field name="name">agreement.graph</field>
|
<field name="name">agreement.graph</field>
|
||||||
@@ -329,7 +518,6 @@
|
|||||||
</graph>
|
</graph>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="agreement_pivot_view" model="ir.ui.view">
|
<record id="agreement_pivot_view" model="ir.ui.view">
|
||||||
<field name="name">agreement.pivot</field>
|
<field name="name">agreement.pivot</field>
|
||||||
<field name="model">agreement</field>
|
<field name="model">agreement</field>
|
||||||
@@ -339,30 +527,25 @@
|
|||||||
</pivot>
|
</pivot>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_agreement_report_order" model="ir.actions.act_window">
|
<record id="action_agreement_report_order" model="ir.actions.act_window">
|
||||||
<field name="name">Agreements</field>
|
<field name="name">Agreements</field>
|
||||||
<field name="res_model">agreement</field>
|
<field name="res_model">agreement</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">graph,pivot</field>
|
<field name="view_mode">graph,pivot</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- actions opening views on models -->
|
<!-- actions opening views on models -->
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="agreement_dashboard_agreement">
|
<record model="ir.actions.act_window" id="agreement_dashboard_agreement">
|
||||||
<field name="name">Agreements</field>
|
<field name="name">Agreements</field>
|
||||||
<field name="res_model">agreement</field>
|
<field name="res_model">agreement</field>
|
||||||
<field name="domain">[('is_template', '=', False)]</field>
|
<field name="domain">[('is_template', '=', False)]</field>
|
||||||
<field name="view_mode">kanban,tree,form</field>
|
<field name="view_mode">kanban,tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="agreement_operations_agreement">
|
<record model="ir.actions.act_window" id="agreement_operations_agreement">
|
||||||
<field name="name">Agreements</field>
|
<field name="name">Agreements</field>
|
||||||
<field name="res_model">agreement</field>
|
<field name="res_model">agreement</field>
|
||||||
<field name="domain">[('is_template', '=', False)]</field>
|
<field name="domain">[('is_template', '=', False)]</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
|
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
|
||||||
<field name="name">Templates</field>
|
<field name="name">Templates</field>
|
||||||
<field name="res_model">agreement</field>
|
<field name="res_model">agreement</field>
|
||||||
@@ -370,5 +553,4 @@
|
|||||||
<!-- <field name="context">[('is_template', '=', True)]</field> -->
|
<!-- <field name="context">[('is_template', '=', True)]</field> -->
|
||||||
<field name="view_mode">tree,kanban,form</field>
|
<field name="view_mode">tree,kanban,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Appendix List View-->
|
<!-- Agreement Appendix List View-->
|
||||||
<record model="ir.ui.view" id="agreement_appendix_tree">
|
<record model="ir.ui.view" id="agreement_appendix_tree">
|
||||||
<field name="name">Agreement Appendix Tree</field>
|
<field name="name">Agreement Appendix Tree</field>
|
||||||
@@ -16,7 +14,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Appendix Form View -->
|
<!-- Agreement Appendix Form View -->
|
||||||
<record model="ir.ui.view" id="agreement_appendix_form">
|
<record model="ir.ui.view" id="agreement_appendix_form">
|
||||||
<field name="name">Agreement Appendix Form</field>
|
<field name="name">Agreement Appendix Form</field>
|
||||||
@@ -25,13 +22,24 @@
|
|||||||
<form string="Appendix">
|
<form string="Appendix">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
<button
|
||||||
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
name="toggle_active"
|
||||||
|
type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-archive"
|
||||||
|
>
|
||||||
|
<field
|
||||||
|
name="active"
|
||||||
|
widget="boolean_button"
|
||||||
|
options="{"terminology": "archive"}"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" />
|
<label for="name" class="oe_edit_only" />
|
||||||
<h1><field name="name"/></h1>
|
<h1>
|
||||||
|
<field name="name" />
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
@@ -44,9 +52,13 @@
|
|||||||
</group>
|
</group>
|
||||||
<field name="content" widget="html" />
|
<field name="content" widget="html" />
|
||||||
<group class="oe_edit_only">
|
<group class="oe_edit_only">
|
||||||
<field name="field_domain" widget="domain" nolabel="1"
|
<field
|
||||||
|
name="field_domain"
|
||||||
|
widget="domain"
|
||||||
|
nolabel="1"
|
||||||
options="{'model': 'agreement.appendix',
|
options="{'model': 'agreement.appendix',
|
||||||
'partial_use': True}" />
|
'partial_use': True}"
|
||||||
|
/>
|
||||||
<group>
|
<group>
|
||||||
<field name="default_value" />
|
<field name="default_value" />
|
||||||
<field name="copyvalue" />
|
<field name="copyvalue" />
|
||||||
@@ -56,7 +68,8 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li>Select the field using the popup</li>
|
<li>Select the field using the popup</li>
|
||||||
<li>Enter the default value if the field is empty</li>
|
<li>Enter the default value if the field is empty</li>
|
||||||
<li>Copy and paste the placeholder expression in the content</li>
|
<li
|
||||||
|
>Copy and paste the placeholder expression in the content</li>
|
||||||
</ol>
|
</ol>
|
||||||
</p>
|
</p>
|
||||||
</group>
|
</group>
|
||||||
@@ -64,23 +77,24 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Appendix Search View -->
|
<!-- Agreement Appendix Search View -->
|
||||||
<record model="ir.ui.view" id="agreement_appendix_search">
|
<record model="ir.ui.view" id="agreement_appendix_search">
|
||||||
<field name="name">Agreement Appendix Search</field>
|
<field name="name">Agreement Appendix Search</field>
|
||||||
<field name="model">agreement.appendix</field>
|
<field name="model">agreement.appendix</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
<filter
|
||||||
|
name="group_agreement"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'agreement_id'}"
|
||||||
|
/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="agreement_appendix_action">
|
<record model="ir.actions.act_window" id="agreement_appendix_action">
|
||||||
<field name="name">Appendices</field>
|
<field name="name">Appendices</field>
|
||||||
<field name="res_model">agreement.appendix</field>
|
<field name="res_model">agreement.appendix</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Clause List View-->
|
<!-- Agreement Clause List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_clause_list_view">
|
<record model="ir.ui.view" id="partner_agreement_clause_list_view">
|
||||||
<field name="name">Agreement Clause List</field>
|
<field name="name">Agreement Clause List</field>
|
||||||
@@ -16,7 +15,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Clause Form View -->
|
<!-- Agreement Clause Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_clause_form_view">
|
<record model="ir.ui.view" id="partner_agreement_clause_form_view">
|
||||||
<field name="name">Agreement clause Form</field>
|
<field name="name">Agreement clause Form</field>
|
||||||
@@ -25,19 +23,33 @@
|
|||||||
<form string="Clause">
|
<form string="Clause">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
<button
|
||||||
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
name="toggle_active"
|
||||||
|
type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-archive"
|
||||||
|
>
|
||||||
|
<field
|
||||||
|
name="active"
|
||||||
|
widget="boolean_button"
|
||||||
|
options="{"terminology": "archive"}"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" />
|
<label for="name" class="oe_edit_only" />
|
||||||
<h1><field name="name"/></h1>
|
<h1>
|
||||||
|
<field name="name" />
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="title" />
|
<field name="title" />
|
||||||
<field name="agreement_id" />
|
<field name="agreement_id" />
|
||||||
<field name="section_id" domain="[('agreement_id', '=', agreement_id)]"/>
|
<field
|
||||||
|
name="section_id"
|
||||||
|
domain="[('agreement_id', '=', agreement_id)]"
|
||||||
|
/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="sequence" />
|
<field name="sequence" />
|
||||||
@@ -45,9 +57,13 @@
|
|||||||
</group>
|
</group>
|
||||||
<field name="content" widget="html" />
|
<field name="content" widget="html" />
|
||||||
<group class="oe_edit_only">
|
<group class="oe_edit_only">
|
||||||
<field name="field_domain" widget="domain" nolabel="1"
|
<field
|
||||||
|
name="field_domain"
|
||||||
|
widget="domain"
|
||||||
|
nolabel="1"
|
||||||
options="{'model': 'agreement.clause',
|
options="{'model': 'agreement.clause',
|
||||||
'partial_use': True}" />
|
'partial_use': True}"
|
||||||
|
/>
|
||||||
<group>
|
<group>
|
||||||
<field name="default_value" />
|
<field name="default_value" />
|
||||||
<field name="copyvalue" />
|
<field name="copyvalue" />
|
||||||
@@ -57,7 +73,8 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li>Select the field using the popup</li>
|
<li>Select the field using the popup</li>
|
||||||
<li>Enter the default value if the field is empty</li>
|
<li>Enter the default value if the field is empty</li>
|
||||||
<li>Copy and paste the placeholder expression in the content</li>
|
<li
|
||||||
|
>Copy and paste the placeholder expression in the content</li>
|
||||||
</ol>
|
</ol>
|
||||||
</p>
|
</p>
|
||||||
</group>
|
</group>
|
||||||
@@ -65,24 +82,29 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Clause Search View -->
|
<!-- Agreement Clause Search View -->
|
||||||
<record model="ir.ui.view" id="agreement_clause_search_view">
|
<record model="ir.ui.view" id="agreement_clause_search_view">
|
||||||
<field name="name">Agreement Clause Search</field>
|
<field name="name">Agreement Clause Search</field>
|
||||||
<field name="model">agreement.clause</field>
|
<field name="model">agreement.clause</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Agreement Clause Search">
|
<search string="Agreement Clause Search">
|
||||||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
<filter
|
||||||
<filter name="group_section" icon="terp-partner" context="{'group_by':'section_id'}"/>
|
name="group_agreement"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'agreement_id'}"
|
||||||
|
/>
|
||||||
|
<filter
|
||||||
|
name="group_section"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'section_id'}"
|
||||||
|
/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_clause">
|
<record model="ir.actions.act_window" id="partner_agreement_action_clause">
|
||||||
<field name="name">Clauses</field>
|
<field name="name">Clauses</field>
|
||||||
<field name="res_model">agreement.clause</field>
|
<field name="res_model">agreement.clause</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Increase Type List View-->
|
<!-- Agreement Increase Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_increasetype_list_view">
|
<record model="ir.ui.view" id="partner_agreement_increasetype_list_view">
|
||||||
<field name="name">Agreement Increase Type List</field>
|
<field name="name">Agreement Increase Type List</field>
|
||||||
@@ -13,7 +12,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Increase Type Form View -->
|
<!-- Agreement Increase Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_increasetype_form_view">
|
<record model="ir.ui.view" id="partner_agreement_increasetype_form_view">
|
||||||
<field name="name">Agreement Increase Type Form</field>
|
<field name="name">Agreement Increase Type Form</field>
|
||||||
@@ -34,12 +32,10 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_increasetype">
|
<record model="ir.actions.act_window" id="partner_agreement_action_increasetype">
|
||||||
<field name="name">Agreement Increase Type</field>
|
<field name="name">Agreement Increase Type</field>
|
||||||
<field name="res_model">agreement.increasetype</field>
|
<field name="res_model">agreement.increasetype</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Recital List View-->
|
<!-- Agreement Recital List View-->
|
||||||
<record model="ir.ui.view" id="agreement_recital_tree">
|
<record model="ir.ui.view" id="agreement_recital_tree">
|
||||||
<field name="name">Agreement Recital Tree</field>
|
<field name="name">Agreement Recital Tree</field>
|
||||||
@@ -15,7 +14,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Recital Form View -->
|
<!-- Agreement Recital Form View -->
|
||||||
<record model="ir.ui.view" id="agreement_recital_form">
|
<record model="ir.ui.view" id="agreement_recital_form">
|
||||||
<field name="name">Agreement Recital Form</field>
|
<field name="name">Agreement Recital Form</field>
|
||||||
@@ -24,15 +22,24 @@
|
|||||||
<form string="Recital">
|
<form string="Recital">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="toggle_active" type="object"
|
<button
|
||||||
class="oe_stat_button" icon="fa-archive">
|
name="toggle_active"
|
||||||
<field name="active" widget="boolean_button"
|
type="object"
|
||||||
options="{"terminology": "archive"}"/>
|
class="oe_stat_button"
|
||||||
|
icon="fa-archive"
|
||||||
|
>
|
||||||
|
<field
|
||||||
|
name="active"
|
||||||
|
widget="boolean_button"
|
||||||
|
options="{"terminology": "archive"}"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" />
|
<label for="name" class="oe_edit_only" />
|
||||||
<h1><field name="name"/></h1>
|
<h1>
|
||||||
|
<field name="name" />
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
@@ -45,9 +52,13 @@
|
|||||||
</group>
|
</group>
|
||||||
<field name="content" widget="html" />
|
<field name="content" widget="html" />
|
||||||
<group class="oe_edit_only">
|
<group class="oe_edit_only">
|
||||||
<field name="field_domain" widget="domain" nolabel="1"
|
<field
|
||||||
|
name="field_domain"
|
||||||
|
widget="domain"
|
||||||
|
nolabel="1"
|
||||||
options="{'model': 'agreement.recital',
|
options="{'model': 'agreement.recital',
|
||||||
'partial_use': True}" />
|
'partial_use': True}"
|
||||||
|
/>
|
||||||
<group>
|
<group>
|
||||||
<field name="default_value" />
|
<field name="default_value" />
|
||||||
<field name="copyvalue" />
|
<field name="copyvalue" />
|
||||||
@@ -57,7 +68,8 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li>Select the field using the popup</li>
|
<li>Select the field using the popup</li>
|
||||||
<li>Enter the default value if the field is empty</li>
|
<li>Enter the default value if the field is empty</li>
|
||||||
<li>Copy and paste the placeholder expression in the content</li>
|
<li
|
||||||
|
>Copy and paste the placeholder expression in the content</li>
|
||||||
</ol>
|
</ol>
|
||||||
</p>
|
</p>
|
||||||
</group>
|
</group>
|
||||||
@@ -65,23 +77,24 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Recital Search View -->
|
<!-- Agreement Recital Search View -->
|
||||||
<record model="ir.ui.view" id="agreement_recital_search">
|
<record model="ir.ui.view" id="agreement_recital_search">
|
||||||
<field name="name">Agreement Recital Search</field>
|
<field name="name">Agreement Recital Search</field>
|
||||||
<field name="model">agreement.recital</field>
|
<field name="model">agreement.recital</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search>
|
<search>
|
||||||
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
<filter
|
||||||
|
name="group_agreement"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'agreement_id'}"
|
||||||
|
/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="agreement_recital_action">
|
<record model="ir.actions.act_window" id="agreement_recital_action">
|
||||||
<field name="name">Recitals</field>
|
<field name="name">Recitals</field>
|
||||||
<field name="res_model">agreement.recital</field>
|
<field name="res_model">agreement.recital</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Renewal Type List View-->
|
<!-- Agreement Renewal Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_renewaltype_list_view">
|
<record model="ir.ui.view" id="partner_agreement_renewaltype_list_view">
|
||||||
<field name="name">Agreement Renewal Type List</field>
|
<field name="name">Agreement Renewal Type List</field>
|
||||||
@@ -12,7 +11,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Renewal Type Form View -->
|
<!-- Agreement Renewal Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_renewaltype_form_view">
|
<record model="ir.ui.view" id="partner_agreement_renewaltype_form_view">
|
||||||
<field name="name">Agreement Renewal Type Form</field>
|
<field name="name">Agreement Renewal Type Form</field>
|
||||||
@@ -30,12 +28,10 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_renewaltype">
|
<record model="ir.actions.act_window" id="partner_agreement_action_renewaltype">
|
||||||
<field name="name">Agreement Renewal Type</field>
|
<field name="name">Agreement Renewal Type</field>
|
||||||
<field name="res_model">agreement.renewaltype</field>
|
<field name="res_model">agreement.renewaltype</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Sections List View-->
|
<!-- Agreement Sections List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_section_list_view">
|
<record model="ir.ui.view" id="partner_agreement_section_list_view">
|
||||||
<field name="name">Agreement Section List</field>
|
<field name="name">Agreement Section List</field>
|
||||||
@@ -15,7 +14,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Sections Form View -->
|
<!-- Agreement Sections Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_section_form_view">
|
<record model="ir.ui.view" id="partner_agreement_section_form_view">
|
||||||
<field name="name">Agreement Section Form</field>
|
<field name="name">Agreement Section Form</field>
|
||||||
@@ -24,13 +22,24 @@
|
|||||||
<form string="Section">
|
<form string="Section">
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
<button
|
||||||
<field name="active" widget="boolean_button" options="{"terminology": "archive"}"/>
|
name="toggle_active"
|
||||||
|
type="object"
|
||||||
|
class="oe_stat_button"
|
||||||
|
icon="fa-archive"
|
||||||
|
>
|
||||||
|
<field
|
||||||
|
name="active"
|
||||||
|
widget="boolean_button"
|
||||||
|
options="{"terminology": "archive"}"
|
||||||
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" />
|
<label for="name" class="oe_edit_only" />
|
||||||
<h1><field name="name"/></h1>
|
<h1>
|
||||||
|
<field name="name" />
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
@@ -45,9 +54,13 @@
|
|||||||
<page string="Content">
|
<page string="Content">
|
||||||
<field name='content' nolabel="1" />
|
<field name='content' nolabel="1" />
|
||||||
<group class="oe_edit_only">
|
<group class="oe_edit_only">
|
||||||
<field name="field_domain" widget="domain" nolabel="1"
|
<field
|
||||||
|
name="field_domain"
|
||||||
|
widget="domain"
|
||||||
|
nolabel="1"
|
||||||
options="{'model': 'agreement.section',
|
options="{'model': 'agreement.section',
|
||||||
'partial_use': True}" />
|
'partial_use': True}"
|
||||||
|
/>
|
||||||
<group>
|
<group>
|
||||||
<field name="default_value" />
|
<field name="default_value" />
|
||||||
<field name="copyvalue" />
|
<field name="copyvalue" />
|
||||||
@@ -56,16 +69,20 @@
|
|||||||
This section (on the left) allows you to add dynamic fields inside the content.
|
This section (on the left) allows you to add dynamic fields inside the content.
|
||||||
<ol>
|
<ol>
|
||||||
<li>Select the field using the popup</li>
|
<li>Select the field using the popup</li>
|
||||||
<li>Enter the default value if the field is empty</li>
|
<li
|
||||||
<li>Copy and paste the placeholder expression in the content</li>
|
>Enter the default value if the field is empty</li>
|
||||||
|
<li
|
||||||
|
>Copy and paste the placeholder expression in the content</li>
|
||||||
</ol>
|
</ol>
|
||||||
</p>
|
</p>
|
||||||
</group>
|
</group>
|
||||||
</page>
|
</page>
|
||||||
<page string="Clauses">
|
<page string="Clauses">
|
||||||
<field name="clauses_ids"
|
<field
|
||||||
|
name="clauses_ids"
|
||||||
nolabel="1"
|
nolabel="1"
|
||||||
context="{'default_section_id': active_id, 'default_agreement_id': agreement_id}">
|
context="{'default_section_id': active_id, 'default_agreement_id': agreement_id}"
|
||||||
|
>
|
||||||
<tree>
|
<tree>
|
||||||
<field name="sequence" widget="handle" />
|
<field name="sequence" widget="handle" />
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
@@ -78,23 +95,25 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Section Search View -->
|
<!-- Agreement Section Search View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_section_search_view">
|
<record model="ir.ui.view" id="partner_agreement_section_search_view">
|
||||||
<field name="name">Agreement Section Search</field>
|
<field name="name">Agreement Section Search</field>
|
||||||
<field name="model">agreement.section</field>
|
<field name="model">agreement.section</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<search string="Agreement Section Search">
|
<search string="Agreement Section Search">
|
||||||
<filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
|
<filter
|
||||||
|
name="group_agreement"
|
||||||
|
string="Agreements"
|
||||||
|
icon="terp-partner"
|
||||||
|
context="{'group_by':'agreement_id'}"
|
||||||
|
/>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_section">
|
<record model="ir.actions.act_window" id="partner_agreement_action_section">
|
||||||
<field name="name">Agreement Sections</field>
|
<field name="name">Agreement Sections</field>
|
||||||
<field name="res_model">agreement.section</field>
|
<field name="res_model">agreement.section</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Stage List View-->
|
<!-- Agreement Stage List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_stage_list_view">
|
<record model="ir.ui.view" id="partner_agreement_stage_list_view">
|
||||||
<field name="name">Agreement Stage List</field>
|
<field name="name">Agreement Stage List</field>
|
||||||
@@ -13,7 +12,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Stage Form View -->
|
<!-- Agreement Stage Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_stage_form_view">
|
<record model="ir.ui.view" id="partner_agreement_stage_form_view">
|
||||||
<field name="name">Agreement Stage Form</field>
|
<field name="name">Agreement Stage Form</field>
|
||||||
@@ -23,7 +21,9 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" string="Stage Name" />
|
<label for="name" class="oe_edit_only" string="Stage Name" />
|
||||||
<h1><field name="name" string="Stage Name"/></h1>
|
<h1>
|
||||||
|
<field name="name" string="Stage Name" />
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<field name="sequence" />
|
<field name="sequence" />
|
||||||
@@ -34,12 +34,10 @@
|
|||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_stage">
|
<record model="ir.actions.act_window" id="partner_agreement_action_stage">
|
||||||
<field name="name">Agreement Stage</field>
|
<field name="name">Agreement Stage</field>
|
||||||
<field name="res_model">agreement.stage</field>
|
<field name="res_model">agreement.stage</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Sub Type List View-->
|
<!-- Agreement Sub Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_subtype_list_view">
|
<record model="ir.ui.view" id="partner_agreement_subtype_list_view">
|
||||||
<field name="name">Agreement Subtype List</field>
|
<field name="name">Agreement Subtype List</field>
|
||||||
@@ -12,7 +11,6 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Sub Type Form View -->
|
<!-- Agreement Sub Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_subtype_form_view">
|
<record model="ir.ui.view" id="partner_agreement_subtype_form_view">
|
||||||
<field name="name">Agreement Sub Type Form</field>
|
<field name="name">Agreement Sub Type Form</field>
|
||||||
@@ -22,24 +20,24 @@
|
|||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<label for="name" class="oe_edit_only" />
|
<label for="name" class="oe_edit_only" />
|
||||||
<h1><field name="name"/></h1>
|
<h1>
|
||||||
|
<field name="name" />
|
||||||
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="agreement_type_id" />
|
<field name="agreement_type_id" />
|
||||||
</group>
|
</group>
|
||||||
<group></group>
|
<group />
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_subtype">
|
<record model="ir.actions.act_window" id="partner_agreement_action_subtype">
|
||||||
<field name="name">Agreement Sub-Types</field>
|
<field name="name">Agreement Sub-Types</field>
|
||||||
<field name="res_model">agreement.subtype</field>
|
<field name="res_model">agreement.subtype</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Agreement Type List View-->
|
<!-- Agreement Type List View-->
|
||||||
<record model="ir.ui.view" id="partner_agreement_type_list_view">
|
<record model="ir.ui.view" id="partner_agreement_type_list_view">
|
||||||
<field name="name">Agreement Type List</field>
|
<field name="name">Agreement Type List</field>
|
||||||
@@ -12,7 +11,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Agreement Type Form View -->
|
<!-- Agreement Type Form View -->
|
||||||
<record model="ir.ui.view" id="partner_agreement_type_form_view">
|
<record model="ir.ui.view" id="partner_agreement_type_form_view">
|
||||||
<field name="name">Agreement Type Form</field>
|
<field name="name">Agreement Type Form</field>
|
||||||
@@ -20,8 +18,7 @@
|
|||||||
<field name="inherit_id" ref="agreement.agreement_type_form_view" />
|
<field name="inherit_id" ref="agreement.agreement_type_form_view" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//sheet" position="inside">
|
<xpath expr="//sheet" position="inside">
|
||||||
<field name="agreement_subtypes_ids"
|
<field name="agreement_subtypes_ids" nolabel="1">
|
||||||
nolabel="1">
|
|
||||||
<tree editable="bottom">
|
<tree editable="bottom">
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
</tree>
|
</tree>
|
||||||
@@ -29,12 +26,10 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Actions opening views on models -->
|
<!-- Actions opening views on models -->
|
||||||
<record model="ir.actions.act_window" id="partner_agreement_action_type">
|
<record model="ir.actions.act_window" id="partner_agreement_action_type">
|
||||||
<field name="name">Agreement Types</field>
|
<field name="name">Agreement Types</field>
|
||||||
<field name="res_model">agreement.type</field>
|
<field name="res_model">agreement.type</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<!-- Remove top menu from agreement module -->
|
<!-- Remove top menu from agreement module -->
|
||||||
<!-- <delete model="ir.ui.menu" id="agreement.agreement_menu" /> -->
|
<!-- <delete model="ir.ui.menu" id="agreement.agreement_menu" /> -->
|
||||||
|
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Agreements"
|
name="Agreements"
|
||||||
@@ -11,137 +9,154 @@
|
|||||||
web_icon="agreement_legal,static/description/icon.png"
|
web_icon="agreement_legal,static/description/icon.png"
|
||||||
sequence="80"
|
sequence="80"
|
||||||
action="agreement_dashboard_agreement"
|
action="agreement_dashboard_agreement"
|
||||||
groups="agreement_legal.group_agreement_readonly"/>
|
groups="agreement_legal.group_agreement_readonly"
|
||||||
|
/>
|
||||||
<!-- Dashboard -->
|
<!-- Dashboard -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Dashboard"
|
name="Dashboard"
|
||||||
id="agreement_dashboard"
|
id="agreement_dashboard"
|
||||||
parent="agreement.agreement_menu"
|
parent="agreement.agreement_menu"
|
||||||
sequence="10"/>
|
sequence="10"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Agreements"
|
name="Agreements"
|
||||||
id="dashboard_agreements"
|
id="dashboard_agreements"
|
||||||
parent="agreement_dashboard"
|
parent="agreement_dashboard"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
action="agreement_dashboard_agreement"/>
|
action="agreement_dashboard_agreement"
|
||||||
|
/>
|
||||||
<!-- Operations -->
|
<!-- Operations -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Operations"
|
name="Operations"
|
||||||
id="agreement_operations"
|
id="agreement_operations"
|
||||||
parent="agreement.agreement_menu"
|
parent="agreement.agreement_menu"
|
||||||
sequence="20"/>
|
sequence="20"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Agreements"
|
name="Agreements"
|
||||||
id="operations_agreements"
|
id="operations_agreements"
|
||||||
parent="agreement_operations"
|
parent="agreement_operations"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
action="agreement_operations_agreement"/>
|
action="agreement_operations_agreement"
|
||||||
|
/>
|
||||||
<!-- Master Data -->
|
<!-- Master Data -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Master Data"
|
name="Master Data"
|
||||||
id="agreement_masterdata"
|
id="agreement_masterdata"
|
||||||
parent="agreement.agreement_menu"
|
parent="agreement.agreement_menu"
|
||||||
sequence="30"/>
|
sequence="30"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Contents"
|
name="Contents"
|
||||||
id="agreement_data_contents"
|
id="agreement_data_contents"
|
||||||
parent="agreement_masterdata"
|
parent="agreement_masterdata"
|
||||||
sequence="10"/>
|
sequence="10"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Recitals"
|
name="Recitals"
|
||||||
id="agreement_recitals"
|
id="agreement_recitals"
|
||||||
parent="agreement_data_contents"
|
parent="agreement_data_contents"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
action="agreement_recital_action"/>
|
action="agreement_recital_action"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Clauses"
|
name="Clauses"
|
||||||
id="agreement_clauses"
|
id="agreement_clauses"
|
||||||
parent="agreement_data_contents"
|
parent="agreement_data_contents"
|
||||||
sequence="20"
|
sequence="20"
|
||||||
action="partner_agreement_action_clause"/>
|
action="partner_agreement_action_clause"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sections"
|
name="Sections"
|
||||||
id="agreement_sections"
|
id="agreement_sections"
|
||||||
parent="agreement_data_contents"
|
parent="agreement_data_contents"
|
||||||
sequence="30"
|
sequence="30"
|
||||||
action="partner_agreement_action_section"/>
|
action="partner_agreement_action_section"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Appendices"
|
name="Appendices"
|
||||||
id="agreement_appendices"
|
id="agreement_appendices"
|
||||||
parent="agreement_data_contents"
|
parent="agreement_data_contents"
|
||||||
sequence="40"
|
sequence="40"
|
||||||
action="agreement_appendix_action"/>
|
action="agreement_appendix_action"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Products"
|
name="Products"
|
||||||
id="agreement_products"
|
id="agreement_products"
|
||||||
sequence="100"
|
sequence="100"
|
||||||
parent="agreement_masterdata"
|
parent="agreement_masterdata"
|
||||||
action="product.product_template_action"/>
|
action="product.product_template_action"
|
||||||
|
/>
|
||||||
<!-- Reporting -->
|
<!-- Reporting -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Reporting"
|
name="Reporting"
|
||||||
id="agreement_reporting"
|
id="agreement_reporting"
|
||||||
sequence="40"
|
sequence="40"
|
||||||
parent="agreement.agreement_menu"
|
parent="agreement.agreement_menu"
|
||||||
groups="agreement_legal.group_agreement_manager"/>
|
groups="agreement_legal.group_agreement_manager"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Agreements"
|
name="Agreements"
|
||||||
id="agreement_agreement_reporting"
|
id="agreement_agreement_reporting"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
parent="agreement_reporting"
|
parent="agreement_reporting"
|
||||||
action="action_agreement_report_order"/>
|
action="action_agreement_report_order"
|
||||||
|
/>
|
||||||
<!-- Configuration -->
|
<!-- Configuration -->
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Configuration"
|
name="Configuration"
|
||||||
id="agreement_configuration"
|
id="agreement_configuration"
|
||||||
sequence="50"
|
sequence="50"
|
||||||
parent="agreement.agreement_menu"
|
parent="agreement.agreement_menu"
|
||||||
groups="agreement_legal.group_agreement_manager"/>
|
groups="agreement_legal.group_agreement_manager"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Settings"
|
name="Settings"
|
||||||
id="agreement_settings"
|
id="agreement_settings"
|
||||||
sequence="10"
|
sequence="10"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
action="agreement_legal.action_agreement_config"/>
|
action="agreement_legal.action_agreement_config"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Templates"
|
name="Templates"
|
||||||
id="template"
|
id="template"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
sequence="20"
|
sequence="20"
|
||||||
action="partner_agreement_agreement_templates"/>
|
action="partner_agreement_agreement_templates"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Renewal Types"
|
name="Renewal Types"
|
||||||
id="agreement_renewaltype"
|
id="agreement_renewaltype"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
sequence="30"
|
sequence="30"
|
||||||
action="partner_agreement_action_renewaltype"/>
|
action="partner_agreement_action_renewaltype"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Increase Types"
|
name="Increase Types"
|
||||||
id="agreement_increamenttypes"
|
id="agreement_increamenttypes"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
sequence="31"
|
sequence="31"
|
||||||
action="partner_agreement_action_increasetype"/>
|
action="partner_agreement_action_increasetype"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Stages"
|
name="Stages"
|
||||||
id="agreement_stages"
|
id="agreement_stages"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
sequence="40"
|
sequence="40"
|
||||||
action="partner_agreement_action_stage"/>
|
action="partner_agreement_action_stage"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Types"
|
name="Types"
|
||||||
id="agreement_types"
|
id="agreement_types"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
sequence="50"
|
sequence="50"
|
||||||
action="partner_agreement_action_type"/>
|
action="partner_agreement_action_type"
|
||||||
|
/>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sub-Types"
|
name="Sub-Types"
|
||||||
id="agreement_subtypes"
|
id="agreement_subtypes"
|
||||||
parent="agreement_configuration"
|
parent="agreement_configuration"
|
||||||
sequence="60"
|
sequence="60"
|
||||||
action="partner_agreement_action_subtype"/>
|
action="partner_agreement_action_subtype"
|
||||||
|
/>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||||
<field name="name">res.config.settings.view.form.agreement</field>
|
<field name="name">res.config.settings.view.form.agreement</field>
|
||||||
<field name="model">res.config.settings</field>
|
<field name="model">res.config.settings</field>
|
||||||
@@ -8,11 +7,13 @@
|
|||||||
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||||
<div class="app_settings_block"
|
<div
|
||||||
|
class="app_settings_block"
|
||||||
data-string="Agreements"
|
data-string="Agreements"
|
||||||
string="Agreements"
|
string="Agreements"
|
||||||
data-key="agreement_legal"
|
data-key="agreement_legal"
|
||||||
groups="agreement_legal.group_agreement_manager">
|
groups="agreement_legal.group_agreement_manager"
|
||||||
|
>
|
||||||
<h2>Operations</h2>
|
<h2>Operations</h2>
|
||||||
<div class="row mt16 o_settings_container">
|
<div class="row mt16 o_settings_container">
|
||||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||||
@@ -25,8 +26,17 @@
|
|||||||
Sell and purchase products in different units of measure
|
Sell and purchase products in different units of measure
|
||||||
</div>
|
</div>
|
||||||
<div class="content-group">
|
<div class="content-group">
|
||||||
<div class="mt16" attrs="{'invisible': [('group_uom', '=', False)]}">
|
<div
|
||||||
<button name="%(uom.product_uom_form_action)d" icon="fa-arrow-right" type="action" string="Units Of Measure" class="btn-link"/>
|
class="mt16"
|
||||||
|
attrs="{'invisible': [('group_uom', '=', False)]}"
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
name="%(uom.product_uom_form_action)d"
|
||||||
|
icon="fa-arrow-right"
|
||||||
|
type="action"
|
||||||
|
string="Units Of Measure"
|
||||||
|
class="btn-link"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,8 +55,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6 o_setting_box"
|
<div
|
||||||
attrs="{'invisible': [('module_agreement_sale', '!=', True)]}">
|
class="col-xs-12 col-md-6 o_setting_box"
|
||||||
|
attrs="{'invisible': [('module_agreement_sale', '!=', True)]}"
|
||||||
|
>
|
||||||
<div class="o_setting_left_pane">
|
<div class="o_setting_left_pane">
|
||||||
<field name="module_agreement_sale_subscription" />
|
<field name="module_agreement_sale_subscription" />
|
||||||
</div>
|
</div>
|
||||||
@@ -150,12 +162,12 @@
|
|||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
<act_window
|
||||||
<act_window id="action_agreement_config"
|
id="action_agreement_config"
|
||||||
name="Settings"
|
name="Settings"
|
||||||
res_model="res.config.settings"
|
res_model="res.config.settings"
|
||||||
view_mode="form"
|
view_mode="form"
|
||||||
target="inline"
|
target="inline"
|
||||||
context="{'module': 'agreement'}"/>
|
context="{'module': 'agreement'}"
|
||||||
|
/>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="partner_form">
|
<record model="ir.ui.view" id="partner_form">
|
||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="inherit_id" ref="base.view_partner_form" />
|
<field name="inherit_id" ref="base.view_partner_form" />
|
||||||
|
|||||||
1
setup/agreement_legal/odoo/addons/agreement_legal
Symbolic link
1
setup/agreement_legal/odoo/addons/agreement_legal
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../agreement_legal
|
||||||
6
setup/agreement_legal/setup.py
Normal file
6
setup/agreement_legal/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user