From 2719b8cdd45b356baa598255dcdbdd8e353478e7 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Fri, 30 Aug 2024 10:13:44 +0700 Subject: payment term po cr --- indoteknik_custom/models/automatic_purchase.py | 1 + indoteknik_custom/views/purchase_order.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 3561fc0f..1d1322fa 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -220,6 +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.payment_term_id = new_po.partner_id.property_supplier_payment_term_id new_po.name = new_po.name + name + str(i + 1) self.env['automatic.purchase.match'].create([{ diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index b936086a..c301f3d3 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -39,7 +39,7 @@ - + -- cgit v1.2.3