summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/purchase_order.xml
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-09-29 02:32:56 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-09-29 02:32:56 +0000
commit78f205302c35cab2512971d64c8152aab2dcfa95 (patch)
tree72be75ad949fe9efaf7b55c8f7f5722225538b28 /indoteknik_custom/views/purchase_order.xml
parent50b5bd7bd984ef108e8bd324440050a222d8262f (diff)
parent0bb47005022b33c79ecfb5924d41f35ce794c5fb (diff)
Merged in production (pull request #126)
Production
Diffstat (limited to 'indoteknik_custom/views/purchase_order.xml')
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml44
1 files changed, 41 insertions, 3 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 7d436c46..0ad76ae5 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -37,6 +37,7 @@
<field name="currency_id" position="after">
<field name="summary_qty_po"/>
<field name="count_line_product"/>
+ <field name="payment_term_id"/>
</field>
<field name="amount_total" position="after">
<field name="total_margin"/>
@@ -52,13 +53,19 @@
<field name="product_id" position="before">
<field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
</field>
+ <field name="product_id" position="attributes">
+ <attribute name="options">{'no_create': True}</attribute>
+ </field>
<field name="product_qty" position="before">
- <field name="qty_available_store"/>
- <field name="suggest"/>
+ <field name="qty_available_store" readonly="1" />
+ <field name="suggest" readonly="1" />
</field>
<field name="price_unit" position="after">
<field name="price_vendor" attrs="{'readonly': 1}" optional="hide"/>
</field>
+ <field name="price_subtotal" position="after">
+ <field name="so_line_id" attrs="{'readonly': 1}" optional="hide"/>
+ </field>
<page name="purchase_delivery_invoice" position="after">
<page name="purchase_vendor_bills" string="Vendor Bills" groups="indoteknik_custom.technical_administrator">
<group>
@@ -69,11 +76,28 @@
<field name="fiscal_position_id" position="after">
<field name="note_description"/>
<field name="total_so_percent_margin"/>
-
+ <field name="has_active_invoice" invisible="1" />
+ </field>
+
+ <field name="order_line" position="attributes">
+ <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute>
</field>
+
+ <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes">
+ <attribute name="attrs">{'readonly': [], 'required': True}</attribute>
+ </xpath>
+
+ <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='taxes_id']" position="attributes">
+ <attribute name="attrs">{'readonly': []}</attribute>
+ </xpath>
+
+ <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="attributes">
+ <attribute name="attrs">{'readonly': [], 'required': True}</attribute>
+ </xpath>
</field>
</record>
</data>
+
<data>
<record id="rfq_order_tree_view_inherit" model="ir.ui.view">
<field name="name">Purchase</field>
@@ -86,6 +110,7 @@
</field>
</record>
</data>
+
<data>
<record id="purchase_order_tree_view_inherit" model="ir.ui.view">
<field name="name">Purchase</field>
@@ -95,6 +120,19 @@
<field name="invoice_status" position="after">
<field name="po_status"/>
<field name="note_description" optional="hide"/>
+ <field name="sale_order_id" optional="hide"/>
+ </field>
+ </field>
+ </record>
+ </data>
+ <data>
+ <record id="purchase_order_search_inherit" model="ir.ui.view">
+ <field name="name">purchase.order.select.inherit</field>
+ <field name="model">purchase.order</field>
+ <field name="inherit_id" ref="purchase.purchase_order_view_search"/>
+ <field name="arch" type="xml">
+ <field name="name" position="after">
+ <field name="sale_order_id" string="Sale Order"/>
</field>
</field>
</record>