2
In order to test the local instance report, we need
3
to update the local mission stock report
5
!python {model: stock.mission.report}: |
6
self.update(cr, uid, [], context=context)
8
Check the values on lines
10
!python {model: stock.mission.report.line}: |
11
line_id = self.search(cr, uid, [('product_id', '=', ref('product1')),
12
('mission_report_id.full_view', '=', False),
13
('mission_report_id.local_report', '=', True)])
14
assert line_id, "No line found !"
15
line_id = self.browse(cr, uid, line_id[0])
16
assert line_id.internal_qty == 498.00, "Bad quantity for internal qty (%s :: expected 498.00)" % line_id.internal_qty
17
assert line_id.stock_qty == 95.00, "Bad quantity for stock qty (%s :: expected 95.00)" % line_id.stock_qty
18
assert line_id.central_qty == 72.00, "Bad quantity for central qty (%s :: expected 72.00)" % line_id.central_qty
19
assert line_id.cross_qty == 12.00, "Bad quantity for cross-docking qty (%s :: expected 12.00)" % line_id.cross_qty
20
assert line_id.secondary_qty == 77.00, "Bad quantity for secondary qty (%s :: expected 77.00)" % line_id.secondary_qty
21
assert line_id.cu_qty == 116.00, "Bad quantity for consumption unit qty (%s :: expected 116.00)" % line_id.cu_qty