IMP product_catch_weight Add related fields to stock.quant for tree view and POS.

This commit is contained in:
Jared Kipe
2018-11-23 09:31:47 -08:00
parent 2bfc5a5e51
commit 829bb0502f

View File

@@ -54,3 +54,11 @@ class StockPicking(models.Model):
def _compute_has_catch_weight(self):
for picking in self:
picking.has_catch_weight = any(picking.mapped('move_lines.product_catch_weight_uom_id'))
class StockQuant(models.Model):
_inherit = 'stock.quant'
lot_catch_weight_ratio = fields.Float(related='lot_id.catch_weight_ratio')
lot_catch_weight = fields.Float(related='lot_id.catch_weight')
lot_catch_weight_uom_id = fields.Many2one('product.uom', related='lot_id.catch_weight_uom_id')