summaryrefslogtreecommitdiff
path: root/indoteknik_custom
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-01-27 10:42:46 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-01-27 10:42:46 +0700
commit46cc2c3deb299cc61c14a0675221b811aaf999b8 (patch)
tree7dc914f0581a5b22ae7eb350032d75f6f2c7ae81 /indoteknik_custom
parentcbc41d6fc6126ba630dcfedda55694af3e5b23bc (diff)
initial commit for midtrans development
Diffstat (limited to 'indoteknik_custom')
-rw-r--r--indoteknik_custom/models/midtrans.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/indoteknik_custom/models/midtrans.py b/indoteknik_custom/models/midtrans.py
new file mode 100644
index 00000000..9546ff64
--- /dev/null
+++ b/indoteknik_custom/models/midtrans.py
@@ -0,0 +1,32 @@
+from odoo import fields, models, api
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class MidtransNotification(models.Model):
+ _name = 'midtrans.notification'
+
+ json_raw = fields.Char(string='JSON Raw Text')
+ sale_order_id = fields.Many2one('sale.order', string='Sales Order')
+ payment_status = fields.Selection([
+ ('pending', 'Pending'),
+ ('capture', 'Capture'),
+ ('settlement', 'Settlement'),
+ ('deny', 'Deny'),
+ ('cancel', 'Cancel'),
+ ('expire', 'Expire'),
+ ('failure', 'Failure'),
+ ('refund', 'Refund'),
+ ('chargeback', 'Chargeback'),
+ ('partial_refund', 'Partial Refund'),
+ ('partial_chargeback', 'Partial Chargeback'),
+ ('authorize', 'Authorize'),
+ ], string='Payment Status',
+ help='Payment Gateway Status / Midtrans / Web, https://docs.midtrans.com/en/after-payment/status-cycle')
+
+
+class MidtransRecurring(models.Model):
+ _name = 'midtrans.recurring'
+
+ json_raw = fields.Char(string='JSON Raw Text') \ No newline at end of file