summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-24 16:12:27 +0700
committerFIN-IT_AndriFP <it@fixcomart.co.id>2025-10-24 16:12:27 +0700
commit10f7e456791c16bf2752d4796a1ddd740d00c86e (patch)
treee592272e72fe9649012401c879b62f4bbcf52159
parent24afe5ec17b16700aca266699a5963f23380f63e (diff)
parentf8cb18e7f859792f0862ec8d08a74a67fbba95bc (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into odoo-backup
-rw-r--r--indoteknik_custom/models/refund_sale_order.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py
index 47565dfc..e6547a88 100644
--- a/indoteknik_custom/models/refund_sale_order.py
+++ b/indoteknik_custom/models/refund_sale_order.py
@@ -753,10 +753,11 @@ class RefundSaleOrder(models.Model):
line_vals = []
for so in self.sale_order_ids:
for line in so.order_line:
- if line.qty_delivered == 0:
+ barang_kurang = line.product_uom_qty - line.qty_delivered
+ if line.qty_delivered == 0 or barang_kurang > 0:
line_vals.append((0, 0, {
'product_id': line.product_id.id,
- 'quantity': line.product_uom_qty,
+ 'quantity': barang_kurang,
'from_name': so.name,
'prod_id': so.id,
'reason': '',