diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-27 11:08:33 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-01-27 11:08:33 +0700 |
| commit | 3afc9d7c40a2fe9858aaa69b79ebdb52ccfa0830 (patch) | |
| tree | e43b5c6947a6b999de80d73790a1f5ff30a0822f /indoteknik_custom | |
| parent | f9588e353ebaf672a9b270ba871aad83792bfe34 (diff) | |
| parent | 5ddf58175a447ecf728025c8615262a423f1313a (diff) | |
Merge branch 'staging' of bitbucket.org:altafixco/indoteknik-addons into staging
Diffstat (limited to 'indoteknik_custom')
| -rwxr-xr-x | indoteknik_custom/models/__init__.py | 1 | ||||
| -rw-r--r-- | indoteknik_custom/models/midtrans.py | 38 | ||||
| -rwxr-xr-x | indoteknik_custom/security/ir.model.access.csv | 5 |
3 files changed, 43 insertions, 1 deletions
diff --git a/indoteknik_custom/models/__init__.py b/indoteknik_custom/models/__init__.py index c6fb7d4f..121bd0f4 100755 --- a/indoteknik_custom/models/__init__.py +++ b/indoteknik_custom/models/__init__.py @@ -46,3 +46,4 @@ from . import x_partner_purchase_order from . import x_product_tags from . import website_ads from . import leads_monitoring +from . import midtrans diff --git a/indoteknik_custom/models/midtrans.py b/indoteknik_custom/models/midtrans.py new file mode 100644 index 00000000..76dee447 --- /dev/null +++ b/indoteknik_custom/models/midtrans.py @@ -0,0 +1,38 @@ +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') + + +class MidtransAccount(models.Model): + _name = 'midtrans.account' + + json_raw = fields.Char(string='JSON Raw Text') diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index d469aa1e..83d9e2ed 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -27,4 +27,7 @@ access_website_content,access.website.content,model_website_content,,1,1,1,1 access_invoice_reklas,access.invoice.reklas,model_invoice_reklas,,1,1,1,1 access_custom_mail_marketing,access.custom.mail.marketing,model_custom_mail_marketing,,1,1,1,1 access_website_ads,access.website.ads,model_website_ads,,1,1,1,1 -access_leads_monitoring,access.leads.monitoring,model_leads_monitoring,,1,1,1,1
\ No newline at end of file +access_leads_monitoring,access.leads.monitoring,model_leads_monitoring,,1,1,1,1 +access_midtrans_notification,access.midtrans.notification,model_midtrans_notification,,1,1,1,1 +access_midtrans_recurring,access.midtrans.recurring,model_midtrans_recurring,,1,1,1,1 +access_midtrans_account,access.midtrans.account,model_midtrans_account,,1,1,1,1
\ No newline at end of file |
