From aefe5294b177ae991c32b3922aed473d54e82e73 Mon Sep 17 00:00:00 2001
From: Juanjo
Date: Thu, 25 Jul 2024 16:03:00 +0200
Subject: [PATCH] [MIG] contract_sale_invoicing: Migration to 17.0
---
contract_sale_invoicing/README.rst | 5 +++--
contract_sale_invoicing/__manifest__.py | 2 +-
.../readme/CONTRIBUTORS.md | 1 +
contract_sale_invoicing/readme/USAGE.md | 2 +-
.../static/description/index.html | 5 +++--
.../tests/test_contract_sale_invoicing.py | 19 ++++++++-----------
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/contract_sale_invoicing/README.rst b/contract_sale_invoicing/README.rst
index 2ba203aae..e02469b92 100644
--- a/contract_sale_invoicing/README.rst
+++ b/contract_sale_invoicing/README.rst
@@ -42,8 +42,8 @@ Usage
To use this module, you need to:
-1. Go to Invoicing > Sales > Contracts and select or create a new
- contract.
+1. Go to Invoicing > Customers > Customers Contracts and select or
+ create a new contract.
2. Check *Generate recurring invoices automatically*.
3. Mark the check "Invoice Pending Sales Orders".
4. On each invoicing, system will check if there's any pending sales
@@ -76,6 +76,7 @@ Contributors
- Carlos Dauden
- Carolina Fernandez
- Pedro M. Baeza
+ - Juan José Seguí
- Souheil Bejaoui
diff --git a/contract_sale_invoicing/__manifest__.py b/contract_sale_invoicing/__manifest__.py
index 76aa1d503..63edfc1db 100644
--- a/contract_sale_invoicing/__manifest__.py
+++ b/contract_sale_invoicing/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Contract Invoicing of Pending Sales Orders",
"summary": "Include sales to invoice in contract invoice creation",
- "version": "15.0.1.0.0",
+ "version": "17.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/readme/CONTRIBUTORS.md b/contract_sale_invoicing/readme/CONTRIBUTORS.md
index c32b5375d..a0285f307 100644
--- a/contract_sale_invoicing/readme/CONTRIBUTORS.md
+++ b/contract_sale_invoicing/readme/CONTRIBUTORS.md
@@ -2,4 +2,5 @@
- Carlos Dauden
- Carolina Fernandez
- Pedro M. Baeza
+ - Juan José Seguí
- Souheil Bejaoui \<\>
diff --git a/contract_sale_invoicing/readme/USAGE.md b/contract_sale_invoicing/readme/USAGE.md
index cc0eee50e..e17ad208f 100644
--- a/contract_sale_invoicing/readme/USAGE.md
+++ b/contract_sale_invoicing/readme/USAGE.md
@@ -1,6 +1,6 @@
To use this module, you need to:
-1. Go to Invoicing \> Sales \> Contracts and select or create a new
+1. Go to Invoicing \> Customers \> Customers Contracts and select or create a new
contract.
2. Check *Generate recurring invoices automatically*.
3. Mark the check "Invoice Pending Sales Orders".
diff --git a/contract_sale_invoicing/static/description/index.html b/contract_sale_invoicing/static/description/index.html
index d6d5c1d30..6c2652a5c 100644
--- a/contract_sale_invoicing/static/description/index.html
+++ b/contract_sale_invoicing/static/description/index.html
@@ -390,8 +390,8 @@ with the same analytic account.
To use this module, you need to:
-- Go to Invoicing > Sales > Contracts and select or create a new
-contract.
+- Go to Invoicing > Customers > Customers 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
@@ -422,6 +422,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
- Carlos Dauden
- Carolina Fernandez
- Pedro M. Baeza
+- Juan José Seguí
- Souheil Bejaoui <souheil.bejaoui@acsone.eu>
diff --git a/contract_sale_invoicing/tests/test_contract_sale_invoicing.py b/contract_sale_invoicing/tests/test_contract_sale_invoicing.py
index f0b7a83c7..d512672ff 100644
--- a/contract_sale_invoicing/tests/test_contract_sale_invoicing.py
+++ b/contract_sale_invoicing/tests/test_contract_sale_invoicing.py
@@ -5,23 +5,20 @@
from freezegun import freeze_time
-from odoo.addons.contract.tests.test_contract import TestContractBase
+from odoo.addons.base.tests.common import BaseCommon
@freeze_time("2016-02-28")
-class TestContractSaleInvoicing(TestContractBase):
+class TestContractSaleInvoicing(BaseCommon):
@classmethod
def setUpClass(cls):
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 = cls.env["contract.contract"].create(
+ {
+ "name": "Test Contract",
+ "partner_id": cls.partner.id,
+ "company_id": cls.env.company.id,
+ }
)
cls.contract.group_id = cls.env["account.analytic.account"].search([], limit=1)
cls.product_so = cls.env.ref("product.product_product_1")