Skip to content
Snippets Groups Projects
Commit 0f3b3e4a authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[REF] product_expiry: multi company

Adapt the module to the multicompany changes.

task-1985992
parent 6df0c3ef
No related branches found
No related tags found
No related merge requests found
......@@ -17,14 +17,16 @@ class TestStockProductionLot(TestStockCommon):
self.productAAA = self.ProductObj.create({
'name': 'Product AAA',
'type': 'product',
'tracking':'lot'
'tracking':'lot',
'company_id': self.env.company.id,
})
# create a new lot with with alert date in the past
self.lot1_productAAA = self.LotObj.create({
'name': 'Lot 1 ProductAAA',
'product_id': self.productAAA.id,
'alert_date': fields.Date.to_string(datetime.today() - relativedelta(days=15))
'alert_date': fields.Date.to_string(datetime.today() - relativedelta(days=15)),
'company_id': self.env.company.id,
})
picking_in = self.PickingObj.create({
......@@ -120,7 +122,8 @@ class TestStockProductionLot(TestStockCommon):
self.lot1_productBBB = self.LotObj.create({
'name': 'Lot 1 ProductBBB',
'product_id': self.productBBB.id,
'alert_date': fields.Date.to_string(datetime.today() + relativedelta(days=15))
'alert_date': fields.Date.to_string(datetime.today() + relativedelta(days=15)),
'company_id': self.env.company.id,
})
picking_in = self.PickingObj.create({
......@@ -169,7 +172,7 @@ class TestStockProductionLot(TestStockCommon):
self.productCCC = self.ProductObj.create({'name': 'Product CCC', 'type': 'product', 'tracking':'lot'})
# create a new lot with with alert date in the past
self.lot1_productCCC = self.LotObj.create({'name': 'Lot 1 ProductCCC', 'product_id': self.productCCC.id})
self.lot1_productCCC = self.LotObj.create({'name': 'Lot 1 ProductCCC', 'product_id': self.productCCC.id, 'company_id': self.env.company.id})
picking_in = self.PickingObj.create({
'picking_type_id': self.picking_type_in,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment