diff --git a/contract_sale_invoicing/__init__.py b/contract_sale_invoicing/__init__.py index 31660d6a..cca1a88e 100644 --- a/contract_sale_invoicing/__init__.py +++ b/contract_sale_invoicing/__init__.py @@ -1,3 +1,5 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models +from . import tests + diff --git a/contract_sale_invoicing/__manifest__.py b/contract_sale_invoicing/__manifest__.py index 8d606c34..04228b1e 100644 --- a/contract_sale_invoicing/__manifest__.py +++ b/contract_sale_invoicing/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Contract Invoicing of Pending Sales Orders', 'summary': 'Include sales to invoice in contract invoice creation', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Contract Management', 'website': 'https://github.com/oca/contract', 'author': 'Tecnativa, ' diff --git a/contract_sale_invoicing/readme/CONTRIBUTORS.rst b/contract_sale_invoicing/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..0f197950 --- /dev/null +++ b/contract_sale_invoicing/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Carlos Dauden +* Souheil Bejaoui diff --git a/contract_sale_invoicing/readme/DESCRIPTION.rst b/contract_sale_invoicing/readme/DESCRIPTION.rst new file mode 100644 index 00000000..0d5fe5f9 --- /dev/null +++ b/contract_sale_invoicing/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This modules allows to include on the same invoice than the recurring invoice +contract, all the pending to invoice sales orders that you have with the same +analytic account. \ No newline at end of file diff --git a/contract_sale_invoicing/readme/USAGE.rst b/contract_sale_invoicing/readme/USAGE.rst new file mode 100644 index 00000000..e9e299c5 --- /dev/null +++ b/contract_sale_invoicing/readme/USAGE.rst @@ -0,0 +1,8 @@ +To use this module, you need to: + +#. Go to Invoicing > Sales > Contracts and select or create a new contract. +#. Check *Generate recurring invoices automatically*. +#. Mark the check "Invoice Pending Sales Orders". +#. On each invoicing, system will check if there's any pending sales orders + with same analyitic account and will append the lines to the invoice being + generated. diff --git a/contract_sale_invoicing/tests/test_contract_sale_invoicing.py b/contract_sale_invoicing/tests/test_contract_sale_invoicing.py index a0eaf523..e655849b 100644 --- a/contract_sale_invoicing/tests/test_contract_sale_invoicing.py +++ b/contract_sale_invoicing/tests/test_contract_sale_invoicing.py @@ -9,7 +9,8 @@ class TestContractSaleInvoicing(TestContractBase): def setUpClass(cls): super(TestContractSaleInvoicing, cls).setUpClass() cls.product_so = cls.env.ref( - 'product.service_order_01_product_template') + 'product.product_product_1') + cls.product_so.invoice_policy = 'order' cls.sale_order = cls.env['sale.order'].create({ 'partner_id': cls.partner.id, 'partner_invoice_id': cls.partner.id, diff --git a/setup/contract_sale_invoicing/odoo/addons/contract_sale_invoicing b/setup/contract_sale_invoicing/odoo/addons/contract_sale_invoicing new file mode 120000 index 00000000..0af10a41 --- /dev/null +++ b/setup/contract_sale_invoicing/odoo/addons/contract_sale_invoicing @@ -0,0 +1 @@ +../../../../contract_sale_invoicing \ No newline at end of file diff --git a/setup/contract_sale_invoicing/setup.py b/setup/contract_sale_invoicing/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/contract_sale_invoicing/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)