From 92bf91488eca67adabb6bfe8394385a9cee1032d Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 25 Jun 2025 09:58:26 +0700 Subject: fix bu pick automatic reserve --- indoteknik_custom/models/stock_picking.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 27046063..c884f97e 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1356,6 +1356,8 @@ class StockPicking(models.Model): ]) for line in po.order_sales_match_line: + if not line.bu_pick: + continue line.bu_pick.action_assign() def check_invoice_date(self): -- cgit v1.2.3 From 74b49469064387219474ddf8e8f38e5d676079c2 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 25 Jun 2025 10:03:06 +0700 Subject: push --- indoteknik_custom/models/purchase_order_sales_match.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/purchase_order_sales_match.py b/indoteknik_custom/models/purchase_order_sales_match.py index 2ea89dab..b18864f3 100644 --- a/indoteknik_custom/models/purchase_order_sales_match.py +++ b/indoteknik_custom/models/purchase_order_sales_match.py @@ -41,7 +41,7 @@ class PurchaseOrderSalesMatch(models.Model): if stock_move: rec.bu_pick = stock_move.picking_id.id else: - rec.bu_pick = '' + rec.bu_pick = None def _compute_purchase_line_id(self): for line in self: -- cgit v1.2.3