diff --git a/contract/README.rst b/contract/README.rst
index ca412514e..a9e14806b 100644
--- a/contract/README.rst
+++ b/contract/README.rst
@@ -17,19 +17,19 @@ Recurring - Contracts Management
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
- :target: https://github.com/OCA/contract/tree/16.0/contract
+ :target: https://github.com/OCA/contract/tree/17.0/contract
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract
+ :target: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=16.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=17.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
-This module enables contracts management with recurring
-invoicing functions. Also you can print and send by email contract report.
+This module enables contracts management with recurring invoicing
+functions. Also you can print and send by email contract report.
It works for customer contract and supplier contracts.
@@ -43,51 +43,65 @@ Contracts are shown in portal.
Configuration
=============
-To view discount field in contract line, you need to set *Discount on lines* in
-user access rights.
+To view discount field in contract line, you need to set *Discount on
+lines* in user access rights.
-Contracts can be viewed on the portal (list and detail) if the user logged into the portal is a follower of the contract.
+Contracts can be viewed on the portal (list and detail) if the user
+logged into the portal is a follower of the contract.
Usage
=====
-#. Contracts are in Invoicing -> Customers -> Customer and Invoicing -> Vendors -> Supplier Contracts
-#. When creating a contract, fill fields for selecting the invoicing parameters:
+1. Contracts are in Invoicing -> Customers -> Customer and Invoicing ->
+ Vendors -> Supplier Contracts
+2. When creating a contract, fill fields for selecting the invoicing
+ parameters:
- * a journal
- * a price list (optional)
+ - a journal
+ - a price list (optional)
-#. And add the lines to be invoiced with:
+3. And add the lines to be invoiced with:
- * the product with a description, a quantity and a price
- * the recurrence parameters: interval (days, weeks, months, months last day or years),
- start date, date of next invoice (automatically computed, can be modified) and end date (optional)
- * auto-price, for having a price automatically obtained from the price list
- * #START# or #END# in the description field to display the start/end date of
- the invoiced period in the invoice line description
- * pre-paid (invoice at period start) or post-paid (invoice at start of next period)
+ - the product with a description, a quantity and a price
+ - the recurrence parameters: interval (days, weeks, months, months
+ last day or years), start date, date of next invoice
+ (automatically computed, can be modified) and end date (optional)
+ - auto-price, for having a price automatically obtained from the
+ price list
+ - #START# or #END# in the description field to display the start/end
+ date of the invoiced period in the invoice line description
+ - pre-paid (invoice at period start) or post-paid (invoice at start
+ of next period)
-#. The "Generate Recurring Invoices from Contracts" cron runs daily to generate the invoices.
- If you are in debug mode, you can click on the invoice creation button.
-#. The *Show recurring invoices* shortcut on contracts shows all invoices created from the
- contract.
-#. The contract report can be printed from the Print menu
-#. The contract can be sent by email with the *Send by Email* button
-#. Contract templates can be created from the Configuration -> Contracts -> Contract Templates menu.
- They allow to define default journal, price list and lines when creating a contract.
- To use it, just select the template on the contract and fields will be filled automatically.
+4. The "Generate Recurring Invoices from Contracts" cron runs daily to
+ generate the invoices. If you are in debug mode, you can click on the
+ invoice creation button.
+5. The *Show recurring invoices* shortcut on contracts shows all
+ invoices created from the contract.
+6. The contract report can be printed from the Print menu
+7. The contract can be sent by email with the *Send by Email* button
+8. Contract templates can be created from the Configuration -> Contracts
+ -> Contract Templates menu. They allow to define default journal,
+ price list and lines when creating a contract. To use it, just select
+ the template on the contract and fields will be filled automatically.
-* Contracts appear in portal to following users in every contract:
+- Contracts appear in portal to following users in every contract:
-.. image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-my.png
-.. image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-list.png
-.. image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-detail.png
+|image|
+
+|image1|
+
+|image2|
+
+.. |image| image:: https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-my.png
+.. |image1| image:: https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-list.png
+.. |image2| image:: https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-detail.png
Known issues / Roadmap
======================
-* Recover states and others functional fields in Contracts.
-* Add recurrence flag at template level.
+- Recover states and others functional fields in Contracts.
+- Add recurrence flag at template level.
Bug Tracker
===========
@@ -95,7 +109,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues This module enables contracts management with recurring
-invoicing functions. Also you can print and send by email contract report. This module enables contracts management with recurring invoicing
+functions. Also you can print and send by email contract report. It works for customer contract and supplier contracts. Contracts are shown in portal. Table of contents
- End: %(old_end)s -- %(new_end)s
"""
- )
- % {
- "product": rec.name,
- "old_end": old_date_end,
- "new_end": rec.date_end,
- }
- )
+ ) % {
+ "product": rec.name,
+ "old_end": old_date_end,
+ "new_end": rec.date_end,
+ }
rec.contract_id.message_post(body=msg)
else:
rec.write(
@@ -757,21 +754,18 @@ class ContractLine(models.Model):
rec.successor_contract_line_id = new_line
contract_line |= new_line
if post_message:
- msg = (
- _(
- """Contract line for %(product)s
+ msg = _(
+ """Contract line for %(product)s
planned a successor:
- Start: %(new_date_start)s
- End: %(new_date_end)s
"""
- )
- % {
- "product": rec.name,
- "new_date_start": new_line.date_start,
- "new_date_end": new_line.date_end,
- }
- )
+ ) % {
+ "product": rec.name,
+ "new_date_start": new_line.date_start,
+ "new_date_end": new_line.date_end,
+ }
rec.contract_id.message_post(body=msg)
return contract_line
@@ -863,21 +857,18 @@ class ContractLine(models.Model):
is_auto_renew,
post_message=False,
)
- msg = (
- _(
- """Contract line for %(product)s
+ msg = _(
+ """Contract line for %(product)s
suspended:
- Suspension Start: %(new_date_start)s
- Suspension End: %(new_date_end)s
"""
- )
- % {
- "product": rec.name,
- "new_date_start": date_start,
- "new_date_end": date_end,
- }
- )
+ ) % {
+ "product": rec.name,
+ "new_date_start": date_start,
+ "new_date_end": date_end,
+ }
rec.contract_id.message_post(body=msg)
return contract_line
@@ -1035,21 +1026,18 @@ class ContractLine(models.Model):
else:
new_line = rec._renew_extend_line(date_end)
res |= new_line
- msg = (
- _(
- """Contract line for %(product)s
+ msg = _(
+ """Contract line for %(product)s
renewed:
- Start: %(new_date_start)s
- End: %(new_date_end)s
"""
- )
- % {
- "product": rec.name,
- "new_date_start": date_start,
- "new_date_end": date_end,
- }
- )
+ ) % {
+ "product": rec.name,
+ "new_date_start": date_start,
+ "new_date_end": date_end,
+ }
rec.contract_id.message_post(body=msg)
return res
diff --git a/contract/models/contract_modification.py b/contract/models/contract_modification.py
index 5c2e487e4..55647baee 100644
--- a/contract/models/contract_modification.py
+++ b/contract/models/contract_modification.py
@@ -5,7 +5,6 @@ from odoo import api, fields, models
class ContractModification(models.Model):
-
_name = "contract.modification"
_description = "Contract Modification"
_order = "date desc"
diff --git a/contract/models/contract_tag.py b/contract/models/contract_tag.py
index d1cd4feaa..ad77be528 100644
--- a/contract/models/contract_tag.py
+++ b/contract/models/contract_tag.py
@@ -5,7 +5,6 @@ from odoo import fields, models
class ContractTag(models.Model):
-
_name = "contract.tag"
_description = "Contract Tag"
diff --git a/contract/models/contract_terminate_reason.py b/contract/models/contract_terminate_reason.py
index f5ec8b507..48215a41d 100644
--- a/contract/models/contract_terminate_reason.py
+++ b/contract/models/contract_terminate_reason.py
@@ -5,7 +5,6 @@ from odoo import fields, models
class ContractTerminateReason(models.Model):
-
_name = "contract.terminate.reason"
_description = "Contract Termination Reason"
diff --git a/contract/models/res_company.py b/contract/models/res_company.py
index 41be6d314..36079fc81 100644
--- a/contract/models/res_company.py
+++ b/contract/models/res_company.py
@@ -5,7 +5,6 @@ from odoo import fields, models
class ResCompany(models.Model):
-
_inherit = "res.company"
create_new_line_at_contract_line_renew = fields.Boolean(
diff --git a/contract/models/res_config_settings.py b/contract/models/res_config_settings.py
index 00a784ed6..e5f628a2a 100644
--- a/contract/models/res_config_settings.py
+++ b/contract/models/res_config_settings.py
@@ -5,7 +5,6 @@ from odoo import fields, models
class ResConfigSettings(models.TransientModel):
-
_inherit = "res.config.settings"
create_new_line_at_contract_line_renew = fields.Boolean(
diff --git a/contract/pyproject.toml b/contract/pyproject.toml
new file mode 100644
index 000000000..4231d0ccc
--- /dev/null
+++ b/contract/pyproject.toml
@@ -0,0 +1,3 @@
+[build-system]
+requires = ["whool"]
+build-backend = "whool.buildapi"
diff --git a/contract/readme/CONFIGURE.rst b/contract/readme/CONFIGURE.md
similarity index 57%
rename from contract/readme/CONFIGURE.rst
rename to contract/readme/CONFIGURE.md
index abb4f81db..5ff4617af 100644
--- a/contract/readme/CONFIGURE.rst
+++ b/contract/readme/CONFIGURE.md
@@ -1,4 +1,5 @@
-To view discount field in contract line, you need to set *Discount on lines* in
-user access rights.
+To view discount field in contract line, you need to set *Discount on
+lines* in user access rights.
-Contracts can be viewed on the portal (list and detail) if the user logged into the portal is a follower of the contract.
+Contracts can be viewed on the portal (list and detail) if the user
+logged into the portal is a follower of the contract.
diff --git a/contract/readme/CONTRIBUTORS.md b/contract/readme/CONTRIBUTORS.md
new file mode 100644
index 000000000..ebd34b4fb
--- /dev/null
+++ b/contract/readme/CONTRIBUTORS.md
@@ -0,0 +1,23 @@
+- Angel Moya \<
To view discount field in contract line, you need to set Discount on lines in -user access rights.
-Contracts can be viewed on the portal (list and detail) if the user logged into the portal is a follower of the contract.
+To view discount field in contract line, you need to set Discount on +lines in user access rights.
+Contracts can be viewed on the portal (list and detail) if the user +logged into the portal is a follower of the contract.
-
-
+


Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.
+feedback.Do not contact contributors directly about support or help with technical issues.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
-This module is part of the OCA/contract project on GitHub.
+This module is part of the OCA/contract project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.