diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-17 11:52:04 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-17 11:52:04 +0700 |
| commit | 015ca8f0ae8ecdaaf388ee08420af54a84fb2d0c (patch) | |
| tree | 6e95bf27732dc9958ab161363a121bd46d68b717 /indoteknik_custom/models/automatic_purchase.py | |
| parent | 719dc824379bff729a97007432ef6871954b0980 (diff) | |
| parent | 4eb477f655231e39eaacb4453f216692a8355bac (diff) | |
Merge branch 'release' into staging
Diffstat (limited to 'indoteknik_custom/models/automatic_purchase.py')
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 60444b6a..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.id == 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 = { |
