[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
This commit is contained in:
ryv-odoo
2019-12-10 14:33:16 +00:00
parent 17fbb9428a
commit 04f09a5a17
2 changed files with 1 additions and 15 deletions
+1 -2
View File
@@ -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
@@ -4,19 +4,6 @@
<record id="stock_inventory_line_tree" model="ir.ui.view">
<field name="name">stock.inventory.line.tree</field>
<field name="model">stock.inventory.line</field>
<field name="arch" type="xml">
<tree string="Stock Inventory Lines">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom_id" groups="uom.group_uom"/>
<field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
</tree>
</field>
</record>
<record id="stock_inventory_line_tree2" model="ir.ui.view">
<field name="name">stock.inventory.line.tree2</field>
<field name="model">stock.inventory.line</field>
<field name="arch" type="xml">
<tree default_order="location_id,product_id" editable="top" string="Inventory Details" js_class="inventory_validate_button"
decoration-danger="product_qty != theoretical_qty"