[FIX] mrp_account: prevent AttributeError on clicking valuation button
Steps to reproduce
- Create Manufacturing Orders and confirm it.
- Validate the done quantities.
- Click on valuation button. It will raise trackback
Error caused by commit: a080337
closes odoo/odoo#124956
Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
@@ -52,7 +52,7 @@ class MrpProduction(models.Model):
|
||||
|
||||
def action_view_stock_valuation_layers(self):
|
||||
self.ensure_one()
|
||||
domain = [('id', 'in', (self.move_raw_ids + self.move_finished_ids + self.scrap_ids.move_id).stock_valuation_layer_ids.ids)]
|
||||
domain = [('id', 'in', (self.move_raw_ids + self.move_finished_ids + self.scrap_ids.move_ids).stock_valuation_layer_ids.ids)]
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("stock_account.stock_valuation_layer_action")
|
||||
context = literal_eval(action['context'])
|
||||
context.update(self.env.context)
|
||||
|
||||
Reference in New Issue
Block a user