14.02.26
This commit is contained in:
@@ -331,11 +331,6 @@ class Sale(metaclass=PoolMeta):
|
|||||||
if self.lines.lots:
|
if self.lines.lots:
|
||||||
return [l for l in 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
|
@classmethod
|
||||||
def validate(cls, sales):
|
def validate(cls, sales):
|
||||||
super(Sale, cls).validate(sales)
|
super(Sale, cls).validate(sales)
|
||||||
@@ -457,6 +452,11 @@ class SaleLine(metaclass=PoolMeta):
|
|||||||
def default_inherit_cer(cls):
|
def default_inherit_cer(cls):
|
||||||
return True
|
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')
|
# @fields.depends('quantity')
|
||||||
# def on_change_with_quantity_theorical(self):
|
# def on_change_with_quantity_theorical(self):
|
||||||
# if not self.quantity_theorical:
|
# if not self.quantity_theorical:
|
||||||
|
|||||||
Reference in New Issue
Block a user