summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-04-10 15:46:05 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-04-10 15:46:05 +0700
commitcc29232e4b935ab2adcc20e177c2bc313cc5f373 (patch)
treec473d09e007f23e593b6d98a5cb5a0142f08dc07
parent8415d007f283af56432bcd1435b46c173070f4fc (diff)
bug fix split po
-rw-r--r--indoteknik_custom/models/automatic_purchase.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index f2e7d9e9..eea66b99 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -45,7 +45,7 @@ class AutomaticPurchase(models.Model):
], order='brand_id')
count = brand_id = 0
for product in products_vendors:
- if vendor['partner_id'][0] == 5571 and (count == 200 or brand_id != product.brand_id.id):
+ if count == 200 or brand_id != product.brand_id.id:
count = 0
counter_po_number += 1
new_po = self.env['purchase.order'].create([param_header])
@@ -55,8 +55,8 @@ class AutomaticPurchase(models.Model):
'order_id': new_po.id
}])
self.env.cr.commit()
- else:
- new_po = self.env['purchase.order'].create([param_header])
+ # else:
+ # new_po = self.env['purchase.order'].create([param_header])
brand_id = product.brand_id.id
count += 10
param_line = {