summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-09-23 11:50:20 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-09-23 11:50:20 +0700
commitdae4a3bf266ba4c19b1ba1d11c52ed9e19259b7c (patch)
tree8858e0660aa004b582aedf6f437c0f455f8ad1ef /indoteknik_custom/views
parentadbc9b985f1c5fb2b2f41f79c686b3a573003e62 (diff)
Update promotion program scheme
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/promotion/promotion_program.xml (renamed from indoteknik_custom/views/promotion_program.xml)1
-rw-r--r--indoteknik_custom/views/promotion/promotion_program_free_item.xml (renamed from indoteknik_custom/views/promotion_program_free_item.xml)0
-rw-r--r--indoteknik_custom/views/promotion/promotion_program_keyword.xml (renamed from indoteknik_custom/views/promotion_program_keyword.xml)0
-rw-r--r--indoteknik_custom/views/promotion/promotion_program_line.xml72
-rw-r--r--indoteknik_custom/views/promotion_program_line.xml98
-rwxr-xr-xindoteknik_custom/views/sale_order.xml17
-rwxr-xr-xindoteknik_custom/views/website_user_cart.xml12
7 files changed, 94 insertions, 106 deletions
diff --git a/indoteknik_custom/views/promotion_program.xml b/indoteknik_custom/views/promotion/promotion_program.xml
index 5dff80e6..99fbd878 100644
--- a/indoteknik_custom/views/promotion_program.xml
+++ b/indoteknik_custom/views/promotion/promotion_program.xml
@@ -21,7 +21,6 @@
<group>
<group>
<field name="name" />
- <field name="keywords" widget="many2many_tags" />
<field name="banner" widget="image" height="160" />
</group>
<group>
diff --git a/indoteknik_custom/views/promotion_program_free_item.xml b/indoteknik_custom/views/promotion/promotion_program_free_item.xml
index 52d421fe..52d421fe 100644
--- a/indoteknik_custom/views/promotion_program_free_item.xml
+++ b/indoteknik_custom/views/promotion/promotion_program_free_item.xml
diff --git a/indoteknik_custom/views/promotion_program_keyword.xml b/indoteknik_custom/views/promotion/promotion_program_keyword.xml
index fd279665..fd279665 100644
--- a/indoteknik_custom/views/promotion_program_keyword.xml
+++ b/indoteknik_custom/views/promotion/promotion_program_keyword.xml
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..6fdf0a9a
--- /dev/null
+++ b/indoteknik_custom/views/promotion/promotion_program_line.xml
@@ -0,0 +1,72 @@
+<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="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="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" />
+ </group>
+ </group>
+ <notebook>
+ <page string="Product Required" name="product_required">
+ <field name="product_ids">
+ <tree editable="top">
+ <field name="product_id" />
+ <field name="qty" />
+ </tree>
+ </field>
+ </page>
+ <page string="Free Product" name="free_product">
+ <field name="free_product_ids">
+ <tree editable="top">
+ <field name="product_id" />
+ <field name="qty" />
+ </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
diff --git a/indoteknik_custom/views/promotion_program_line.xml b/indoteknik_custom/views/promotion_program_line.xml
deleted file mode 100644
index 5963d0dd..00000000
--- a/indoteknik_custom/views/promotion_program_line.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<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="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', '!=', 'special_price')]}"
- />
- <field
- name="discount_amount"
- attrs="{'invisible': [('promotion_type', '!=', 'special_price')]}"
- />
- <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', '!=', 'special_price')]}"
- />
- </group>
- </group>
- <notebook>
- <page
- string="Line Free Item"
- name="line_free_items"
- attrs="{'invisible': [('promotion_type', '=', 'special_price')]}"
- >
- <field name="line_free_item" />
- </page>
- <page
- string="Order Line"
- name="order_line"
- >
- <field name="order_line_ids" readonly="1">
- <tree>
- <field name="order_id" />
- <field name="name" />
- <field name="product_id" />
- <field name="product_uom_qty" />
- </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
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 3ea65498..282e4024 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -91,7 +91,6 @@
<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="program_line_id" optional="1" />
</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"/>
@@ -132,6 +131,22 @@
</group>
</group>
</page>
+ <page string="Promotion" name="page_promotion">
+ <field name="order_promotion_ids" readonly="1">
+ <tree options="{'no_open': True}">
+ <field name="program_line_id" />
+ <field name="quantity" />
+ <field name="is_applied" />
+ </tree>
+ <form>
+ <group>
+ <field name="program_line_id" />
+ <field name="quantity" />
+ <field name="is_applied" />
+ </group>
+ </form>
+ </field>
+ </page>
</page>
</field>
diff --git a/indoteknik_custom/views/website_user_cart.xml b/indoteknik_custom/views/website_user_cart.xml
index f43c9f63..e3630363 100755
--- a/indoteknik_custom/views/website_user_cart.xml
+++ b/indoteknik_custom/views/website_user_cart.xml
@@ -29,12 +29,12 @@
<sheet>
<group>
<group>
- <field name="user_id"/>
- <field name="product_id"/>
- <field name="program_line_id" domain="[('product_id', '=', product_id)]"/>
- <field name="qty"/>
- <field name="is_selected"/>
- <field name="source"/>
+ <field name="user_id" />
+ <field name="product_id" />
+ <field name="program_line_id" />
+ <field name="qty" />
+ <field name="is_selected" />
+ <field name="source" />
</group>
<group></group>
</group>