Skip to content

Commit 1e6fbb9

Browse files
author
bosd
committed
[MIG] purchase_analytic_global: Migration to 19.0
* Module version updated: 18.0.1.0.0 -> 19.0.1.0.0 * All code compatible with Odoo 19 * README badges updated to 19.0 branch
1 parent 0ffee3c commit 1e6fbb9

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

purchase_analytic_global/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "Purchase - Analytic Account Global",
6-
"version": "18.0.1.0.0",
6+
"version": "19.0.1.0.0",
77
"author": "Camptocamp, Odoo Community Association (OCA)",
88
"maintainer": "Camptocamp",
99
"license": "AGPL-3",

purchase_analytic_global/tests/test_purchase_analytic_global.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ class TestPurchaseAnalyticGlobal(BaseCommon):
1111
def setUpClass(cls):
1212
super().setUpClass()
1313
cls.analytic_plan = cls.env["account.analytic.plan"].create({"name": "Plan"})
14-
cls.product = cls.env.ref("product.product_product_4")
14+
# Create a product directly instead of using external XML ID
15+
# (product.product_product_4 doesn't exist in Odoo 19)
16+
cls.product = cls.env["product.product"].create(
17+
{
18+
"name": "Test Product",
19+
"type": "consu",
20+
"list_price": 100.0,
21+
"standard_price": 50.0,
22+
}
23+
)
1524
cls.partner = cls.env["res.partner"].create({"name": "Test Partner"})
1625
vals_list = [
1726
{"name": "Analytic Account 1", "plan_id": cls.analytic_plan.id},
@@ -31,7 +40,6 @@ def setUpClass(cls):
3140
"order_id": cls.purchase_order.id,
3241
"product_qty": 10,
3342
"price_unit": 50,
34-
"product_uom": cls.product.uom_id.id,
3543
"date_planned": date.today(),
3644
}
3745
for _ in range(3)

0 commit comments

Comments
 (0)