mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[MIG] contract_sale_invoicing: Migration to 15.0
TT45293 Co-Authored-By: Pedro M. Baeza <pedro.baeza@tecnativa.com>
This commit is contained in:
committed by
Juanjo
parent
3fad6bfa49
commit
aa7c3cc7fa
@@ -7,7 +7,7 @@ Contract Invoicing of Pending Sales Orders
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:677f350039713fce998708f88a5907a26cde8dac2595c5f0e5d78af8c31a3c9f
|
!! source digest: sha256:2b2b2e531417f29b197fed649fe83609b1f0277ad1946cd51d1dc644c2e30479
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||||
@@ -17,13 +17,13 @@ Contract Invoicing of Pending Sales Orders
|
|||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/contract/tree/12.0/contract_sale_invoicing
|
:target: https://github.com/OCA/contract/tree/15.0/contract_sale_invoicing
|
||||||
:alt: OCA/contract
|
:alt: OCA/contract
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract_sale_invoicing
|
:target: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract_sale_invoicing
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=12.0
|
:target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=15.0
|
||||||
:alt: Try me on Runboat
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
@@ -55,7 +55,7 @@ Bug Tracker
|
|||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/contract/issues>`_.
|
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.
|
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
|
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_sale_invoicing%0Aversion:%2012.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_sale_invoicing%0Aversion:%2015.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.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
@@ -73,6 +73,8 @@ Contributors
|
|||||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||||
|
|
||||||
* Carlos Dauden
|
* Carlos Dauden
|
||||||
|
* Carolina Fernandez
|
||||||
|
* Pedro M. Baeza
|
||||||
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
@@ -88,6 +90,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/contract_sale_invoicing>`_ project on GitHub.
|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/15.0/contract_sale_invoicing>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
from . import tests
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
# Copyright 2018 Tecnativa - Carlos Dauden
|
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||||
|
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "Contract Invoicing of Pending Sales Orders",
|
"name": "Contract Invoicing of Pending Sales Orders",
|
||||||
"summary": "Include sales to invoice in contract invoice creation",
|
"summary": "Include sales to invoice in contract invoice creation",
|
||||||
"version": "12.0.1.0.4",
|
"version": "15.0.1.0.0",
|
||||||
"category": "Contract Management",
|
"category": "Contract Management",
|
||||||
"website": "https://github.com/OCA/contract",
|
"website": "https://github.com/OCA/contract",
|
||||||
"author": "Tecnativa, " "Odoo Community Association (OCA)",
|
"author": "Tecnativa, " "Odoo Community Association (OCA)",
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * contract_sale_invoicing
|
# * contract_sale_invoicing
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 12.0\n"
|
"Project-Id-Version: Odoo Server 15.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"Last-Translator: <>\n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
@@ -20,11 +20,12 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: contract_sale_invoicing
|
#. module: contract_sale_invoicing
|
||||||
#: model:ir.model.fields,help:contract_sale_invoicing.field_contract_contract__invoicing_sales
|
#: model:ir.model.fields,help:contract_sale_invoicing.field_contract_contract__invoicing_sales
|
||||||
msgid "If checked include sales with same analytic account to invoice in contract invoice creation."
|
msgid ""
|
||||||
|
"If checked include sales with same analytic account to invoice in contract "
|
||||||
|
"invoice creation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: contract_sale_invoicing
|
#. module: contract_sale_invoicing
|
||||||
#: model:ir.model.fields,field_description:contract_sale_invoicing.field_contract_contract__invoicing_sales
|
#: model:ir.model.fields,field_description:contract_sale_invoicing.field_contract_contract__invoicing_sales
|
||||||
msgid "Invoice Pending Sales Orders"
|
msgid "Invoice Pending Sales Orders"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Copyright 2018 Tecnativa - Carlos Dauden
|
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# 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):
|
class ContractContract(models.Model):
|
||||||
@@ -13,7 +13,6 @@ class ContractContract(models.Model):
|
|||||||
"in contract invoice creation.",
|
"in contract invoice creation.",
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _recurring_create_invoice(self, date_ref=False):
|
def _recurring_create_invoice(self, date_ref=False):
|
||||||
invoices = super()._recurring_create_invoice(date_ref)
|
invoices = super()._recurring_create_invoice(date_ref)
|
||||||
for contract in self:
|
for contract in self:
|
||||||
@@ -36,7 +35,5 @@ class ContractContract(models.Model):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
if sales:
|
if sales:
|
||||||
invoice_ids = sales.action_invoice_create()
|
invoices |= sales._create_invoices()
|
||||||
invoices |= self.env["account.invoice"].browse(invoice_ids)[:1]
|
|
||||||
|
|
||||||
return invoices
|
return invoices
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
* `Tecnativa <https://www.tecnativa.com>`_:
|
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||||
|
|
||||||
* Carlos Dauden
|
* Carlos Dauden
|
||||||
|
* Carolina Fernandez
|
||||||
|
* Pedro M. Baeza
|
||||||
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
* Souheil Bejaoui <souheil.bejaoui@acsone.eu>
|
||||||
|
|||||||
@@ -367,9 +367,9 @@ ul.auto-toc {
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:677f350039713fce998708f88a5907a26cde8dac2595c5f0e5d78af8c31a3c9f
|
!! source digest: sha256:2b2b2e531417f29b197fed649fe83609b1f0277ad1946cd51d1dc644c2e30479
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/12.0/contract_sale_invoicing"><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-12-0/contract-12-0-contract_sale_invoicing"><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=12.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/15.0/contract_sale_invoicing"><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-15-0/contract-15-0-contract_sale_invoicing"><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=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This modules allows to include on the same invoice than the recurring invoice
|
<p>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
|
contract, all the pending to invoice sales orders that you have with the same
|
||||||
analytic account.</p>
|
analytic account.</p>
|
||||||
@@ -403,7 +403,7 @@ generated.</li>
|
|||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
|
<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.
|
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
|
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_sale_invoicing%0Aversion:%2012.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_sale_invoicing%0Aversion:%2015.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>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
@@ -419,6 +419,8 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||||
<li>Carlos Dauden</li>
|
<li>Carlos Dauden</li>
|
||||||
|
<li>Carolina Fernandez</li>
|
||||||
|
<li>Pedro M. Baeza</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>Souheil Bejaoui <<a class="reference external" href="mailto:souheil.bejaoui@acsone.eu">souheil.bejaoui@acsone.eu</a>></li>
|
<li>Souheil Bejaoui <<a class="reference external" href="mailto:souheil.bejaoui@acsone.eu">souheil.bejaoui@acsone.eu</a>></li>
|
||||||
@@ -431,7 +433,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
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/contract_sale_invoicing">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/15.0/contract_sale_invoicing">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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,13 +1,28 @@
|
|||||||
# Copyright 2018 Tecnativa - Carlos Dauden
|
# Copyright 2018 Tecnativa - Carlos Dauden
|
||||||
|
# Copyright 2023 Tecnativa - Carolina Fernandez
|
||||||
|
# Copyright 2023 Tecnativa - Pedro M. Baeza
|
||||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from freezegun import freeze_time
|
||||||
|
|
||||||
from odoo.addons.contract.tests.test_contract import TestContractBase
|
from odoo.addons.contract.tests.test_contract import TestContractBase
|
||||||
|
|
||||||
|
|
||||||
|
@freeze_time("2016-02-28")
|
||||||
class TestContractSaleInvoicing(TestContractBase):
|
class TestContractSaleInvoicing(TestContractBase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestContractSaleInvoicing, cls).setUpClass()
|
super().setUpClass()
|
||||||
|
cls.env = cls.env(
|
||||||
|
context=dict(
|
||||||
|
cls.env.context,
|
||||||
|
mail_create_nolog=True,
|
||||||
|
mail_create_nosubscribe=True,
|
||||||
|
mail_notrack=True,
|
||||||
|
no_reset_password=True,
|
||||||
|
tracking_disable=True,
|
||||||
|
)
|
||||||
|
)
|
||||||
cls.contract.group_id = cls.env["account.analytic.account"].search([], limit=1)
|
cls.contract.group_id = cls.env["account.analytic.account"].search([], limit=1)
|
||||||
cls.product_so = cls.env.ref("product.product_product_1")
|
cls.product_so = cls.env.ref("product.product_product_1")
|
||||||
cls.product_so.invoice_policy = "order"
|
cls.product_so.invoice_policy = "order"
|
||||||
@@ -31,7 +46,6 @@ class TestContractSaleInvoicing(TestContractBase):
|
|||||||
],
|
],
|
||||||
"pricelist_id": cls.partner.property_product_pricelist.id,
|
"pricelist_id": cls.partner.property_product_pricelist.id,
|
||||||
"analytic_account_id": cls.contract.group_id.id,
|
"analytic_account_id": cls.contract.group_id.id,
|
||||||
"date_order": "2016-02-15",
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user