diff options
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 4 |
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, |
