From fcaddfcb46b4bca10d1e22d966be6aa7960f4239 Mon Sep 17 00:00:00 2001 From: Christopher Rogos Date: Sat, 23 Mar 2024 12:33:38 +0000 Subject: [PATCH] [IMP] contract: black, isort, prettier --- contract/README.rst | 129 ++++++++++-------- contract/controllers/main.py | 3 +- contract/models/contract.py | 2 +- contract/models/contract_line.py | 68 ++++----- contract/models/contract_modification.py | 1 - contract/models/contract_tag.py | 1 - contract/models/contract_terminate_reason.py | 1 - contract/models/res_company.py | 1 - contract/models/res_config_settings.py | 1 - contract/pyproject.toml | 3 + .../readme/{CONFIGURE.rst => CONFIGURE.md} | 7 +- contract/readme/CONTRIBUTORS.md | 23 ++++ contract/readme/CONTRIBUTORS.rst | 16 --- contract/readme/DESCRIPTION.md | 6 + contract/readme/DESCRIPTION.rst | 6 - contract/readme/ROADMAP.md | 2 + contract/readme/ROADMAP.rst | 2 - contract/readme/USAGE.md | 38 ++++++ contract/readme/USAGE.rst | 31 ----- contract/static/description/index.html | 61 +++++---- .../test_contract_manually_create_invoice.py | 2 - .../wizards/contract_contract_terminate.py | 1 - contract/wizards/contract_line_wizard.py | 1 - .../contract_manually_create_invoice.py | 1 - 24 files changed, 217 insertions(+), 190 deletions(-) create mode 100644 contract/pyproject.toml rename contract/readme/{CONFIGURE.rst => CONFIGURE.md} (57%) create mode 100644 contract/readme/CONTRIBUTORS.md delete mode 100644 contract/readme/CONTRIBUTORS.rst create mode 100644 contract/readme/DESCRIPTION.md delete mode 100644 contract/readme/DESCRIPTION.rst create mode 100644 contract/readme/ROADMAP.md delete mode 100644 contract/readme/ROADMAP.rst create mode 100644 contract/readme/USAGE.md delete mode 100644 contract/readme/USAGE.rst 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 `_. 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. @@ -103,33 +117,40 @@ Credits ======= Authors -~~~~~~~ +------- * Tecnativa * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Angel Moya -* Dave Lasley -* Miquel Raïch -* Souheil Bejaoui -* Thomas Binsfeld -* Guillaume Vandamme -* Raphaël Reverdy +- Angel Moya -* `Tecnativa `_: +- Dave Lasley - * Pedro M. Baeza - * Carlos Dauden - * Vicent Cubells - * Rafael Blasco - * Víctor Martínez -* Iván Antón +- Miquel Raïch + +- Souheil Bejaoui + +- Thomas Binsfeld + +- Guillaume Vandamme + +- Raphaël Reverdy + +- `Tecnativa `__: + + - Pedro M. Baeza + - Carlos Dauden + - Vicent Cubells + - Rafael Blasco + - Víctor Martínez + +- Iván Antón Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -141,6 +162,6 @@ 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. diff --git a/contract/controllers/main.py b/contract/controllers/main.py index 844444218..e588bd02f 100644 --- a/contract/controllers/main.py +++ b/contract/controllers/main.py @@ -5,7 +5,8 @@ from odoo import _, http from odoo.exceptions import AccessError, MissingError from odoo.http import request -from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager +from odoo.addons.portal.controllers.portal import CustomerPortal +from odoo.addons.portal.controllers.portal import pager as portal_pager class PortalContract(CustomerPortal): diff --git a/contract/models/contract.py b/contract/models/contract.py index 75e6ac542..05ebf7565 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -198,7 +198,7 @@ class ContractContract(models.Model): def _compute_access_url(self): for record in self: - record.access_url = "/my/contracts/{}".format(record.id) + record.access_url = f"/my/contracts/{record.id}" def action_preview(self): """Invoked when 'Preview' button in contract form view is clicked.""" diff --git a/contract/models/contract_line.py b/contract/models/contract_line.py index aa3c6f744..3780a59aa 100644 --- a/contract/models/contract_line.py +++ b/contract/models/contract_line.py @@ -680,19 +680,16 @@ class ContractLine(models.Model): rec._prepare_value_for_stop(date_end, manual_renew_needed) ) if post_message: - msg = ( - _( - """Contract line for %(product)s + msg = _( + """Contract line for %(product)s stopped:
- 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 \<\> + +- Dave Lasley \<\> + +- Miquel Raïch \<\> + +- Souheil Bejaoui \<\> + +- Thomas Binsfeld \<\> + +- Guillaume Vandamme \<\> + +- Raphaël Reverdy \<\> + +- [Tecnativa](https://www.tecnativa.com): + + > - Pedro M. Baeza + > - Carlos Dauden + > - Vicent Cubells + > - Rafael Blasco + > - Víctor Martínez + +- Iván Antón \<\> diff --git a/contract/readme/CONTRIBUTORS.rst b/contract/readme/CONTRIBUTORS.rst deleted file mode 100644 index dda95e89e..000000000 --- a/contract/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,16 +0,0 @@ -* Angel Moya -* Dave Lasley -* Miquel Raïch -* Souheil Bejaoui -* Thomas Binsfeld -* Guillaume Vandamme -* Raphaël Reverdy - -* `Tecnativa `_: - - * Pedro M. Baeza - * Carlos Dauden - * Vicent Cubells - * Rafael Blasco - * Víctor Martínez -* Iván Antón diff --git a/contract/readme/DESCRIPTION.md b/contract/readme/DESCRIPTION.md new file mode 100644 index 000000000..67bb5b02e --- /dev/null +++ b/contract/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +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. diff --git a/contract/readme/DESCRIPTION.rst b/contract/readme/DESCRIPTION.rst deleted file mode 100644 index 0957068f4..000000000 --- a/contract/readme/DESCRIPTION.rst +++ /dev/null @@ -1,6 +0,0 @@ -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. diff --git a/contract/readme/ROADMAP.md b/contract/readme/ROADMAP.md new file mode 100644 index 000000000..dbc01babb --- /dev/null +++ b/contract/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- Recover states and others functional fields in Contracts. +- Add recurrence flag at template level. diff --git a/contract/readme/ROADMAP.rst b/contract/readme/ROADMAP.rst deleted file mode 100644 index 0e42fcb53..000000000 --- a/contract/readme/ROADMAP.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Recover states and others functional fields in Contracts. -* Add recurrence flag at template level. diff --git a/contract/readme/USAGE.md b/contract/readme/USAGE.md new file mode 100644 index 000000000..c7ab9b7ae --- /dev/null +++ b/contract/readme/USAGE.md @@ -0,0 +1,38 @@ +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) +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) +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: + +![image](../static/src/screenshots/portal-my.png) + +![image](../static/src/screenshots/portal-list.png) + +![image](../static/src/screenshots/portal-detail.png) diff --git a/contract/readme/USAGE.rst b/contract/readme/USAGE.rst deleted file mode 100644 index 7257cf153..000000000 --- a/contract/readme/USAGE.rst +++ /dev/null @@ -1,31 +0,0 @@ -#. Contracts are in Invoicing -> Customers -> Customer and Invoicing -> Vendors -> Supplier Contracts -#. When creating a contract, fill fields for selecting the invoicing parameters: - - * a journal - * a price list (optional) - -#. 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 "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. - -* Contracts appear in portal to following users in every contract: - -.. image:: ../static/src/screenshots/portal-my.png -.. image:: ../static/src/screenshots/portal-list.png -.. image:: ../static/src/screenshots/portal-detail.png diff --git a/contract/static/description/index.html b/contract/static/description/index.html index 90169a52c..69be2f971 100644 --- a/contract/static/description/index.html +++ b/contract/static/description/index.html @@ -1,3 +1,4 @@ + @@ -368,9 +369,9 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:0aeda9acaac627301a3132181f4e0e2fec4daa4e0c20194a82b2bab5b73afc80 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

-

This module enables contracts management with recurring -invoicing functions. Also you can print and send by email contract report.

+

Production/Stable License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

+

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

@@ -390,45 +391,53 @@ invoicing functions. Also you can print and send by email contract report.

Configuration

-

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.

Usage

    -
  1. Contracts are in Invoicing -> Customers -> Customer and Invoicing -> Vendors -> Supplier Contracts
  2. -
  3. When creating a contract, fill fields for selecting the invoicing parameters:
      +
    • Contracts are in Invoicing -> Customers -> Customer and Invoicing -> +Vendors -> Supplier Contracts
    • +
    • When creating a contract, fill fields for selecting the invoicing +parameters:
      • a journal
      • a price list (optional)
    • 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 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 “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.
    • +
    • 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:
-https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-my.png -https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-list.png -https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-detail.png +

image

+

image1

+

image2

Known issues / Roadmap

@@ -442,7 +451,7 @@ To use it, just select the template on the contract and fields will be filled au

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.

@@ -493,7 +502,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

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.

diff --git a/contract/tests/test_contract_manually_create_invoice.py b/contract/tests/test_contract_manually_create_invoice.py index 4eedf8c6c..1ab94a873 100644 --- a/contract/tests/test_contract_manually_create_invoice.py +++ b/contract/tests/test_contract_manually_create_invoice.py @@ -19,7 +19,6 @@ class TestContractManuallyCreateInvoice(TestContractBase): cls.contract2.unlink() def test_contract_manually_create_invoice(self): - contracts = self.contract for _i in range(10): contracts |= self.contract.copy() @@ -47,7 +46,6 @@ class TestContractManuallyCreateInvoice(TestContractBase): self.assertEqual(len(invoices), contract_to_invoice_count) def test_contract_manually_create_invoice_with_usererror(self): - contracts = self.contract accounts = self.product_1.product_tmpl_id.get_product_accounts() diff --git a/contract/wizards/contract_contract_terminate.py b/contract/wizards/contract_contract_terminate.py index 35963bd17..2c26f478d 100644 --- a/contract/wizards/contract_contract_terminate.py +++ b/contract/wizards/contract_contract_terminate.py @@ -5,7 +5,6 @@ from odoo import fields, models class ContractContractTerminate(models.TransientModel): - _name = "contract.contract.terminate" _description = "Terminate Contract Wizard" diff --git a/contract/wizards/contract_line_wizard.py b/contract/wizards/contract_line_wizard.py index d90325e83..198a521a4 100644 --- a/contract/wizards/contract_line_wizard.py +++ b/contract/wizards/contract_line_wizard.py @@ -5,7 +5,6 @@ from odoo import fields, models class ContractLineWizard(models.TransientModel): - _name = "contract.line.wizard" _description = "Contract Line Wizard" diff --git a/contract/wizards/contract_manually_create_invoice.py b/contract/wizards/contract_manually_create_invoice.py index d22c7c086..940cc922f 100644 --- a/contract/wizards/contract_manually_create_invoice.py +++ b/contract/wizards/contract_manually_create_invoice.py @@ -12,7 +12,6 @@ from odoo.exceptions import ( class ContractManuallyCreateInvoice(models.TransientModel): - _name = "contract.manually.create.invoice" _description = "Contract Manually Create Invoice Wizard"