[FIX] stock: tell the user which product is causing the issue

closes odoo/odoo#29857
This commit is contained in:
Wolfgang Taferner
2019-01-02 10:36:57 +00:00
parent 7d45e43a13
commit d82c0d133e
+1 -1
View File
@@ -406,7 +406,7 @@ class InventoryLine(models.Model):
"""
for line in self:
if line.product_id.type != 'product':
raise UserError(_("You can only adjust stockable products."))
raise UserError(_("You can only adjust stockable products.") + '\n\n%s -> %s' % (line.product_id.display_name, line.product_id.type))
def _get_quants(self):
return self.env['stock.quant'].search([