From b8133aa64bd80c7f90402cf66f269dc9e4496851 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 3 Apr 2018 18:36:05 +0200 Subject: [PATCH] [REM] stock_account: valuation stat button Remove the valuation stat button as we say that from now on, to understand the current value of a product, you should go through the valuation ation and its stat button. --- addons/stock_account/models/product.py | 24 ++------ addons/stock_account/views/product_views.xml | 65 +------------------- 2 files changed, 5 insertions(+), 84 deletions(-) diff --git a/addons/stock_account/models/product.py b/addons/stock_account/models/product.py index df642de4337..10832aa8bde 100644 --- a/addons/stock_account/models/product.py +++ b/addons/stock_account/models/product.py @@ -85,16 +85,8 @@ class ProductTemplate(models.Model): @api.multi def action_open_product_moves(self): - self.ensure_one() - 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, - 'search_default_incoming': True, - 'search_default_done': True, - 'is_avg': self.cost_method == 'average', - } - return action + # TODO: remove me in master + pass @api.multi def get_product_accounts(self, fiscal_pos=None): @@ -270,16 +262,8 @@ class ProductProduct(models.Model): @api.multi def action_open_product_moves(self): - self.ensure_one() - 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, - 'search_default_done': True, - 'is_avg': self.cost_method == 'average', - } - return action + #TODO: remove me in master + pass @api.model def _anglo_saxon_sale_move_lines(self, name, product, uom, qty, price_unit, currency=False, amount_currency=False, fiscal_position=False, account_analytic=False, analytic_tags=False): diff --git a/addons/stock_account/views/product_views.xml b/addons/stock_account/views/product_views.xml index 32f8db22645..e6d14d02309 100644 --- a/addons/stock_account/views/product_views.xml +++ b/addons/stock_account/views/product_views.xml @@ -102,68 +102,5 @@

- - - product.product - product.product - - - -