diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-31 17:14:34 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-05-31 17:14:34 +0700 |
| commit | 06a4478d69975b8a6eb3d228fa88708448b40a0e (patch) | |
| tree | d1bb5115c61b973ad77ea0d975da29ce24c59bc0 /indoteknik_custom/views | |
| parent | 6cb1fc1a1cd0c8091c32dfcd19ebc58793873d25 (diff) | |
Promotion program feature
Diffstat (limited to 'indoteknik_custom/views')
| -rw-r--r-- | indoteknik_custom/views/promotion_program.xml | 63 | ||||
| -rw-r--r-- | indoteknik_custom/views/promotion_program_free_item.xml | 45 | ||||
| -rw-r--r-- | indoteknik_custom/views/promotion_program_line.xml | 86 |
3 files changed, 194 insertions, 0 deletions
diff --git a/indoteknik_custom/views/promotion_program.xml b/indoteknik_custom/views/promotion_program.xml new file mode 100644 index 00000000..e309cc29 --- /dev/null +++ b/indoteknik_custom/views/promotion_program.xml @@ -0,0 +1,63 @@ +<odoo> + <record id="promotion_program_tree" model="ir.ui.view"> + <field name="name">Promotion Program Tree</field> + <field name="model">promotion.program</field> + <field name="arch" type="xml"> + <tree> + <field name="name" /> + <field name="start_time" /> + <field name="end_time" /> + <field name="applies_to" /> + </tree> + </field> + </record> + + <record id="promotion_program_form" model="ir.ui.view"> + <field name="name">Promotion Program Form</field> + <field name="model">promotion.program</field> + <field name="arch" type="xml"> + <form> + <sheet> + <group> + <group> + <field name="name" /> + <field name="banner" widget="image" height="160" /> + </group> + <group> + <field name="start_time" /> + <field name="end_time" /> + <field name="applies_to" /> + </group> + </group> + <notebook> + <page string="Program Lines" name="program_lines"> + <field name="program_line" /> + </page> + </notebook> + </sheet> + </form> + </field> + </record> + + <record id="promotion_program_action" model="ir.actions.act_window"> + <field name="name">Promotion Program</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">promotion.program</field> + <field name="view_mode">tree,form</field> + </record> + + <menuitem + id="menu_promotion_program_parent" + name="Promotion Program" + parent="website.menu_website_configuration" + sequence="7" + /> + + <menuitem + id="menu_promotion_program" + name="Program" + parent="indoteknik_custom.menu_promotion_program_parent" + sequence="1" + action="promotion_program_action" + /> +</odoo>
\ No newline at end of file diff --git a/indoteknik_custom/views/promotion_program_free_item.xml b/indoteknik_custom/views/promotion_program_free_item.xml new file mode 100644 index 00000000..c17a752d --- /dev/null +++ b/indoteknik_custom/views/promotion_program_free_item.xml @@ -0,0 +1,45 @@ +<odoo> + <record id="promotion_program_free_item_tree" model="ir.ui.view"> + <field name="name">Promotion Program Free Item Tree</field> + <field name="model">promotion.program.free_item</field> + <field name="arch" type="xml"> + <tree> + <field name="product_id" /> + <field name="qty" /> + </tree> + </field> + </record> + + <record id="promotion_program_free_item_form" model="ir.ui.view"> + <field name="name">Promotion Program Free Item Form</field> + <field name="model">promotion.program.free_item</field> + <field name="arch" type="xml"> + <form> + <sheet> + <group> + <group> + <field name="line_id" invisible="1" /> + <field name="product_id" /> + <field name="qty" /> + </group> + </group> + </sheet> + </form> + </field> + </record> + + <record id="promotion_program_free_item_action" model="ir.actions.act_window"> + <field name="name">Promotion Program Free Item</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">promotion.program.free_item</field> + <field name="view_mode">tree,form</field> + </record> + + <menuitem + id="menu_promotion_program_free_item" + name="Program Free Item" + parent="indoteknik_custom.menu_promotion_program_parent" + sequence="3" + action="promotion_program_free_item_action" + /> +</odoo>
\ No newline at end of file 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 |
