From 04f09a5a175722448204b2cf1e35f3cddb16c75d Mon Sep 17 00:00:00 2001 From: ryv-odoo Date: Mon, 2 Dec 2019 13:47:41 +0000 Subject: [PATCH] [REM] stock: remove dead code In views of stock inventory line, the view with the id "stock_inventory_line_tree" was not used. Then remove it, and rename the "stock_inventory_line_tree2" into "stock_inventory_line_tree". task-2115194 --- addons/stock/models/stock_inventory.py | 3 +-- addons/stock/views/stock_inventory_views.xml | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/addons/stock/models/stock_inventory.py b/addons/stock/models/stock_inventory.py index 5a701b87056..dbf5c06b39b 100644 --- a/addons/stock/models/stock_inventory.py +++ b/addons/stock/models/stock_inventory.py @@ -163,7 +163,7 @@ class Inventory(models.Model): self.ensure_one() action = { 'type': 'ir.actions.act_window', - 'views': [(self.env.ref('stock.stock_inventory_line_tree2').id, 'tree')], + 'views': [(self.env.ref('stock.stock_inventory_line_tree').id, 'tree')], 'view_mode': 'tree', 'name': _('Inventory Lines'), 'res_model': 'stock.inventory.line', @@ -357,7 +357,6 @@ class InventoryLine(models.Model): @api.onchange('product_id', 'location_id', 'product_uom_id', 'prod_lot_id', 'partner_id', 'package_id') def _onchange_quantity_context(self): - product_qty = False if self.product_id: self.product_uom_id = self.product_id.uom_id if self.product_id and self.location_id and self.product_id.uom_id.category_id == self.product_uom_id.category_id: # TDE FIXME: last part added because crash diff --git a/addons/stock/views/stock_inventory_views.xml b/addons/stock/views/stock_inventory_views.xml index 8640c245aae..cadbceaa87c 100644 --- a/addons/stock/views/stock_inventory_views.xml +++ b/addons/stock/views/stock_inventory_views.xml @@ -4,19 +4,6 @@ stock.inventory.line.tree stock.inventory.line - - - - - - - - - - - - stock.inventory.line.tree2 - stock.inventory.line