28.01.26
This commit is contained in:
@@ -352,17 +352,18 @@ class Fee(ModelSQL,ModelView):
|
|||||||
PurchaseLine = Pool().get('purchase.line')
|
PurchaseLine = Pool().get('purchase.line')
|
||||||
pl = PurchaseLine()
|
pl = PurchaseLine()
|
||||||
pl.product = fee.product
|
pl.product = fee.product
|
||||||
if fee.line or fee.sale_line:
|
# if fee.line or fee.sale_line:
|
||||||
pl.quantity = round(qt_line,5)
|
# pl.quantity = round(qt_line,5)
|
||||||
if fee.shipment_in:
|
# if fee.shipment_in:
|
||||||
pl.quantity = round(qt_sh,5)
|
# pl.quantity = round(qt_sh,5)
|
||||||
|
pl.quantity = 1
|
||||||
logger.info("CREATE_PURHCASE_FOR_FEE_QT:%s",pl.quantity)
|
logger.info("CREATE_PURHCASE_FOR_FEE_QT:%s",pl.quantity)
|
||||||
pl.unit = unit
|
pl.unit = unit
|
||||||
pl.fee_ = fee.id
|
pl.fee_ = fee.id
|
||||||
if fee.price:
|
if fee.price:
|
||||||
fee_price = fee.get_price_per_qt()
|
fee_price = fee.get_price_per_qt()
|
||||||
logger.info("GET_FEE_PRICE_PER_QT:%s",fee_price)
|
logger.info("GET_FEE_PRICE_PER_QT:%s",fee_price)
|
||||||
pl.unit_price = round(Decimal(fee_price),4)
|
pl.unit_price = round(Decimal(fee.amount),4)
|
||||||
p = Purchase()
|
p = Purchase()
|
||||||
p.lines = [pl]
|
p.lines = [pl]
|
||||||
p.party = fee.supplier
|
p.party = fee.supplier
|
||||||
|
|||||||
Reference in New Issue
Block a user