[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:
@@ -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()
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user