From fff262ea2c8411b5c38c27d3adb4a90074152e94 Mon Sep 17 00:00:00 2001
From: Antoni Marroig Campomar
Date: Wed, 20 Nov 2024 10:45:35 +0100
Subject: [PATCH] [MIG] stock_analytic: Migration to 18.0
---
stock_analytic/README.rst | 14 +++++++++-----
stock_analytic/__manifest__.py | 2 +-
stock_analytic/readme/CONTRIBUTORS.md | 2 ++
stock_analytic/static/description/index.html | 10 +++++++---
stock_analytic/tests/test_stock_picking.py | 9 +++++----
stock_analytic/views/stock_picking_views.xml | 2 +-
6 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/stock_analytic/README.rst b/stock_analytic/README.rst
index 2e2260c68a..379df74454 100644
--- a/stock_analytic/README.rst
+++ b/stock_analytic/README.rst
@@ -17,13 +17,13 @@ Stock Analytic
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github
- :target: https://github.com/OCA/account-analytic/tree/17.0/stock_analytic
+ :target: https://github.com/OCA/account-analytic/tree/18.0/stock_analytic
:alt: OCA/account-analytic
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/account-analytic-17-0/account-analytic-17-0-stock_analytic
+ :target: https://translation.odoo-community.org/projects/account-analytic-18-0/account-analytic-18-0-stock_analytic
: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/account-analytic&target_branch=17.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -72,7 +72,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -106,6 +106,10 @@ Contributors
- Yoshi Tashiro
+- `APSL-Nagarro `__
+
+ - Antoni Marroig
+
Maintainers
-----------
@@ -119,6 +123,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/account-analytic `_ project on GitHub.
+This module is part of the `OCA/account-analytic `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_analytic/__manifest__.py b/stock_analytic/__manifest__.py
index 5360d63395..e13d4cdb26 100644
--- a/stock_analytic/__manifest__.py
+++ b/stock_analytic/__manifest__.py
@@ -8,7 +8,7 @@
{
"name": "Stock Analytic",
"summary": "Adds analytic distribution in stock move",
- "version": "17.0.1.2.0",
+ "version": "18.0.1.0.0",
"author": "Julius Network Solutions, "
"ClearCorp, OpenSynergy Indonesia, "
"Hibou Corp., "
diff --git a/stock_analytic/readme/CONTRIBUTORS.md b/stock_analytic/readme/CONTRIBUTORS.md
index a10f90323e..7d8e2ddfd0 100644
--- a/stock_analytic/readme/CONTRIBUTORS.md
+++ b/stock_analytic/readme/CONTRIBUTORS.md
@@ -12,3 +12,5 @@
- Marcos Oitabén \<\>
- [Quartile](https://www.quartile.co):
- Yoshi Tashiro
+- [APSL-Nagarro](https://www.apsl.tech)
+ - Antoni Marroig \<\>
diff --git a/stock_analytic/static/description/index.html b/stock_analytic/static/description/index.html
index a6efa37dce..076f13911c 100644
--- a/stock_analytic/static/description/index.html
+++ b/stock_analytic/static/description/index.html
@@ -369,7 +369,7 @@ Stock Analytic
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:eb3471da266621f56573bb0cea1f8f0f10a3022435e96cd21c5bb4b6772f3f7e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
Adds Analytic Distribution field in stock move to be able to get
analytic information when generating the journal items.
Table of contents
@@ -424,7 +424,7 @@
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -468,7 +472,7 @@
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/account-analytic project on GitHub.
+
This module is part of the OCA/account-analytic project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_analytic/tests/test_stock_picking.py b/stock_analytic/tests/test_stock_picking.py
index 1bfd11d733..6d3529dc27 100644
--- a/stock_analytic/tests/test_stock_picking.py
+++ b/stock_analytic/tests/test_stock_picking.py
@@ -20,7 +20,8 @@ def setUpClass(cls):
cls.product = cls.env["product.product"].create(
{
"name": "Test Product",
- "type": "product",
+ "type": "consu",
+ "is_storable": True,
"standard_price": 1.0,
}
)
@@ -32,7 +33,7 @@ def setUpClass(cls):
"code": "tv",
"account_type": "liability_current",
"reconcile": True,
- "company_id": cls.env.ref("base.main_company").id,
+ "company_ids": [(4, [cls.env.ref("base.main_company").id])],
}
)
cls.stock_input_account = cls.env["account.account"].create(
@@ -41,7 +42,7 @@ def setUpClass(cls):
"code": "tsti",
"account_type": "expense",
"reconcile": True,
- "company_id": cls.env.ref("base.main_company").id,
+ "company_ids": [(4, [cls.env.ref("base.main_company").id])],
}
)
cls.stock_output_account = cls.env["account.account"].create(
@@ -50,7 +51,7 @@ def setUpClass(cls):
"code": "tout",
"account_type": "income",
"reconcile": True,
- "company_id": cls.env.ref("base.main_company").id,
+ "company_ids": [(4, [cls.env.ref("base.main_company").id])],
}
)
cls.stock_journal = cls.env["account.journal"].create(
diff --git a/stock_analytic/views/stock_picking_views.xml b/stock_analytic/views/stock_picking_views.xml
index 4173bce24b..6298737fc1 100644
--- a/stock_analytic/views/stock_picking_views.xml
+++ b/stock_analytic/views/stock_picking_views.xml
@@ -6,7 +6,7 @@