From 17fd1072ccd6f2f74f73dd2e52ce7f0120adb3ce Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Fri, 12 Jul 2024 15:36:24 +0700 Subject: add is_show_program on flash sale --- indoteknik_api/controllers/api_v1/flash_sale.py | 1 + indoteknik_custom/models/product_pricelist.py | 1 + indoteknik_custom/views/product_pricelist.xml | 1 + 3 files changed, 3 insertions(+) diff --git a/indoteknik_api/controllers/api_v1/flash_sale.py b/indoteknik_api/controllers/api_v1/flash_sale.py index dff8bec3..05636704 100644 --- a/indoteknik_api/controllers/api_v1/flash_sale.py +++ b/indoteknik_api/controllers/api_v1/flash_sale.py @@ -24,6 +24,7 @@ class FlashSale(controller.Controller): 'pricelist_id': pricelist.id, 'option': pricelist.flashsale_option, 'name': pricelist.name, + 'is_show_program': pricelist.is_show_program, 'banner': request.env['ir.attachment'].api_image('product.pricelist', 'banner', pricelist.id), 'banner_mobile': request.env['ir.attachment'].api_image('product.pricelist', 'banner_mobile', pricelist.id), 'banner_top': request.env['ir.attachment'].api_image('product.pricelist', 'banner_top', pricelist.id), diff --git a/indoteknik_custom/models/product_pricelist.py b/indoteknik_custom/models/product_pricelist.py index b7a6d77e..2b17cf6e 100644 --- a/indoteknik_custom/models/product_pricelist.py +++ b/indoteknik_custom/models/product_pricelist.py @@ -6,6 +6,7 @@ class ProductPricelist(models.Model): _inherit = 'product.pricelist' is_flash_sale = fields.Boolean(string='Flash Sale', default=False) + is_show_program = fields.Boolean(string='Show Program', default=False) banner = fields.Binary(string='Banner') start_date = fields.Datetime(string='Start Date') end_date = fields.Datetime(string='End Date') diff --git a/indoteknik_custom/views/product_pricelist.xml b/indoteknik_custom/views/product_pricelist.xml index 55139a24..0dfb69db 100644 --- a/indoteknik_custom/views/product_pricelist.xml +++ b/indoteknik_custom/views/product_pricelist.xml @@ -7,6 +7,7 @@ + -- cgit v1.2.3