diff --git a/addons/stock_account/views/product_views.xml b/addons/stock_account/views/product_views.xml index faf7bee4126..21d41cdb067 100644 --- a/addons/stock_account/views/product_views.xml +++ b/addons/stock_account/views/product_views.xml @@ -98,7 +98,7 @@ form [('type', '=', 'product'), ('qty_available', '!=', 0)] - {'company_owned': True} + {'company_owned': True, 'create': False, 'edit' : False}

diff --git a/addons/stock_account/wizard/stock_quantity_history.py b/addons/stock_account/wizard/stock_quantity_history.py index 406301ea13a..b8e010b04e5 100644 --- a/addons/stock_account/wizard/stock_quantity_history.py +++ b/addons/stock_account/wizard/stock_quantity_history.py @@ -25,7 +25,7 @@ class StockQuantityHistory(models.TransientModel): 'name': _('Inventory Valuation'), 'res_model': 'product.product', 'domain': "[('type', '=', 'product'), ('qty_available', '!=', 0)]", - 'context': dict(self.env.context, to_date=self.date, company_owned=True), + 'context': dict(self.env.context, to_date=self.date, company_owned=True, create=False, edit=False), 'search_view_id': search_view_id } return action