main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
Showing only changes of commit 7155708d4b - Show all commits

View File

@@ -352,17 +352,18 @@ class Fee(ModelSQL,ModelView):
PurchaseLine = Pool().get('purchase.line')
pl = PurchaseLine()
pl.product = fee.product
if fee.line or fee.sale_line:
pl.quantity = round(qt_line,5)
if fee.shipment_in:
pl.quantity = round(qt_sh,5)
# if fee.line or fee.sale_line:
# pl.quantity = round(qt_line,5)
# if fee.shipment_in:
# pl.quantity = round(qt_sh,5)
pl.quantity = 1
logger.info("CREATE_PURHCASE_FOR_FEE_QT:%s",pl.quantity)
pl.unit = unit
pl.fee_ = fee.id
if fee.price:
fee_price = fee.get_price_per_qt()
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.lines = [pl]
p.party = fee.supplier