summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-06-25 08:28:22 +0000
committerMartin Trigaux <mat@odoo.com>2020-07-16 10:20:43 +0000
commite61a3bc15a9941b021f950873cacc87e270770fb (patch)
tree9abf23d8daaf3df66e280730a41523eaac76d94f
parent9fefa0874502b820752d4b323a80e5015e211803 (diff)
[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
-rw-r--r--addons/stock/models/product.py4
-rw-r--r--addons/stock/models/stock_quant.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py
index 7118178bddc..5a011fda192 100644
--- a/addons/stock/models/product.py
+++ b/addons/stock/models/product.py
@@ -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()
diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py
index d1fbd37b952..faab239973c 100644
--- a/addons/stock/models/stock_quant.py
+++ b/addons/stock/models/stock_quant.py
@@ -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',