From 7dd310eed8f726982e3df3934d85e844b14526c3 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 13 Nov 2024 13:35:16 +0700 Subject: update set parent berdasarkan vals company id --- indoteknik_custom/models/user_company_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/user_company_request.py b/indoteknik_custom/models/user_company_request.py index 86e66934..dd9a35c1 100644 --- a/indoteknik_custom/models/user_company_request.py +++ b/indoteknik_custom/models/user_company_request.py @@ -74,7 +74,7 @@ class UserCompanyRequest(models.Model): if not self.is_approve and is_approve: if is_approve == 'approved': - self.user_id.parent_id = self.user_company_id.id + self.user_id.parent_id = vals.get('user_company_id') if vals.get('user_company_id') else self.user_company_id.id self.user_id.customer_type = self.user_company_id.customer_type self.user_id.npwp = self.user_company_id.npwp self.user_id.sppkp = self.user_company_id.sppkp -- cgit v1.2.3 From 770c6506de7ba5b1a3430695298f1001f6e9d48e Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 13 Nov 2024 14:20:07 +0700 Subject: add purchaser in fulfillment v2 --- indoteknik_custom/models/sales_order_fullfillment.py | 1 + indoteknik_custom/views/sale_order.xml | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/indoteknik_custom/models/sales_order_fullfillment.py b/indoteknik_custom/models/sales_order_fullfillment.py index 42544c15..05a0641c 100644 --- a/indoteknik_custom/models/sales_order_fullfillment.py +++ b/indoteknik_custom/models/sales_order_fullfillment.py @@ -21,6 +21,7 @@ class SalesOrderFullfillmentV2(models.Model): po_ids = fields.Many2many('purchase.order', string='Purchase Order', help='PO yang dibuat, bisa lebih dari satu') po_qty = fields.Float(string='PO Qty', help='Totalan dari semua PO Outstanding') received_qty = fields.Float(string='Received Qty', help='Totalan dari barang yang diterima dari PO tsb') + purchaser = fields.Char(string='Purchaser') class SalesOrderFullfillment(models.Model): diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index ca27c2ed..7b8af971 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -353,12 +353,13 @@ - - + + - - - + + + + -- cgit v1.2.3