diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-03-14 16:37:28 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-03-14 16:37:28 +0700 |
| commit | d47876712dd119851d988f891b44b0ebf6f91d27 (patch) | |
| tree | 72b3378f3faee70783a2f355b841a8b457f1eeb2 | |
| parent | fa189ce12e1120a1caf7d00b2a2f748a94ce68dd (diff) | |
add flashsale option for website
| -rw-r--r-- | indoteknik_custom/models/product_pricelist.py | 4 | ||||
| -rw-r--r-- | indoteknik_custom/views/product_pricelist.xml | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/product_pricelist.py b/indoteknik_custom/models/product_pricelist.py index 190887cf..a309945d 100644 --- a/indoteknik_custom/models/product_pricelist.py +++ b/indoteknik_custom/models/product_pricelist.py @@ -10,6 +10,10 @@ class ProductPricelist(models.Model): start_date = fields.Datetime(string='Start Date') end_date = fields.Datetime(string='End Date') banner_mobile = fields.Binary(string='Banner Mobile') + flashsale_option = fields.Selection([ + ('all', 'For All User'), + ('registered_user', 'Only for Registered User') + ], string='Flashsale Option') class ProductPricelistItem(models.Model): diff --git a/indoteknik_custom/views/product_pricelist.xml b/indoteknik_custom/views/product_pricelist.xml index 3ff6854f..4cf06e18 100644 --- a/indoteknik_custom/views/product_pricelist.xml +++ b/indoteknik_custom/views/product_pricelist.xml @@ -7,6 +7,7 @@ <field name="arch" type="xml"> <field name="company_id" position="after"> <field name="is_flash_sale"/> + <field name="flashsale_option" attrs="{'invisible':[('is_flash_sale', '=', False)]}"/> </field> <group name="pricelist_settings" position="after"> <group name="flash_sale_setting"> |
