From c2105f6b0efdd0bb74b934205bb0acc43b297bdc Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 21 Feb 2023 13:07:57 +0700 Subject: sale order set midtrans status and others --- indoteknik_custom/models/midtrans.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indoteknik_custom/models/midtrans.py') diff --git a/indoteknik_custom/models/midtrans.py b/indoteknik_custom/models/midtrans.py index df14c129..11b10292 100644 --- a/indoteknik_custom/models/midtrans.py +++ b/indoteknik_custom/models/midtrans.py @@ -25,8 +25,6 @@ class MidtransNotification(models.Model): ('authorize', 'Authorize'), ], string='Payment Status', help='Payment Gateway Status / Midtrans / Web, https://docs.midtrans.com/en/after-payment/status-cycle') - payment_type = fields.Char(string='Payment Type', help='Jenis pembayaran dengan Midtrans') - gross_amount = fields.Float(string='Gross Amount', help='Jumlah pembayaran yang dilakukan dengan Midtrans') def _parse_notification(self): query = [ @@ -44,10 +42,12 @@ class MidtransNotification(models.Model): sale_order = self.env['sale.order'].search([('name', '=', order)], limit=1) notif.payment_status = payment_status - notif.payment_type = payment_type - notif.gross_amount = gross_amount notif.sale_order_id = sale_order.id + sale_order.payment_type = payment_type + sale_order.gross_amount = gross_amount + sale_order.payment_status = payment_status + _logger.info('Success Parsing Midtrans Notification %s' % notif.id) -- cgit v1.2.3