From eabf0ceb0fb6900736449fcb0b82125afc955751 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 11 Oct 2023 10:35:52 +0700 Subject: Update discount_amount type int to float on voucher model --- indoteknik_custom/models/voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/voucher.py b/indoteknik_custom/models/voucher.py index a40f8c42..66c50c24 100644 --- a/indoteknik_custom/models/voucher.py +++ b/indoteknik_custom/models/voucher.py @@ -12,7 +12,7 @@ class Voucher(models.Model): image = fields.Binary(string='Image') code = fields.Char(string='Code', help='Kode voucher yang akan berlaku untuk pengguna') description = fields.Text(string='Description') - discount_amount = fields.Integer(string='Discount Amount') + discount_amount = fields.Float(string='Discount Amount') discount_type = fields.Selection(string='Discount Type', selection=[ ('percentage', 'Percentage'), -- cgit v1.2.3 From 11d446d513b540184e02f26bca52b2c8e365c608 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 11 Oct 2023 10:47:22 +0700 Subject: Update discount_amount type int to float on voucher line model --- indoteknik_custom/models/voucher_line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/voucher_line.py b/indoteknik_custom/models/voucher_line.py index 8b449d1f..890471dc 100644 --- a/indoteknik_custom/models/voucher_line.py +++ b/indoteknik_custom/models/voucher_line.py @@ -7,7 +7,7 @@ class Voucher(models.Model): voucher_id = fields.Many2one('voucher', string='Voucher') manufacture_id = fields.Many2one('x_manufactures', string='Brand') min_purchase_amount = fields.Integer(string='Min. Purchase Amount', help='Nominal minimum untuk dapat menggunakan voucher. Isi 0 jika tidak ada minimum purchase amount') - discount_amount = fields.Integer(string='Discount Amount') + discount_amount = fields.Float(string='Discount Amount') discount_type = fields.Selection(string='Discount Type', selection=[ ('percentage', 'Percentage'), -- cgit v1.2.3 From ea8b431331628bc300d23d5d3ee43cf1f0f1018a Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 13 Oct 2023 10:28:51 +0700 Subject: fix rating product for pricelist --- indoteknik_custom/models/product_template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index defcbdd4..fb8561e7 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -401,9 +401,9 @@ class ProductProduct(models.Model): def _compute_web_price(self): for product in self: - pricelist_id = self.env.context.get('pricelist') + pricelist_id = self.env['ir.config_parameter'].sudo().get_param('product.pricelist.default_price_id_v2') - domain = [('pricelist_id', '=', pricelist_id or 1), ('product_id', '=', product.id)] + domain = [('pricelist_id', '=', pricelist_id or 17022), ('product_id', '=', product.id)] product_pricelist_item = self.env['product.pricelist.item'].search(domain, limit=1) if product_pricelist_item.base_pricelist_id: -- cgit v1.2.3