summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/mrp_account/models/mrp_production.py7
-rw-r--r--addons/stock_account/models/stock_picking.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/addons/mrp_account/models/mrp_production.py b/addons/mrp_account/models/mrp_production.py
index d89c916c1fa..5e97dbff4dd 100644
--- a/addons/mrp_account/models/mrp_production.py
+++ b/addons/mrp_account/models/mrp_production.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
+from ast import literal_eval
+
from odoo import api, fields, models
from odoo.tools import float_is_zero
@@ -72,5 +74,8 @@ class MrpProduction(models.Model):
self.ensure_one()
domain = [('id', 'in', (self.move_raw_ids + self.move_finished_ids + self.scrap_ids.move_id).stock_valuation_layer_ids.ids)]
action = self.env.ref('stock_account.stock_valuation_layer_action').read()[0]
- return dict(action, domain=domain)
+ context = literal_eval(action['context'])
+ context.update(self.env.context)
+ context['no_at_date'] = True
+ return dict(action, domain=domain, context=context)
diff --git a/addons/stock_account/models/stock_picking.py b/addons/stock_account/models/stock_picking.py
index a1646e484fb..4169320109a 100644
--- a/addons/stock_account/models/stock_picking.py
+++ b/addons/stock_account/models/stock_picking.py
@@ -16,6 +16,6 @@ class StockPicking(models.Model):
action = self.env.ref('stock_account.stock_valuation_layer_action').read()[0]
context = literal_eval(action['context'])
context.update(self.env.context)
- context['not_at_date'] = True
+ context['no_at_date'] = True
return dict(action, domain=domain, context=context)