diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-05-10 11:27:07 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-05-10 11:27:07 +0700 |
| commit | cb9ae6021dd4858372ed78d16ab491226c95f1d2 (patch) | |
| tree | 0065f1c38a4cde7e800e57685a3b7d431669cb6b /indoteknik_custom/models/automatic_purchase.py | |
| parent | 71a36d6f5bb8688f0d8907818fb90026c5dac5d3 (diff) | |
change request qty onhand and fix bug name apo
Diffstat (limited to 'indoteknik_custom/models/automatic_purchase.py')
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 6478f2c9..af09abf0 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -183,8 +183,10 @@ class AutomaticPurchase(models.Model): def create_po_by_vendor(self, vendor_id): current_time = datetime.now() - # if not self.apo_type =='reordering': - # self.check_qty_po() + if not self.apo_type =='reordering': + name = "/PJ/" + else: + name = "/A/" PRODUCT_PER_PO = 20 @@ -218,7 +220,7 @@ class AutomaticPurchase(models.Model): # i start from zero (0) for i in range(page): new_po = self.env['purchase.order'].create([param_header]) - new_po.name = new_po.name + "/PJ/" + str(i + 1) + new_po.name = new_po.name + name + str(i + 1) self.env['automatic.purchase.match'].create([{ 'automatic_purchase_id': self.id, |
