summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/promotion_program_line.xml
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-05-31 17:14:34 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-05-31 17:14:34 +0700
commit06a4478d69975b8a6eb3d228fa88708448b40a0e (patch)
treed1bb5115c61b973ad77ea0d975da29ce24c59bc0 /indoteknik_custom/views/promotion_program_line.xml
parent6cb1fc1a1cd0c8091c32dfcd19ebc58793873d25 (diff)
Promotion program feature
Diffstat (limited to 'indoteknik_custom/views/promotion_program_line.xml')
-rw-r--r--indoteknik_custom/views/promotion_program_line.xml86
1 files changed, 86 insertions, 0 deletions
diff --git a/indoteknik_custom/views/promotion_program_line.xml b/indoteknik_custom/views/promotion_program_line.xml
new file mode 100644
index 00000000..60334d6b
--- /dev/null
+++ b/indoteknik_custom/views/promotion_program_line.xml
@@ -0,0 +1,86 @@
+<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="limit_qty" />
+ <field name="limit_qty_user" />
+ <field name="limit_qty_transaction" />
+ <field name="line_free_item" />
+ <field name="display_on_homepage" />
+ </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="program_id" invisible="1" />
+ <field name="name" />
+ <field name="promotion_type"/>
+ <field name="product_id" />
+ <field name="image" widget="image" height="160" />
+ </group>
+ <group>
+ <field name="limit_qty" />
+ <field name="limit_qty_user" />
+ <field name="limit_qty_transaction" />
+ <field
+ name="discount_type"
+ attrs="{'invisible': [('promotion_type', '!=', 'specific_product')]}"
+ />
+ <field
+ name="discount_amount"
+ attrs="{'invisible': [('promotion_type', '!=', 'specific_product')]}"
+ />
+ <field
+ name="minimum_purchase_qty"
+ attrs="{'invisible': [('promotion_type', 'not in', ['discount_loading', 'bundling', 'merchandise'])]}"
+ />
+ <field
+ name="applies_multiply"
+ attrs="{'invisible': [('promotion_type', 'not in', ['discount_loading', 'bundling', 'merchandise'])]}"
+ />
+ <field
+ name="display_on_homepage"
+ attrs="{'invisible': [('promotion_type', '!=', 'specific_product')]}"
+ />
+ </group>
+ </group>
+ <notebook>
+ <page
+ string="Line Free Item"
+ name="line_free_items"
+ attrs="{'invisible': [('promotion_type', '=', 'specific_product')]}"
+ >
+ <field name="line_free_item" />
+ </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