[FIX] repair: don't warns quantity for consumable
When user confirms a repair order for a consumable product, they always get a warning wizard about insufficient quantity. But as we don't track quantity for consumables, this wizard is useless.
This commit is contained in:
@@ -199,6 +199,8 @@ class Repair(models.Model):
|
||||
|
||||
def action_validate(self):
|
||||
self.ensure_one()
|
||||
if self.product_id.type == 'consu':
|
||||
return self.action_repair_confirm()
|
||||
precision = self.env['decimal.precision'].precision_get('Product Unit of Measure')
|
||||
available_qty_owner = self.env['stock.quant']._get_available_quantity(self.product_id, self.location_id, self.lot_id, owner_id=self.partner_id, strict=True)
|
||||
available_qty_noown = self.env['stock.quant']._get_available_quantity(self.product_id, self.location_id, self.lot_id, strict=True)
|
||||
|
||||
Reference in New Issue
Block a user