summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-07-24 13:43:53 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-07-24 13:43:53 +0700
commit92c97849b0755ab3396508fc6e6d5a12380bc549 (patch)
tree5d5942199a1f15916fb4ac95a9fb130d856b515f /indoteknik_custom/views
parent4f743b1b2aa7001466404ebef0516fded12d674d (diff)
parentc1ac22304b557b9982b5fb79d23d29b6faf48090 (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/promotion_program.xml73
-rw-r--r--indoteknik_custom/views/promotion_program_free_item.xml44
-rw-r--r--indoteknik_custom/views/promotion_program_keyword.xml44
-rw-r--r--indoteknik_custom/views/promotion_program_line.xml98
-rwxr-xr-xindoteknik_custom/views/sale_order.xml9
-rwxr-xr-xindoteknik_custom/views/voucher.xml23
-rwxr-xr-xindoteknik_custom/views/website_user_cart.xml4
7 files changed, 286 insertions, 9 deletions
diff --git a/indoteknik_custom/views/promotion_program.xml b/indoteknik_custom/views/promotion_program.xml
new file mode 100644
index 00000000..5dff80e6
--- /dev/null
+++ b/indoteknik_custom/views/promotion_program.xml
@@ -0,0 +1,73 @@
+<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="keywords" widget="many2many_tags" />
+ <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>
+ <page string="Image Properties" name="image_properties">
+ <group>
+ <group>
+ <field name="icon" widget="image" height="120" />
+ <field name="icon_top" widget="image" height="80" />
+ <field name="icon_bottom" widget="image" height="80" />
+ </group>
+ </group>
+ </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..52d421fe
--- /dev/null
+++ b/indoteknik_custom/views/promotion_program_free_item.xml
@@ -0,0 +1,44 @@
+<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="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_keyword.xml b/indoteknik_custom/views/promotion_program_keyword.xml
new file mode 100644
index 00000000..fd279665
--- /dev/null
+++ b/indoteknik_custom/views/promotion_program_keyword.xml
@@ -0,0 +1,44 @@
+<odoo>
+ <record id="promotion_program_keyword_tree" model="ir.ui.view">
+ <field name="name">Promotion Program Keyword Tree</field>
+ <field name="model">promotion.program.keyword</field>
+ <field name="arch" type="xml">
+ <tree>
+ <field name="name" />
+ <field name="program_id" />
+ </tree>
+ </field>
+ </record>
+
+ <record id="promotion_program_keyword_form" model="ir.ui.view">
+ <field name="name">Promotion Program Keyword Form</field>
+ <field name="model">promotion.program.keyword</field>
+ <field name="arch" type="xml">
+ <form>
+ <sheet>
+ <group>
+ <group>
+ <field name="name" />
+ <field name="program_id" />
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="promotion_program_keyword_action" model="ir.actions.act_window">
+ <field name="name">Promotion Program Keyword</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">promotion.program.keyword</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem
+ id="menu_promotion_program_keyword"
+ name="Program Keyword"
+ parent="indoteknik_custom.menu_promotion_program_parent"
+ sequence="4"
+ action="promotion_program_keyword_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..5963d0dd
--- /dev/null
+++ b/indoteknik_custom/views/promotion_program_line.xml
@@ -0,0 +1,98 @@
+<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 b55fefff..4570f43b 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -26,7 +26,7 @@
<field name="delivery_amt"/>
<field name="fee_third_party"/>
<field name="total_percent_margin"/>
- <field name="voucher_id" />
+ <field name="voucher_id" readonly="1" />
</field>
<field name="analytic_account_id" position="after">
<field name="customer_type" attrs="{'required': ['|', ('create_date', '&gt;', '2023-06-28'), ('create_date', '=', False)]}"/>
@@ -71,12 +71,19 @@
<field name="item_percent_margin"/>
<field name="note_procurement" optional="hide"/>
<field name="vendor_subtotal" optional="hide"/>
+ <field name="amount_voucher_disc" string="Voucher" 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"/>
</xpath>
<field name="amount_total" position="after">
<field name="grand_total"/>
+ <label for="amount_voucher_disc" string="Voucher" />
+ <div>
+ <field class="mb-0" name="amount_voucher_disc" string="Voucher"/>
+ <div class="text-right mb-2"><small>*Hanya informasi</small></div>
+ </div>
<field name="total_margin"/>
<field name="total_percent_margin"/>
</field>
diff --git a/indoteknik_custom/views/voucher.xml b/indoteknik_custom/views/voucher.xml
index cd42586e..c6741a8d 100755
--- a/indoteknik_custom/views/voucher.xml
+++ b/indoteknik_custom/views/voucher.xml
@@ -28,15 +28,7 @@
<group>
<field name="image" widget="image" width="120"/>
<field name="name" required="1" />
- <field name="description" placeholder="Insert short description..." />
- </group>
- <group string="Rules">
- <field name="code" required="1" />
- <field name="visibility" required="1" />
- <field name="start_time" required="1"/>
- <field name="end_time" required="1"/>
</group>
- <group></group>
<group string="Discount Settings">
<field name="min_purchase_amount" widget="monetary" required="1" />
<field name="discount_type" required="1" />
@@ -60,12 +52,27 @@
<field name="max_discount_amount" widget="monetary" required="1" attrs="{'invisible': [('discount_type', '!=', 'percentage')]}"/>
</group>
+ <group string="Rules">
+ <field name="code" required="1" />
+ <field name="visibility" required="1" />
+ <field name="start_time" required="1"/>
+ <field name="end_time" required="1"/>
+ <field name="limit" required="1"/>
+ <field name="manufacture_ids" widget="many2many_tags"/>
+ <field name="excl_pricelist_ids" widget="many2many_tags"/>
+ </group>
</group>
<notebook>
+ <page name="description" string="Description">
+ <label for="description" string="Max 120 characters:" class="font-weight-normal mb-2 oe_edit_only"/>
+ <field name="description" placeholder="Insert short description..." />
+ </page>
<page name="order_page" string="Orders">
<field name="order_ids" readonly="1">
<tree>
<field name="name" />
+ <field name="partner_id" />
+ <field name="amount_voucher_disc" />
<field name="amount_total" />
</tree>
</field>
diff --git a/indoteknik_custom/views/website_user_cart.xml b/indoteknik_custom/views/website_user_cart.xml
index 890d801c..fbd08acb 100755
--- a/indoteknik_custom/views/website_user_cart.xml
+++ b/indoteknik_custom/views/website_user_cart.xml
@@ -13,7 +13,9 @@
<tree>
<field name="user_id"/>
<field name="product_id"/>
+ <field name="program_line_id"/>
<field name="qty"/>
+ <field name="is_selected"/>
</tree>
</field>
</record>
@@ -28,7 +30,9 @@
<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"/>
</group>
<group></group>
</group>