diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-04-11 13:57:01 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-04-11 13:57:01 +0700 |
| commit | 000a7fa68a738843c443145c1a8d102783e04fac (patch) | |
| tree | 04b7c6bf423ce0cf93ea4a526408d71426caaf9e /indoteknik_custom/models/automatic_purchase.py | |
| parent | d1b86303b0934c9f6348e7016822d449349540d3 (diff) | |
| parent | 3b5871b8c364e819a2fbaf268e4693e848e6af0a (diff) | |
Merge branch 'release' into flashsale-solr
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 = { |
