summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-09-25 14:50:43 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-09-25 14:50:43 +0700
commit50b5bd7bd984ef108e8bd324440050a222d8262f (patch)
treefbd5f818fa3fbe716c41c73def6b104e8d124c36 /indoteknik_custom/views
parentdae4a3bf266ba4c19b1ba1d11c52ed9e19259b7c (diff)
Fix promotion program feature
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/promotion/promotion_program.xml1
-rw-r--r--indoteknik_custom/views/promotion/promotion_program_line.xml18
-rwxr-xr-xindoteknik_custom/views/sale_order.xml1
3 files changed, 12 insertions, 8 deletions
diff --git a/indoteknik_custom/views/promotion/promotion_program.xml b/indoteknik_custom/views/promotion/promotion_program.xml
index 99fbd878..f8432d8a 100644
--- a/indoteknik_custom/views/promotion/promotion_program.xml
+++ b/indoteknik_custom/views/promotion/promotion_program.xml
@@ -22,6 +22,7 @@
<group>
<field name="name" />
<field name="banner" widget="image" height="160" />
+ <field name="keyword_ids" widget="many2many_tags" />
</group>
<group>
<field name="start_time" />
diff --git a/indoteknik_custom/views/promotion/promotion_program_line.xml b/indoteknik_custom/views/promotion/promotion_program_line.xml
index 6fdf0a9a..db6d5252 100644
--- a/indoteknik_custom/views/promotion/promotion_program_line.xml
+++ b/indoteknik_custom/views/promotion/promotion_program_line.xml
@@ -5,7 +5,7 @@
<field name="arch" type="xml">
<tree>
<field name="name" />
- <field name="type" />
+ <field name="promotion_type" />
<field name="product_ids" />
<field name="free_product_ids" />
<field name="price" />
@@ -22,30 +22,32 @@
<group>
<group>
<field name="name" />
- <field name="type" />
+ <field name="promotion_type" />
<field name="image" widget="image" height="160" />
</group>
<group>
<field name="package_limit" />
<field name="package_limit_user" />
<field name="package_limit_trx" />
- <field name="price" />
+ <field name="price" attrs="{'invisible': [('promotion_type', '=', 'special_price')]}" />
+ <field name="discount_type" attrs="{'invisible': [('promotion_type', '!=', 'special_price')]}" />
+ <field name="discount_amount" attrs="{'invisible': [('promotion_type', '!=', 'special_price')]}" />
</group>
</group>
<notebook>
<page string="Product Required" name="product_required">
<field name="product_ids">
<tree editable="top">
- <field name="product_id" />
- <field name="qty" />
+ <field name="product_id" required="1" />
+ <field name="qty" required="1" />
</tree>
</field>
</page>
- <page string="Free Product" name="free_product">
+ <page string="Free Product" name="free_product" attrs="{'invisible': [('promotion_type', '=', 'special_price')]}">
<field name="free_product_ids">
<tree editable="top">
- <field name="product_id" />
- <field name="qty" />
+ <field name="product_id" required="1" />
+ <field name="qty" required="1" />
</tree>
</field>
</page>
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 282e4024..04d4b854 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -91,6 +91,7 @@
<field name="note_procurement" optional="hide"/>
<field name="vendor_subtotal" optional="hide"/>
<field name="amount_voucher_disc" string="Voucher" readonly="1" optional="hide"/>
+ <field name="order_promotion_id" string="Promotion" readonly="1" optional="hide"/>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_id']" position="before">
<field name="line_no" readonly="1" optional="hide"/>