summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-08-10 15:53:35 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-08-10 15:53:35 +0700
commit06180f02fd39a917b46a6218c465c0fe94e37610 (patch)
tree06349e99e7110646188124d0743b0795dd63392d /indoteknik_custom/views
parent2926fbf40b0aefc5507d35276711227f23f7367e (diff)
Membuat view dan model purchase.pricelist, referensi harga ke purchase.pricelist untuk order_line di purchase.order
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/purchase_order.xml2
-rw-r--r--indoteknik_custom/views/purchase_pricelist.xml53
2 files changed, 54 insertions, 1 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 8c2a3ae3..48a8cf6b 100644
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -10,7 +10,7 @@
<button name="sale_order_sync"
string="Synchronize Sale Order"
type="object"
- class="oe_highlight"
+ class="oe_highlight oe_edit_only"
attrs="{'invisible': [('sale_order_id', '=', False)]}"
/>
</div>
diff --git a/indoteknik_custom/views/purchase_pricelist.xml b/indoteknik_custom/views/purchase_pricelist.xml
new file mode 100644
index 00000000..d6abcec1
--- /dev/null
+++ b/indoteknik_custom/views/purchase_pricelist.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<odoo>
+ <record id="purchase_pricelist_tree" model="ir.ui.view">
+ <field name="name">purchase.pricelist.tree</field>
+ <field name="model">purchase.pricelist</field>
+ <field name="arch" type="xml">
+ <tree>
+ <field name="product_id"/>
+ <field name="vendor_id"/>
+ <field name="product_price"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="purchase_pricelist_form" model="ir.ui.view">
+ <field name="name">purchase.pricelist.form</field>
+ <field name="model">purchase.pricelist</field>
+ <field name="arch" type="xml">
+ <form>
+ <sheet>
+ <group>
+ <group>
+ <field name="product_id"/>
+ <field name="vendor_id" context="{'res_partner_search_mode': 'supplier'}"/>
+ <field name="product_price"/>
+ </group>
+ <group></group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="purchase_pricelist_action" model="ir.actions.act_window">
+ <field name="name">Purchase Pricelist</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">purchase.pricelist</field>
+ <field name="view_mode">tree,form</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_smiling_face">
+ Add Purchase Pricelist!
+ </p>
+ </field>
+ </record>
+
+ <menuitem
+ id="menu_purchase_pricelist"
+ name="Purchase Pricelist"
+ parent="purchase.menu_purchase_products"
+ sequence="3"
+ action="purchase_pricelist_action"
+ />
+</odoo> \ No newline at end of file