mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
IMP product_catch_weight Add related fields to stock.quant for tree view and POS.
This commit is contained in:
@@ -54,3 +54,11 @@ class StockPicking(models.Model):
|
|||||||
def _compute_has_catch_weight(self):
|
def _compute_has_catch_weight(self):
|
||||||
for picking in self:
|
for picking in self:
|
||||||
picking.has_catch_weight = any(picking.mapped('move_lines.product_catch_weight_uom_id'))
|
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')
|
||||||
|
|||||||
Reference in New Issue
Block a user