summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/promotion/promotion_program_line.xml
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-09-26 10:20:59 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-09-26 10:20:59 +0700
commit25a3271bd14671d57da6b4349745e446e94ebfef (patch)
treed5a6554c61a02cd08f41c8068237a926e29874dd /indoteknik_custom/views/promotion/promotion_program_line.xml
parentbd8a83a76cea6ef2466c250226f7c95c38b3024c (diff)
parent50b5bd7bd984ef108e8bd324440050a222d8262f (diff)
Merge branch 'change/feature/promotion-program' into production
# Conflicts: # indoteknik_custom/models/sale_order.py
Diffstat (limited to 'indoteknik_custom/views/promotion/promotion_program_line.xml')
-rw-r--r--indoteknik_custom/views/promotion/promotion_program_line.xml74
1 files changed, 74 insertions, 0 deletions
diff --git a/indoteknik_custom/views/promotion/promotion_program_line.xml b/indoteknik_custom/views/promotion/promotion_program_line.xml
new file mode 100644
index 00000000..db6d5252
--- /dev/null
+++ b/indoteknik_custom/views/promotion/promotion_program_line.xml
@@ -0,0 +1,74 @@
+<odoo>
+ <record id="promotion_program_line_tree" model="ir.ui.view">
+ <field name="name">Promotion Program Line Tree</field>
+ <field name="model">promotion.program.line</field>
+ <field name="arch" type="xml">
+ <tree>
+ <field name="name" />
+ <field name="promotion_type" />
+ <field name="product_ids" />
+ <field name="free_product_ids" />
+ <field name="price" />
+ </tree>
+ </field>
+ </record>
+
+ <record id="promotion_program_line_form" model="ir.ui.view">
+ <field name="name">Promotion Program Line Form</field>
+ <field name="model">promotion.program.line</field>
+ <field name="arch" type="xml">
+ <form>
+ <sheet>
+ <group>
+ <group>
+ <field name="name" />
+ <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" 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" required="1" />
+ <field name="qty" required="1" />
+ </tree>
+ </field>
+ </page>
+ <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" required="1" />
+ <field name="qty" required="1" />
+ </tree>
+ </field>
+ </page>
+ </notebook>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="promotion_program_line_action" model="ir.actions.act_window">
+ <field name="name">Promotion Program Line</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">promotion.program.line</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem
+ id="menu_promotion_program_line"
+ name="Program Line"
+ parent="indoteknik_custom.menu_promotion_program_parent"
+ sequence="2"
+ action="promotion_program_line_action"
+ />
+</odoo> \ No newline at end of file