summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-04-04 16:04:05 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-04-04 16:04:05 +0700
commitce8c895990a235bc9e597268e8317101676f54a6 (patch)
treef1af507d5089b884a304101abaec0405c00d74d9
parentc4c4591591bf72ddda400492c904d28a8a5324cd (diff)
Purchasing job
-rw-r--r--indoteknik_custom/models/automatic_purchase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index 485f7a45..3eba0d62 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -167,7 +167,7 @@ class AutomaticPurchase(models.Model):
param_header = {
'partner_id': vendor_id,
'currency_id': 12,
- 'user_id': last_po.user_id.id,
+ 'user_id': self.env.user.id,
'company_id': 1, # indoteknik dotcom gemilang
'picking_type_id': 28, # indoteknik bandengan receipts
'date_order': current_time,
@@ -187,7 +187,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 + "/B/" + str(i + 1)
+ new_po.name = new_po.name + "/PJ/" + str(i + 1)
self.env['automatic.purchase.match'].create([{
'automatic_purchase_id': self.id,