diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-12-19 09:32:39 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-12-19 09:32:39 +0700 |
| commit | 034229b8f7d6f9ac8ad5c1562774966a66898ec9 (patch) | |
| tree | cb9f36d6e70313607c708b818cc7c187489971dd /indoteknik_custom/models/purchase_order.py | |
| parent | e2086bc4f96391260fb3430537feddbc25bdde40 (diff) | |
| parent | 955f0eff6fb1917c3cf0fde8ee6994ee43148732 (diff) | |
Merge remote-tracking branch 'origin/production' into purchasing-job
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 177a4744..285c5a95 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -214,6 +214,7 @@ class PurchaseOrder(models.Model): # suggest = 'harus beli' # if qty_available > order_line.product_qty: # suggest = 'masih cukup' + values = { 'order_id': self.id, 'product_id': order_line.product_id.id, @@ -224,6 +225,9 @@ class PurchaseOrder(models.Model): 'so_line_id': order_line.id, } self.order_line.create(values) + for order_line in self.order_line: + order_line.suggest_purchasing() + def compute_count_line_product(self): for order in self: |
