mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] agreement_legal: remove account dependency
[FIX] ooops [UPD] README.rst
This commit is contained in:
committed by
Víctor Martínez
parent
f597f4cca8
commit
2efe22ccf0
@@ -1,6 +1,6 @@
|
|||||||
==========
|
================
|
||||||
Agreements
|
Agreements Legal
|
||||||
==========
|
================
|
||||||
|
|
||||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
@@ -14,13 +14,13 @@ Agreements
|
|||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/contract/tree/11.0/agreement
|
:target: https://github.com/OCA/contract/tree/12.0/agreement_legal
|
||||||
:alt: OCA/contract
|
:alt: OCA/contract
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement
|
:target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/110/11.0
|
:target: https://runbot.odoo-community.org/runbot/110/12.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
@@ -55,7 +55,7 @@ Usage
|
|||||||
|
|
||||||
To use this module:
|
To use this module:
|
||||||
|
|
||||||
* Go to Agreement > Agrements
|
* Go to Agreement > Agreements
|
||||||
* Create a new agreement
|
* Create a new agreement
|
||||||
* Select a template
|
* Select a template
|
||||||
* Follow the process to get the required approval
|
* Follow the process to get the required approval
|
||||||
@@ -74,7 +74,7 @@ Bug Tracker
|
|||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20agreement%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20agreement_legal%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
Do not contact contributors directly about support or help with technical issues.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
@@ -86,6 +86,7 @@ Authors
|
|||||||
|
|
||||||
* Pavlov Media
|
* Pavlov Media
|
||||||
* Open Source Integrators
|
* Open Source Integrators
|
||||||
|
* Yves Goldberg (Ygol Internetwork)
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
@@ -95,6 +96,7 @@ Contributors
|
|||||||
* Wolfgang Hall <whall@opensourceintegrators.com>
|
* Wolfgang Hall <whall@opensourceintegrators.com>
|
||||||
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
|
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
|
||||||
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
|
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
|
||||||
|
* Yves Goldberg <yves@ygol.com>
|
||||||
|
|
||||||
Other credits
|
Other credits
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
@@ -103,6 +105,7 @@ The development of this module has been financially supported by:
|
|||||||
|
|
||||||
* Pavlov Media
|
* Pavlov Media
|
||||||
* Open Source Integrators
|
* Open Source Integrators
|
||||||
|
* Yves Goldberg
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@@ -120,11 +123,14 @@ promote its widespread use.
|
|||||||
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
|
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
|
||||||
:target: https://github.com/max3903
|
:target: https://github.com/max3903
|
||||||
:alt: max3903
|
:alt: max3903
|
||||||
|
.. |maintainer-ygol| image:: https://github.com/ygol.png?size=40px
|
||||||
|
:target: https://github.com/ygol
|
||||||
|
:alt: ygol
|
||||||
|
|
||||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
||||||
|
|
||||||
|maintainer-max3903|
|
|maintainer-max3903| |maintainer-ygol|
|
||||||
|
|
||||||
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/11.0/agreement>`_ project on GitHub.
|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/agreement_legal>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"category": "Partner",
|
"category": "Partner",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"version": "12.0.1.0.0",
|
"version": "12.0.1.0.0",
|
||||||
"depends": ["contacts", "agreement", "mail", "product"],
|
"depends": ["contacts", "agreement", "product"],
|
||||||
"data": [
|
"data": [
|
||||||
"data/ir_sequence.xml",
|
"data/ir_sequence.xml",
|
||||||
"data/module_category.xml",
|
"data/module_category.xml",
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Agreement(models.Model):
|
|||||||
end_date = fields.Date(
|
end_date = fields.Date(
|
||||||
string="End Date",
|
string="End Date",
|
||||||
track_visibility="onchange",
|
track_visibility="onchange",
|
||||||
help="When the agreement ends."
|
help="When the agreement ends.",
|
||||||
)
|
)
|
||||||
color = fields.Integer()
|
color = fields.Integer()
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
@@ -121,24 +121,18 @@ class Agreement(models.Model):
|
|||||||
help="Date that the contract was terminated.",
|
help="Date that the contract was terminated.",
|
||||||
)
|
)
|
||||||
reviewed_date = fields.Date(
|
reviewed_date = fields.Date(
|
||||||
string="Reviewed Date",
|
string="Reviewed Date", track_visibility="onchange"
|
||||||
track_visibility="onchange")
|
)
|
||||||
reviewed_user_id = fields.Many2one(
|
reviewed_user_id = fields.Many2one(
|
||||||
"res.users",
|
"res.users", string="Reviewed By", track_visibility="onchange"
|
||||||
string="Reviewed By",
|
|
||||||
track_visibility="onchange"
|
|
||||||
)
|
)
|
||||||
approved_date = fields.Date(
|
approved_date = fields.Date(
|
||||||
string="Approved Date",
|
string="Approved Date", track_visibility="onchange"
|
||||||
track_visibility="onchange")
|
|
||||||
approved_user_id = fields.Many2one(
|
|
||||||
"res.users",
|
|
||||||
string="Approved By",
|
|
||||||
track_visibility="onchange"
|
|
||||||
)
|
)
|
||||||
currency_id = fields.Many2one(
|
approved_user_id = fields.Many2one(
|
||||||
"res.currency",
|
"res.users", string="Approved By", track_visibility="onchange"
|
||||||
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",
|
||||||
@@ -158,12 +152,10 @@ class Agreement(models.Model):
|
|||||||
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",
|
related="partner_contact_id.phone", string="Phone"
|
||||||
string="Phone"
|
|
||||||
)
|
)
|
||||||
partner_contact_email = fields.Char(
|
partner_contact_email = fields.Char(
|
||||||
related="partner_contact_id.email",
|
related="partner_contact_id.email", string="Email"
|
||||||
string="Email"
|
|
||||||
)
|
)
|
||||||
company_contact_id = fields.Many2one(
|
company_contact_id = fields.Many2one(
|
||||||
"res.partner",
|
"res.partner",
|
||||||
@@ -172,12 +164,10 @@ class Agreement(models.Model):
|
|||||||
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",
|
related="company_contact_id.phone", string="Phone"
|
||||||
string="Phone"
|
|
||||||
)
|
)
|
||||||
company_contact_email = fields.Char(
|
company_contact_email = fields.Char(
|
||||||
related="company_contact_id.email",
|
related="company_contact_id.email", string="Email"
|
||||||
string="Email"
|
|
||||||
)
|
)
|
||||||
agreement_type_id = fields.Many2one(
|
agreement_type_id = fields.Many2one(
|
||||||
"agreement.type",
|
"agreement.type",
|
||||||
@@ -193,13 +183,7 @@ class Agreement(models.Model):
|
|||||||
"agreement types.",
|
"agreement types.",
|
||||||
)
|
)
|
||||||
product_ids = fields.Many2many(
|
product_ids = fields.Many2many(
|
||||||
"product.template",
|
"product.template", string="Products & Services"
|
||||||
string="Products & Services")
|
|
||||||
payment_term_id = fields.Many2one(
|
|
||||||
"account.payment.term",
|
|
||||||
string="Payment Term",
|
|
||||||
track_visibility="onchange",
|
|
||||||
help="Terms of payments.",
|
|
||||||
)
|
)
|
||||||
assigned_user_id = fields.Many2one(
|
assigned_user_id = fields.Many2one(
|
||||||
"res.users",
|
"res.users",
|
||||||
@@ -234,28 +218,16 @@ class Agreement(models.Model):
|
|||||||
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.recital", "agreement_id", string="Recitals", copy=True
|
||||||
"agreement_id",
|
|
||||||
string="Recitals",
|
|
||||||
copy=True
|
|
||||||
)
|
)
|
||||||
sections_ids = fields.One2many(
|
sections_ids = fields.One2many(
|
||||||
"agreement.section",
|
"agreement.section", "agreement_id", string="Sections", copy=True
|
||||||
"agreement_id",
|
|
||||||
string="Sections",
|
|
||||||
copy=True
|
|
||||||
)
|
)
|
||||||
clauses_ids = fields.One2many(
|
clauses_ids = fields.One2many(
|
||||||
"agreement.clause",
|
"agreement.clause", "agreement_id", string="Clauses", copy=True
|
||||||
"agreement_id",
|
|
||||||
string="Clauses",
|
|
||||||
copy=True
|
|
||||||
)
|
)
|
||||||
appendix_ids = fields.One2many(
|
appendix_ids = fields.One2many(
|
||||||
"agreement.appendix",
|
"agreement.appendix", "agreement_id", string="Appendices", copy=True
|
||||||
"agreement_id",
|
|
||||||
string="Appendices",
|
|
||||||
copy=True
|
|
||||||
)
|
)
|
||||||
previous_version_agreements_ids = fields.One2many(
|
previous_version_agreements_ids = fields.One2many(
|
||||||
"agreement",
|
"agreement",
|
||||||
@@ -275,12 +247,10 @@ class Agreement(models.Model):
|
|||||||
"agreement.line",
|
"agreement.line",
|
||||||
"agreement_id",
|
"agreement_id",
|
||||||
string="Products/Services",
|
string="Products/Services",
|
||||||
copy=False
|
copy=False,
|
||||||
)
|
)
|
||||||
state = fields.Selection(
|
state = fields.Selection(
|
||||||
[("draft", "Draft"),
|
[("draft", "Draft"), ("active", "Active"), ("inactive", "Inactive")],
|
||||||
("active", "Active"),
|
|
||||||
("inactive", "Inactive")],
|
|
||||||
default="draft",
|
default="draft",
|
||||||
track_visibility="always",
|
track_visibility="always",
|
||||||
)
|
)
|
||||||
@@ -292,8 +262,8 @@ class Agreement(models.Model):
|
|||||||
)
|
)
|
||||||
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",
|
string="Signed Document", track_visibility="always"
|
||||||
track_visibility="always")
|
)
|
||||||
field_id = fields.Many2one(
|
field_id = fields.Many2one(
|
||||||
"ir.model.fields",
|
"ir.model.fields",
|
||||||
string="Field",
|
string="Field",
|
||||||
@@ -331,7 +301,8 @@ class Agreement(models.Model):
|
|||||||
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
|
||||||
@@ -342,7 +313,8 @@ class Agreement(models.Model):
|
|||||||
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
|
||||||
@@ -354,8 +326,7 @@ class Agreement(models.Model):
|
|||||||
self.sub_object_id = False
|
self.sub_object_id = False
|
||||||
if self.field_id and not self.field_id.relation:
|
if self.field_id and not self.field_id.relation:
|
||||||
self.copyvalue = "${{object.{} or {}}}".format(
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
self.field_id.name,
|
self.field_id.name, self.default_value or "''"
|
||||||
self.default_value or "''",
|
|
||||||
)
|
)
|
||||||
self.sub_model_object_field_id = False
|
self.sub_model_object_field_id = False
|
||||||
if self.field_id and self.field_id.relation:
|
if self.field_id and self.field_id.relation:
|
||||||
@@ -425,10 +396,9 @@ class Agreement(models.Model):
|
|||||||
@api.model
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
if vals.get("reference", _("New")) == _("New"):
|
if vals.get("reference", _("New")) == _("New"):
|
||||||
vals["reference"] = self.env[
|
vals["reference"] = self.env["ir.sequence"].next_by_code(
|
||||||
"ir.sequence"].next_by_code("agreement") or _(
|
"agreement"
|
||||||
"New"
|
) or _("New")
|
||||||
)
|
|
||||||
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
|
||||||
|
|||||||
@@ -12,11 +12,9 @@ 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(
|
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",
|
||||||
@@ -24,9 +22,8 @@ class AgreementRecital(models.Model):
|
|||||||
help="compute dynamic Content",
|
help="compute dynamic Content",
|
||||||
)
|
)
|
||||||
agreement_id = fields.Many2one(
|
agreement_id = fields.Many2one(
|
||||||
"agreement",
|
"agreement", string="Agreement", ondelete="cascade"
|
||||||
string="Agreement",
|
)
|
||||||
ondelete="cascade")
|
|
||||||
active = fields.Boolean(
|
active = fields.Boolean(
|
||||||
string="Active",
|
string="Active",
|
||||||
default=True,
|
default=True,
|
||||||
@@ -65,24 +62,26 @@ class AgreementRecital(models.Model):
|
|||||||
template field.""",
|
template field.""",
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
|
@api.onchange("field_id", "sub_model_object_field_id", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
self.sub_object_id = False
|
self.sub_object_id = False
|
||||||
self.copyvalue = False
|
self.copyvalue = False
|
||||||
self.sub_object_id = False
|
self.sub_object_id = False
|
||||||
if self.field_id and not self.field_id.relation:
|
if self.field_id and not self.field_id.relation:
|
||||||
self.copyvalue = "${object.%s or %s}" % \
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
(self.field_id.name,
|
self.field_id.name, self.default_value or "''"
|
||||||
self.default_value or '\'\'')
|
)
|
||||||
self.sub_model_object_field_id = False
|
self.sub_model_object_field_id = False
|
||||||
if self.field_id and self.field_id.relation:
|
if self.field_id and self.field_id.relation:
|
||||||
self.sub_object_id = self.env['ir.model'].search(
|
self.sub_object_id = self.env["ir.model"].search(
|
||||||
[('model', '=', self.field_id.relation)])[0]
|
[("model", "=", self.field_id.relation)]
|
||||||
|
)[0]
|
||||||
if self.sub_model_object_field_id:
|
if self.sub_model_object_field_id:
|
||||||
self.copyvalue = "${object.%s.%s or %s}" %\
|
self.copyvalue = "${{object.{}.{} or {}}}".format(
|
||||||
(self.field_id.name,
|
self.field_id.name,
|
||||||
self.sub_model_object_field_id.name,
|
self.sub_model_object_field_id.name,
|
||||||
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
|
||||||
|
|||||||
@@ -12,17 +12,15 @@ 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",
|
"agreement", string="Agreement", ondelete="cascade"
|
||||||
string="Agreement",
|
)
|
||||||
ondelete="cascade")
|
|
||||||
clauses_ids = fields.One2many(
|
clauses_ids = fields.One2many(
|
||||||
"agreement.clause",
|
"agreement.clause", "section_id", string="Clauses"
|
||||||
"section_id",
|
)
|
||||||
string="Clauses")
|
|
||||||
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",
|
||||||
@@ -67,24 +65,26 @@ class AgreementSection(models.Model):
|
|||||||
template field.""",
|
template field.""",
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
|
@api.onchange("field_id", "sub_model_object_field_id", "default_value")
|
||||||
def onchange_copyvalue(self):
|
def onchange_copyvalue(self):
|
||||||
self.sub_object_id = False
|
self.sub_object_id = False
|
||||||
self.copyvalue = False
|
self.copyvalue = False
|
||||||
self.sub_object_id = False
|
self.sub_object_id = False
|
||||||
if self.field_id and not self.field_id.relation:
|
if self.field_id and not self.field_id.relation:
|
||||||
self.copyvalue = "${object.%s or %s}" % \
|
self.copyvalue = "${{object.{} or {}}}".format(
|
||||||
(self.field_id.name,
|
self.field_id.name, self.default_value or "''"
|
||||||
self.default_value or '\'\'')
|
)
|
||||||
self.sub_model_object_field_id = False
|
self.sub_model_object_field_id = False
|
||||||
if self.field_id and self.field_id.relation:
|
if self.field_id and self.field_id.relation:
|
||||||
self.sub_object_id = self.env['ir.model'].search(
|
self.sub_object_id = self.env["ir.model"].search(
|
||||||
[('model', '=', self.field_id.relation)])[0]
|
[("model", "=", self.field_id.relation)]
|
||||||
|
)[0]
|
||||||
if self.sub_model_object_field_id:
|
if self.sub_model_object_field_id:
|
||||||
self.copyvalue = "${object.%s.%s or %s}" %\
|
self.copyvalue = "${{object.{}.{} or {}}}".format(
|
||||||
(self.field_id.name,
|
self.field_id.name,
|
||||||
self.sub_model_object_field_id.name,
|
self.sub_model_object_field_id.name,
|
||||||
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
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
||||||
<title>Agreements</title>
|
<title>Agreements Legal</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -360,14 +360,14 @@ ul.auto-toc {
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="document" id="agreements">
|
<div class="document" id="agreements-legal">
|
||||||
<h1 class="title">Agreements</h1>
|
<h1 class="title">Agreements Legal</h1>
|
||||||
|
|
||||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_legal"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This module allows you to manage agreements, letter of intent and contract content.
|
<p>This module allows you to manage agreements, letter of intent and contract content.
|
||||||
The module is meant to be used by the legal team of a company and to allow them
|
The module is meant to be used by the legal team of a company and to allow them
|
||||||
to define sections, clauses and templates with their respective content that can
|
to define sections, clauses and templates with their respective content that can
|
||||||
@@ -405,7 +405,7 @@ customer signature.</p>
|
|||||||
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
|
||||||
<p>To use this module:</p>
|
<p>To use this module:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Go to Agreement > Agrements</li>
|
<li>Go to Agreement > Agreements</li>
|
||||||
<li>Create a new agreement</li>
|
<li>Create a new agreement</li>
|
||||||
<li>Select a template</li>
|
<li>Select a template</li>
|
||||||
<li>Follow the process to get the required approval</li>
|
<li>Follow the process to get the required approval</li>
|
||||||
@@ -425,7 +425,7 @@ agreement_purchase)</li>
|
|||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement_legal%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
@@ -435,6 +435,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Pavlov Media</li>
|
<li>Pavlov Media</li>
|
||||||
<li>Open Source Integrators</li>
|
<li>Open Source Integrators</li>
|
||||||
|
<li>Yves Goldberg (Ygol Internetwork)</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="contributors">
|
<div class="section" id="contributors">
|
||||||
@@ -445,6 +446,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<li>Wolfgang Hall <<a class="reference external" href="mailto:whall@opensourceintegrators.com">whall@opensourceintegrators.com</a>></li>
|
<li>Wolfgang Hall <<a class="reference external" href="mailto:whall@opensourceintegrators.com">whall@opensourceintegrators.com</a>></li>
|
||||||
<li>Maxime Chambreuil <<a class="reference external" href="mailto:mchambreuil@opensourceintegrators.com">mchambreuil@opensourceintegrators.com</a>></li>
|
<li>Maxime Chambreuil <<a class="reference external" href="mailto:mchambreuil@opensourceintegrators.com">mchambreuil@opensourceintegrators.com</a>></li>
|
||||||
<li>Sandip Mangukiya <<a class="reference external" href="mailto:smangukiya@opensourceintegrators.com">smangukiya@opensourceintegrators.com</a>></li>
|
<li>Sandip Mangukiya <<a class="reference external" href="mailto:smangukiya@opensourceintegrators.com">smangukiya@opensourceintegrators.com</a>></li>
|
||||||
|
<li>Yves Goldberg <<a class="reference external" href="mailto:yves@ygol.com">yves@ygol.com</a>></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="other-credits">
|
<div class="section" id="other-credits">
|
||||||
@@ -453,6 +455,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>Pavlov Media</li>
|
<li>Pavlov Media</li>
|
||||||
<li>Open Source Integrators</li>
|
<li>Open Source Integrators</li>
|
||||||
|
<li>Yves Goldberg</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
@@ -462,9 +465,9 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
||||||
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
|
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a> <a class="reference external" href="https://github.com/ygol"><img alt="ygol" src="https://github.com/ygol.png?size=40px" /></a></p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement">OCA/contract</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_legal">OCA/contract</a> project on GitHub.</p>
|
||||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -130,12 +130,6 @@
|
|||||||
<field name="termination_requested"/>
|
<field name="termination_requested"/>
|
||||||
<field name="termination_date"/>
|
<field name="termination_date"/>
|
||||||
</group>
|
</group>
|
||||||
<group name="paymentterm_right" string="Payment Terms">
|
|
||||||
<field name="term" attrs="{'invisible': [('partner_id', '=', False)]}"/>
|
|
||||||
<field name="payment_term_id" widget="selection"/>
|
|
||||||
<field name="renewal_type_id" widget="selection"/>
|
|
||||||
<field name="increase_type_id" widget="selection"/>
|
|
||||||
</group>
|
|
||||||
</group>
|
</group>
|
||||||
<group string="Special Terms">
|
<group string="Special Terms">
|
||||||
<field name="special_terms"
|
<field name="special_terms"
|
||||||
|
|||||||
Reference in New Issue
Block a user