[FIX] stock: use the same editable view for inventories and products
This commit makes sure the same view is used between the "inventory adjustments" menu and the " update quantity" button in the product form. The two views should always keep the same fields and buttons. Task : 2555118 Part-of: odoo/odoo#74715
This commit is contained in:
@@ -539,7 +539,8 @@ class Product(models.Model):
|
||||
)
|
||||
else:
|
||||
self = self.with_context(product_tmpl_ids=self.product_tmpl_id.ids)
|
||||
action = self.env['stock.quant']._get_quants_action(domain)
|
||||
action = self.env['stock.quant'].action_view_inventory()
|
||||
action['domain'] = domain
|
||||
action["name"] = _('Update Quantity')
|
||||
return action
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
<field name="inventory_quantity_set" invisible="1"/>
|
||||
<field name="location_id" domain="[('usage', 'in', ['internal', 'transit'])]" attrs="{'readonly': [('id', '!=', False)]}" invisible="context.get('hide_location', False)" options="{'no_create': True}"/>
|
||||
<field name="product_id" attrs="{'readonly': [('id', '!=', False)]}" readonly="context.get('single_product', False)" force_save="1" options="{'no_create': True}"/>
|
||||
<field name="product_categ_id" optional="show"/>
|
||||
<field name="product_categ_id" optional="hide"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot"
|
||||
attrs="{'readonly': ['|', ('id', '!=', False), ('tracking', 'not in', ['serial', 'lot'])]}"
|
||||
invisible="context.get('hide_lot', False)"
|
||||
|
||||
Reference in New Issue
Block a user