diff options
| author | Simon Lejeune <sle@openerp.com> | 2019-09-06 15:02:32 +0000 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2019-09-06 15:02:32 +0000 |
| commit | 1736bd74ff3edab33c8e8fe77d93a2f9fe5d72d2 (patch) | |
| tree | 53e4b0c4564f5711fca5db91d078b603d08bd8d2 | |
| parent | 860d5d8f7cd40924ca58a799d6e750debe828102 (diff) | |
[FIX] stock_account, mrp_account: linked valuation layers
disable the inventory at date from these views
closes odoo/odoo#36524
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
| -rw-r--r-- | addons/mrp_account/models/mrp_production.py | 7 | ||||
| -rw-r--r-- | addons/stock_account/models/stock_picking.py | 2 |
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) |
