mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract: black, isort, prettier
This commit is contained in:
@@ -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 <https://github.com/OCA/contract/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 <https://github.com/OCA/contract/issues/new?body=module:%20contract%0Aversion:%2016.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:%20contract%0Aversion:%2017.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.
|
||||
|
||||
@@ -103,33 +117,40 @@ Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
* Tecnativa
|
||||
* ACSONE SA/NV
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
|
||||
* Angel Moya <angel.moya@domatix.com>
|
||||
* Dave Lasley <dave@laslabs.com>
|
||||
* Miquel Raïch <miquel.raich@eficent.com>
|
||||
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
||||
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||
* Guillaume Vandamme <guillaume.vandamme@acsone.eu>
|
||||
* Raphaël Reverdy <raphael.reverdy@akretion.com>
|
||||
- Angel Moya <angel.moya@domatix.com>
|
||||
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
- Dave Lasley <dave@laslabs.com>
|
||||
|
||||
* Pedro M. Baeza
|
||||
* Carlos Dauden
|
||||
* Vicent Cubells
|
||||
* Rafael Blasco
|
||||
* Víctor Martínez
|
||||
* Iván Antón <ozono@ozonomultimedia.com>
|
||||
- Miquel Raïch <miquel.raich@eficent.com>
|
||||
|
||||
- Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
||||
|
||||
- Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||
|
||||
- Guillaume Vandamme <guillaume.vandamme@acsone.eu>
|
||||
|
||||
- Raphaël Reverdy <raphael.reverdy@akretion.com>
|
||||
|
||||
- `Tecnativa <https://www.tecnativa.com>`__:
|
||||
|
||||
- Pedro M. Baeza
|
||||
- Carlos Dauden
|
||||
- Vicent Cubells
|
||||
- Rafael Blasco
|
||||
- Víctor Martínez
|
||||
|
||||
- Iván Antón <ozono@ozonomultimedia.com>
|
||||
|
||||
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 <https://github.com/OCA/contract/tree/16.0/contract>`_ project on GitHub.
|
||||
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/17.0/contract>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -680,19 +680,16 @@ class ContractLine(models.Model):
|
||||
rec._prepare_value_for_stop(date_end, manual_renew_needed)
|
||||
)
|
||||
if post_message:
|
||||
msg = (
|
||||
_(
|
||||
msg = _(
|
||||
"""Contract line for <strong>%(product)s</strong>
|
||||
stopped: <br/>
|
||||
- <strong>End</strong>: %(old_end)s -- %(new_end)s
|
||||
"""
|
||||
)
|
||||
% {
|
||||
) % {
|
||||
"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 = (
|
||||
_(
|
||||
msg = _(
|
||||
"""Contract line for <strong>%(product)s</strong>
|
||||
planned a successor: <br/>
|
||||
- <strong>Start</strong>: %(new_date_start)s
|
||||
<br/>
|
||||
- <strong>End</strong>: %(new_date_end)s
|
||||
"""
|
||||
)
|
||||
% {
|
||||
) % {
|
||||
"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 = (
|
||||
_(
|
||||
msg = _(
|
||||
"""Contract line for <strong>%(product)s</strong>
|
||||
suspended: <br/>
|
||||
- <strong>Suspension Start</strong>: %(new_date_start)s
|
||||
<br/>
|
||||
- <strong>Suspension End</strong>: %(new_date_end)s
|
||||
"""
|
||||
)
|
||||
% {
|
||||
) % {
|
||||
"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 = (
|
||||
_(
|
||||
msg = _(
|
||||
"""Contract line for <strong>%(product)s</strong>
|
||||
renewed: <br/>
|
||||
- <strong>Start</strong>: %(new_date_start)s
|
||||
<br/>
|
||||
- <strong>End</strong>: %(new_date_end)s
|
||||
"""
|
||||
)
|
||||
% {
|
||||
) % {
|
||||
"product": rec.name,
|
||||
"new_date_start": date_start,
|
||||
"new_date_end": date_end,
|
||||
}
|
||||
)
|
||||
rec.contract_id.message_post(body=msg)
|
||||
return res
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from odoo import api, fields, models
|
||||
|
||||
|
||||
class ContractModification(models.Model):
|
||||
|
||||
_name = "contract.modification"
|
||||
_description = "Contract Modification"
|
||||
_order = "date desc"
|
||||
|
||||
@@ -5,7 +5,6 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class ContractTag(models.Model):
|
||||
|
||||
_name = "contract.tag"
|
||||
_description = "Contract Tag"
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class ContractTerminateReason(models.Model):
|
||||
|
||||
_name = "contract.terminate.reason"
|
||||
_description = "Contract Termination Reason"
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
3
contract/pyproject.toml
Normal file
3
contract/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
@@ -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.
|
||||
23
contract/readme/CONTRIBUTORS.md
Normal file
23
contract/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,23 @@
|
||||
- Angel Moya \<<angel.moya@domatix.com>\>
|
||||
|
||||
- Dave Lasley \<<dave@laslabs.com>\>
|
||||
|
||||
- Miquel Raïch \<<miquel.raich@eficent.com>\>
|
||||
|
||||
- Souheil Bejaoui \<<souheil.bejaoui@acsone.eu>\>
|
||||
|
||||
- Thomas Binsfeld \<<thomas.binsfeld@acsone.eu>\>
|
||||
|
||||
- Guillaume Vandamme \<<guillaume.vandamme@acsone.eu>\>
|
||||
|
||||
- Raphaël Reverdy \<<raphael.reverdy@akretion.com>\>
|
||||
|
||||
- [Tecnativa](https://www.tecnativa.com):
|
||||
|
||||
> - Pedro M. Baeza
|
||||
> - Carlos Dauden
|
||||
> - Vicent Cubells
|
||||
> - Rafael Blasco
|
||||
> - Víctor Martínez
|
||||
|
||||
- Iván Antón \<<ozono@ozonomultimedia.com>\>
|
||||
@@ -1,16 +0,0 @@
|
||||
* Angel Moya <angel.moya@domatix.com>
|
||||
* Dave Lasley <dave@laslabs.com>
|
||||
* Miquel Raïch <miquel.raich@eficent.com>
|
||||
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
||||
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||
* Guillaume Vandamme <guillaume.vandamme@acsone.eu>
|
||||
* Raphaël Reverdy <raphael.reverdy@akretion.com>
|
||||
|
||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Pedro M. Baeza
|
||||
* Carlos Dauden
|
||||
* Vicent Cubells
|
||||
* Rafael Blasco
|
||||
* Víctor Martínez
|
||||
* Iván Antón <ozono@ozonomultimedia.com>
|
||||
6
contract/readme/DESCRIPTION.md
Normal file
6
contract/readme/DESCRIPTION.md
Normal file
@@ -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.
|
||||
@@ -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.
|
||||
2
contract/readme/ROADMAP.md
Normal file
2
contract/readme/ROADMAP.md
Normal file
@@ -0,0 +1,2 @@
|
||||
- Recover states and others functional fields in Contracts.
|
||||
- Add recurrence flag at template level.
|
||||
@@ -1,2 +0,0 @@
|
||||
* Recover states and others functional fields in Contracts.
|
||||
* Add recurrence flag at template level.
|
||||
38
contract/readme/USAGE.md
Normal file
38
contract/readme/USAGE.md
Normal file
@@ -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:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
@@ -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
|
||||
@@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
@@ -368,9 +369,9 @@ ul.auto-toc {
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:0aeda9acaac627301a3132181f4e0e2fec4daa4e0c20194a82b2bab5b73afc80
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/contract/tree/16.0/contract"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module enables contracts management with recurring
|
||||
invoicing functions. Also you can print and send by email contract report.</p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/contract/tree/17.0/contract"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module enables contracts management with recurring invoicing
|
||||
functions. Also you can print and send by email contract report.</p>
|
||||
<p>It works for customer contract and supplier contracts.</p>
|
||||
<p>Contracts are shown in portal.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
@@ -390,45 +391,53 @@ invoicing functions. Also you can print and send by email contract report.</p>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||
<p>To view discount field in contract line, you need to set <em>Discount on lines</em> in
|
||||
user access rights.</p>
|
||||
<p>Contracts can be viewed on the portal (list and detail) if the user logged into the portal is a follower of the contract.</p>
|
||||
<p>To view discount field in contract line, you need to set <em>Discount on
|
||||
lines</em> in user access rights.</p>
|
||||
<p>Contracts can be viewed on the portal (list and detail) if the user
|
||||
logged into the portal is a follower of the contract.</p>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
||||
<ol class="arabic simple">
|
||||
<li>Contracts are in Invoicing -> Customers -> Customer and Invoicing -> Vendors -> Supplier Contracts</li>
|
||||
<li>When creating a contract, fill fields for selecting the invoicing parameters:<ul>
|
||||
<li>Contracts are in Invoicing -> Customers -> Customer and Invoicing ->
|
||||
Vendors -> Supplier Contracts</li>
|
||||
<li>When creating a contract, fill fields for selecting the invoicing
|
||||
parameters:<ul>
|
||||
<li>a journal</li>
|
||||
<li>a price list (optional)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>And add the lines to be invoiced with:<ul>
|
||||
<li>the product with a description, a quantity and a price</li>
|
||||
<li>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)</li>
|
||||
<li>auto-price, for having a price automatically obtained from the price list</li>
|
||||
<li>#START# or #END# in the description field to display the start/end date of
|
||||
the invoiced period in the invoice line description</li>
|
||||
<li>pre-paid (invoice at period start) or post-paid (invoice at start of next period)</li>
|
||||
<li>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)</li>
|
||||
<li>auto-price, for having a price automatically obtained from the
|
||||
price list</li>
|
||||
<li>#START# or #END# in the description field to display the start/end
|
||||
date of the invoiced period in the invoice line description</li>
|
||||
<li>pre-paid (invoice at period start) or post-paid (invoice at start
|
||||
of next period)</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>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.</li>
|
||||
<li>The <em>Show recurring invoices</em> shortcut on contracts shows all invoices created from the
|
||||
contract.</li>
|
||||
<li>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.</li>
|
||||
<li>The <em>Show recurring invoices</em> shortcut on contracts shows all
|
||||
invoices created from the contract.</li>
|
||||
<li>The contract report can be printed from the Print menu</li>
|
||||
<li>The contract can be sent by email with the <em>Send by Email</em> button</li>
|
||||
<li>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.</li>
|
||||
<li>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.</li>
|
||||
</ol>
|
||||
<ul class="simple">
|
||||
<li>Contracts appear in portal to following users in every contract:</li>
|
||||
</ul>
|
||||
<img alt="https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-my.png" src="https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-my.png" />
|
||||
<img alt="https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-list.png" src="https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-list.png" />
|
||||
<img alt="https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-detail.png" src="https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/portal-detail.png" />
|
||||
<p><img alt="image" src="https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-my.png" /></p>
|
||||
<p><img alt="image1" src="https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-list.png" /></p>
|
||||
<p><img alt="image2" src="https://raw.githubusercontent.com/OCA/contract/17.0/contract/static/src/screenshots/portal-detail.png" /></p>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
|
||||
@@ -442,7 +451,7 @@ To use it, just select the template on the contract and fields will be filled au
|
||||
<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.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20contract%0Aversion:%2016.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:%20contract%0Aversion:%2017.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>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -493,7 +502,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/16.0/contract">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/17.0/contract">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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -5,7 +5,6 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class ContractContractTerminate(models.TransientModel):
|
||||
|
||||
_name = "contract.contract.terminate"
|
||||
_description = "Terminate Contract Wizard"
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class ContractLineWizard(models.TransientModel):
|
||||
|
||||
_name = "contract.line.wizard"
|
||||
_description = "Contract Line Wizard"
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ from odoo.exceptions import (
|
||||
|
||||
|
||||
class ContractManuallyCreateInvoice(models.TransientModel):
|
||||
|
||||
_name = "contract.manually.create.invoice"
|
||||
_description = "Contract Manually Create Invoice Wizard"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user