This commit is contained in:
2026-02-14 18:41:16 +01:00
parent f3370e89ea
commit 6f4ad3723f

View File

@@ -331,11 +331,6 @@ class Sale(metaclass=PoolMeta):
if self.lines.lots:
return [l for l in self.lines.lots]
def get_matched_lines(self):
if self.lots:
LotQt = Pool().get('lot.qt')
return LotQt.search([('lot_s','=',self.lots[0].id),('lot_p','>',0)])
@classmethod
def validate(cls, sales):
super(Sale, cls).validate(sales)
@@ -457,6 +452,11 @@ class SaleLine(metaclass=PoolMeta):
def default_inherit_cer(cls):
return True
def get_matched_lines(self):
if self.lots:
LotQt = Pool().get('lot.qt')
return LotQt.search([('lot_s','=',self.lots[0].id),('lot_p','>',0)])
# @fields.depends('quantity')
# def on_change_with_quantity_theorical(self):
# if not self.quantity_theorical: