Faircot report
This commit is contained in:
@@ -492,8 +492,7 @@ class Lot(ModelSQL, ModelView):
|
|||||||
st = state_id
|
st = state_id
|
||||||
else:
|
else:
|
||||||
st = self.lot_state.id
|
st = self.lot_state.id
|
||||||
logger.info("GET_HIST_QT:%s",st)
|
lot = [e for e in self.lot_hist if e.quantity_type.id == st][0]
|
||||||
lot = [e for e in self.lot_hist if e.quantity_type.id == st][0]
|
|
||||||
qt = round(lot.quantity,5)
|
qt = round(lot.quantity,5)
|
||||||
gross_qt = round(lot.gross_quantity,5)
|
gross_qt = round(lot.gross_quantity,5)
|
||||||
return qt, gross_qt
|
return qt, gross_qt
|
||||||
|
|||||||
@@ -3096,7 +3096,6 @@ class SaleLine(metaclass=PoolMeta):
|
|||||||
line.check_pricing()
|
line.check_pricing()
|
||||||
line.check_targeted_qt_tolerance()
|
line.check_targeted_qt_tolerance()
|
||||||
#no lot need to create one with line quantity
|
#no lot need to create one with line quantity
|
||||||
logger.info("FROM_VALIDATE_LINE:%s",line.created_by_code)
|
|
||||||
if not line.created_by_code:
|
if not line.created_by_code:
|
||||||
if cls._sync_initial_quantity_from_theorical(line):
|
if cls._sync_initial_quantity_from_theorical(line):
|
||||||
cls.save([line])
|
cls.save([line])
|
||||||
@@ -3146,7 +3145,6 @@ class SaleLine(metaclass=PoolMeta):
|
|||||||
if line.lots:
|
if line.lots:
|
||||||
for lot in line.lots:
|
for lot in line.lots:
|
||||||
lqts = LotQt.search([('lot_s','=',lot.id),('lot_p','>',0)])
|
lqts = LotQt.search([('lot_s','=',lot.id),('lot_p','>',0)])
|
||||||
logger.info("VALIDATE_SL:%s",lqts)
|
|
||||||
if lqts:
|
if lqts:
|
||||||
generated_purchase_side = True
|
generated_purchase_side = True
|
||||||
purchase_lines = [e.lot_p.line for e in lqts]
|
purchase_lines = [e.lot_p.line for e in lqts]
|
||||||
|
|||||||
Reference in New Issue
Block a user