[FIX] stock: update quantity when products are grouped
- Go Inventory > Master Data > Products - Group by Category - Go to a product - Click on 'Update Inventory' An error is raised because the field `categ_id` doesn't exist on `stock.quant`. opw-2161129 closes odoo/odoo#42964 X-original-commit: 901d60cd90f1e6ba0fd6502c04619193d3ca1c7b Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -617,13 +617,15 @@ class StockQuant(models.Model):
|
||||
:param extend: If True, enables form, graph and pivot views. False by default.
|
||||
"""
|
||||
self._quant_tasks()
|
||||
ctx = dict(self.env.context or {})
|
||||
ctx.pop('group_by', None)
|
||||
action = {
|
||||
'name': _('Update Quantity'),
|
||||
'view_type': 'tree',
|
||||
'view_mode': 'list',
|
||||
'res_model': 'stock.quant',
|
||||
'type': 'ir.actions.act_window',
|
||||
'context': self.env.context,
|
||||
'context': ctx,
|
||||
'domain': domain or [],
|
||||
'help': """
|
||||
<p class="o_view_nocontent_empty_folder">No Stock On Hand</p>
|
||||
|
||||
Reference in New Issue
Block a user