File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments