diff --git a/contract_sale_invoicing/__init__.py b/contract_sale_invoicing/__init__.py index c7818ff10..31660d6a9 100644 --- a/contract_sale_invoicing/__init__.py +++ b/contract_sale_invoicing/__init__.py @@ -1,4 +1,3 @@ # 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 cbd303fe3..76aa1d503 100644 --- a/contract_sale_invoicing/__manifest__.py +++ b/contract_sale_invoicing/__manifest__.py @@ -1,9 +1,10 @@ # Copyright 2018 Tecnativa - Carlos Dauden +# Copyright 2023 Tecnativa - Carolina Fernandez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Contract Invoicing of Pending Sales Orders", "summary": "Include sales to invoice in contract invoice creation", - "version": "12.0.1.0.4", + "version": "15.0.1.0.0", "category": "Contract Management", "website": "https://github.com/OCA/contract", "author": "Tecnativa, " "Odoo Community Association (OCA)", diff --git a/contract_sale_invoicing/models/contract.py b/contract_sale_invoicing/models/contract.py index 2cb5c427f..cabdaaaae 100644 --- a/contract_sale_invoicing/models/contract.py +++ b/contract_sale_invoicing/models/contract.py @@ -1,7 +1,7 @@ # Copyright 2018 Tecnativa - Carlos Dauden # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import api, fields, models +from odoo import fields, models class ContractContract(models.Model): @@ -13,7 +13,6 @@ class ContractContract(models.Model): "in contract invoice creation.", ) - @api.multi def _recurring_create_invoice(self, date_ref=False): invoices = super()._recurring_create_invoice(date_ref) for contract in self: @@ -36,7 +35,5 @@ class ContractContract(models.Model): ] ) if sales: - invoice_ids = sales.action_invoice_create() - invoices |= self.env["account.invoice"].browse(invoice_ids)[:1] - + invoices |= sales._create_invoices() return invoices diff --git a/contract_sale_invoicing/readme/CONTRIBUTORS.rst b/contract_sale_invoicing/readme/CONTRIBUTORS.rst index 0f1979501..f47d6e5bb 100644 --- a/contract_sale_invoicing/readme/CONTRIBUTORS.rst +++ b/contract_sale_invoicing/readme/CONTRIBUTORS.rst @@ -1,4 +1,6 @@ * `Tecnativa `_: * Carlos Dauden + * Carolina Fernandez + * Pedro M. Baeza * Souheil Bejaoui diff --git a/contract_sale_invoicing/static/description/index.html b/contract_sale_invoicing/static/description/index.html index 15b5c24f4..b5940f171 100644 --- a/contract_sale_invoicing/static/description/index.html +++ b/contract_sale_invoicing/static/description/index.html @@ -419,6 +419,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome