From f5511b77fd79057092ad889c4a4a0d882c9ed95c Mon Sep 17 00:00:00 2001
From: Sylvain LE GAL
Date: Fri, 9 Feb 2024 16:07:12 +0100
Subject: [PATCH] [MIG] base_product_mass_addition: Migration to 16.0 [REF]
Remove call to flush that are obsolete, in tests.
---
base_product_mass_addition/README.rst | 12 ++++++------
base_product_mass_addition/__manifest__.py | 2 +-
.../static/description/index.html | 8 ++++----
.../tests/test_product_mass_addition.py | 7 -------
4 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/base_product_mass_addition/README.rst b/base_product_mass_addition/README.rst
index 9f3ee6a8f6c..79a2b92425d 100644
--- a/base_product_mass_addition/README.rst
+++ b/base_product_mass_addition/README.rst
@@ -7,7 +7,7 @@ Base Product Mass Addition
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:805dc299e938cc7469d98ce91e21d01323a832fc52ecccabdf02c4f7a2733c41
+ !! source digest: sha256:6101799275e3c9776e19a0e05dcd14e15fa5bb28ec692eea3b9511f4a01addee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -17,13 +17,13 @@ Base Product Mass Addition
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
- :target: https://github.com/OCA/product-attribute/tree/15.0/base_product_mass_addition
+ :target: https://github.com/OCA/product-attribute/tree/16.0/base_product_mass_addition
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-base_product_mass_addition
+ :target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-base_product_mass_addition
: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/product-attribute&target_branch=15.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -57,7 +57,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.
@@ -100,6 +100,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/product-attribute `_ project on GitHub.
+This module is part of the `OCA/product-attribute `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/base_product_mass_addition/__manifest__.py b/base_product_mass_addition/__manifest__.py
index 8d4726f7650..00ac0282993 100644
--- a/base_product_mass_addition/__manifest__.py
+++ b/base_product_mass_addition/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Base Product Mass Addition",
- "version": "15.0.1.0.0",
+ "version": "16.0.1.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"license": "AGPL-3",
diff --git a/base_product_mass_addition/static/description/index.html b/base_product_mass_addition/static/description/index.html
index 0a347321cb8..845c530fa22 100644
--- a/base_product_mass_addition/static/description/index.html
+++ b/base_product_mass_addition/static/description/index.html
@@ -367,9 +367,9 @@ Base Product Mass Addition
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:805dc299e938cc7469d98ce91e21d01323a832fc52ecccabdf02c4f7a2733c41
+!! source digest: sha256:6101799275e3c9776e19a0e05dcd14e15fa5bb28ec692eea3b9511f4a01addee
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module is abstract and can’t be used as is.
It provides functions in order to show a product grid from another model.
You can then add products and quantities in batch to the model you are working with.
@@ -406,7 +406,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.
@@ -452,7 +452,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/product-attribute project on GitHub.
+
This module is part of the OCA/product-attribute project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/base_product_mass_addition/tests/test_product_mass_addition.py b/base_product_mass_addition/tests/test_product_mass_addition.py
index 51b2bbd0ef6..d1933780066 100644
--- a/base_product_mass_addition/tests/test_product_mass_addition.py
+++ b/base_product_mass_addition/tests/test_product_mass_addition.py
@@ -49,17 +49,14 @@ def test_quick_should_not_write_on_product(self):
"""Using quick magic fields shouldn't write on product's metadata"""
user_demo = self.env.ref("base.user_demo")
self.product.write_uid = user_demo
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, user_demo)
# Case 1: Updating qty_to_process shouldn't write on products
self.product.qty_to_process = 1.0
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, user_demo)
# Case 2: Updating quick_uom_id shouldn't write on products
self.product.quick_uom_id = self.env.ref("uom.product_uom_categ_unit").uom_ids[
1
]
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, user_demo)
def test_quick_should_write_on_product(self):
@@ -68,20 +65,16 @@ def test_quick_should_write_on_product(self):
# Change the product write_uid for testing
user_demo = self.env.ref("base.user_demo")
self.product.write_uid = user_demo
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, user_demo)
# Case 1: Updating name field should write on product's metadata
self.product.name = "Testing"
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, self.env.user)
# Change the product write_uid for testing
user_demo = self.env.ref("base.user_demo")
self.product.write_uid = user_demo
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, user_demo)
# Case 2: Updating qty_to_process and name before flush should
# write on product's metadata
self.product.qty_to_process = 2.0
self.product.name = "Testing 2"
- self.env["base"].flush()
self.assertEqual(self.product.write_uid, self.env.user)