diff --git a/addons/stock_account/models/product.py b/addons/stock_account/models/product.py index 10d80789938..883a4b48ff9 100644 --- a/addons/stock_account/models/product.py +++ b/addons/stock_account/models/product.py @@ -86,7 +86,7 @@ class ProductTemplate(models.Model): @api.multi def action_open_product_moves(self): self.ensure_one() - action = self.env.ref('stock_account.product_valuation_action').read()[0] + action = self.env.ref('stock_account.stock_move_valuation_action').read()[0] action['domain'] = [('product_tmpl_id', '=', self.id)] action['context'] = { 'search_default_outgoing': True, @@ -185,8 +185,8 @@ class ProductProduct(models.Model): @api.multi def action_open_product_moves(self): self.ensure_one() - action = self.env.ref('stock_account.product_valuation_action').read()[0] - action['domain'] = [('id', '=', self.id)] + action = self.env.ref('stock_account.stock_move_valuation_action').read()[0] + action['domain'] = [('product_id', '=', self.id)] action['context'] = { 'search_default_outgoing': True, 'search_default_incoming': True, diff --git a/addons/stock_account/views/product_views.xml b/addons/stock_account/views/product_views.xml index d21e5f3ee0f..1bba3652044 100644 --- a/addons/stock_account/views/product_views.xml +++ b/addons/stock_account/views/product_views.xml @@ -137,5 +137,46 @@ + + + + stock.move.tree.valuation + stock.move + + + + + + + + + + + + + + + + + + + + + + + + Stock Moves + stock.move + ir.actions.act_window + form + + + {'search_default_outgoing': 1, 'search_default_incoming': 1, 'search_default_done': 1, 'search_default_group_by_product': 1} + + + Click to create a stock movement. + + +
+ Click to create a stock movement. +