[IMP] stock: keep coherant action name

At bee938e (following task-id 2042303), the label of the action was
changed globaly.
The action is however shared with multiple menus like Inventory Report.
The Update Quantity label only makes sense when coming from the
product where the quantity will be updated.

Closes odoo/odoo#50523
This commit is contained in:
Martin Trigaux
2020-07-16 10:20:43 +00:00
parent 9fefa08745
commit e61a3bc15a
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -500,7 +500,9 @@ class Product(models.Model):
)
else:
self = self.with_context(product_tmpl_id=self.product_tmpl_id.id)
return self.env['stock.quant']._get_quants_action(domain)
action = self.env['stock.quant']._get_quants_action(domain)
action["name"] = _('Update Quantity')
return action
def action_update_quantity_on_hand(self):
return self.product_tmpl_id.with_context(default_product_id=self.id).action_update_quantity_on_hand()
+1 -1
View File
@@ -605,7 +605,7 @@ class StockQuant(models.Model):
ctx = dict(self.env.context or {})
ctx.pop('group_by', None)
action = {
'name': _('Update Quantity'),
'name': _('Stock On Hand'),
'view_type': 'tree',
'view_mode': 'list',
'res_model': 'stock.quant',