summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-01 11:19:19 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-01 11:19:19 +0700
commita54492e34db2a43d9aae2d575b2b3c073669631c (patch)
tree409d317bed22355f844a1f9e81873ca83f2f9bd6 /indoteknik_custom/models
parent53e3cacd7d32df44ce8637284c3ec16050e07e5b (diff)
<iman> update flash sale & get_request_params untuk boolean
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/sale_order.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 03b37229..6886f5a8 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -72,8 +72,7 @@ class SaleOrder(models.Model):
gross_amount = fields.Float(string='Gross Amount', help='Jumlah pembayaran yang dilakukan dengan Midtrans')
notification = fields.Char(string='Notification', help='Dapat membantu error dari approval')
delivery_service_type = fields.Char(string='Delivery Service Type', help='data dari rajaongkir')
- flash_sale = fields.Char(string='Flash Sale', help='data dari web')
- flash_sale_icon = fields.Html(string='Flash Sale', compute='_compute_flash_sale_icon')
+ flash_sale = fields.Boolean(string='Flash Sale', help='Data dari web')
grand_total = fields.Monetary(string='Grand Total', help='Amount total + amount delivery', compute='_compute_grand_total')
payment_link_midtrans = fields.Char(string='Payment Link', help='Url payment yg digenerate oleh midtrans, harap diserahkan ke customer agar dapat dilakukan pembayaran secara mandiri')
due_id = fields.Many2one('due.extension', string="Due Extension", readonly=True, tracking=True)
@@ -102,14 +101,6 @@ class SaleOrder(models.Model):
compute_fullfillment = fields.Boolean(string='Compute Fullfillment', compute="_compute_fullfillment")
note_ekspedisi = fields.Char(string="Note Ekspedisi")
- @api.depends('flash_sale')
- def _compute_flash_sale_icon(self):
- for order in self:
- if order.flash_sale and order.flash_sale.lower() == 'true':
- order.flash_sale_icon = '<span style="color:black;">✔</span>'
- else:
- order.flash_sale_icon = '<span style="color:black;">✖</span>'
-
def open_form_multi_create_uang_muka(self):
action = self.env['ir.actions.act_window']._for_xml_id('indoteknik_custom.action_sale_order_multi_uangmuka')
action['context'] = {