summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-03-14 16:38:20 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-03-14 16:38:20 +0700
commit611babff11dc2c0aae9717d3dd374ab0dd021a63 (patch)
tree4056503665ba06c6b214eb3bb137aa214b76edea
parent058bd90843f4c765ada774e3dfe57a652e80e8a3 (diff)
parentd47876712dd119851d988f891b44b0ebf6f91d27 (diff)
Merge branch 'release' into staging
-rw-r--r--indoteknik_custom/models/product_pricelist.py4
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
-rw-r--r--indoteknik_custom/views/product_pricelist.xml1
3 files changed, 6 insertions, 1 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/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 2dcfa718..fa5f3b6a 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -354,7 +354,7 @@ class SaleOrderLine(models.Model):
domain=['|', ('active', '=', False), ('active', '=', True)])
delivery_amt_line = fields.Float('DeliveryAmtLine', compute='compute_delivery_amt_line')
fee_third_party_line = fields.Float('FeeThirdPartyLine', compute='compute_fee_third_party_line', default=0)
- line_no = fields.Integer('No', default=0)
+ line_no = fields.Integer('No', default=0, copy=False)
def compute_item_margin(self):
for line in self:
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">