Skip to content

Commit c4b98c3

Browse files
[MIG] product_brand_stock_account: Migration to 17.0
1 parent 2e14324 commit c4b98c3

File tree

6 files changed

+46
-1
lines changed

6 files changed

+46
-1
lines changed

product_brand_stock_account/README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ Contributors
5858
------------
5959

6060
- Francesco Apruzzese <cescoap@gmail.com>
61+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
62+
63+
- Bhavesh Heliconia
6164

6265
Maintainers
6366
-----------

product_brand_stock_account/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "Product Brand Stock Account",
66
"summary": """
77
This module allows to work with product_brand in Stock Account.""",
8-
"version": "16.0.1.0.0",
8+
"version": "17.0.1.0.0",
99
"license": "AGPL-3",
1010
"author": "Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/brand",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
- Francesco Apruzzese \<<cescoap@gmail.com>\>
2+
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
3+
- Bhavesh Heliconia

product_brand_stock_account/static/description/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ <h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
404404
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
405405
<ul class="simple">
406406
<li>Francesco Apruzzese &lt;<a class="reference external" href="mailto:cescoap&#64;gmail.com">cescoap&#64;gmail.com</a>&gt;</li>
407+
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
408+
<li>Bhavesh Heliconia</li>
409+
</ul>
410+
</li>
407411
</ul>
408412
</div>
409413
<div class="section" id="maintainers">
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import test_product_brand_stock_account
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from odoo.addons.base.tests.common import BaseCommon
2+
3+
4+
class TestStockValuationLayer(BaseCommon):
5+
@classmethod
6+
def setUpClass(cls):
7+
super().setUpClass()
8+
# Create a product brand
9+
cls.product_brand = cls.env["product.brand"].create({"name": "Brand A"})
10+
11+
# Create a product linked to this brand
12+
cls.product = cls.env["product.product"].create(
13+
{
14+
"name": "Product A",
15+
"product_brand_id": cls.product_brand.id,
16+
}
17+
)
18+
19+
# Create a stock valuation layer for the product
20+
cls.stock_valuation_layer = cls.env["stock.valuation.layer"].create(
21+
{
22+
"product_id": cls.product.id,
23+
"company_id": cls.env.ref("base.main_company").id,
24+
"quantity": 10,
25+
"unit_cost": 100.0,
26+
}
27+
)
28+
29+
def test_product_brand_id_on_stock_valuation_layer(self):
30+
# Test if the product_brand_id is correctly set on the stock.valuation.layer
31+
self.assertEqual(
32+
self.stock_valuation_layer.product_brand_id,
33+
self.product_brand,
34+
"The product_brand_id should match the product's brand.",
35+
)

0 commit comments

Comments
 (0)