summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/sale_order.xml
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/views/sale_order.xml')
-rwxr-xr-xindoteknik_custom/views/sale_order.xml23
1 files changed, 22 insertions, 1 deletions
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 04d4b854..bc098f18 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -45,6 +45,7 @@
<field name="customer_type" attrs="{'required': ['|', ('create_date', '&gt;', '2023-06-28'), ('create_date', '=', False)]}"/>
<field name="npwp" placeholder='99.999.999.9-999.999' attrs="{'required': ['|', ('create_date', '&gt;', '2023-06-28'), ('create_date', '=', False)]}"/>
<field name="sppkp" attrs="{'invisible': [('customer_type','!=','pkp')], 'required': [('customer_type', '=', 'pkp')]}"/>
+ <field name="email" attrs="{'required': [('create_date', '&gt;', '2023-09-28')]}"/>
<field name="due_id" readonly="1"/>
<field name="source_id" domain="[('id', 'in', [32, 59, 60, 61])]" attrs="{'required':[('create_date', '&gt;', '2023-09-10')]}"/>
</field>
@@ -61,7 +62,7 @@
</field>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']" position="attributes">
<attribute name="attrs">
- {'readonly': ['|', ('applied_voucher_id', '!=', False), ('state', 'in', ('done','cancel'))]}
+ {'readonly': [('state', 'in', ('done','cancel'))]}
</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes">
@@ -96,6 +97,9 @@
<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>
+ <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
+ <attribute name="options">{'no_create': True}</attribute>
+ </xpath>
<field name="amount_total" position="after">
<field name="grand_total"/>
<label for="amount_voucher_disc" string="Voucher" />
@@ -182,5 +186,22 @@
</field>
</field>
</record>
+
+ <record id="sale_order_multi_update_ir_actions_server" model="ir.actions.server">
+ <field name="name">Mark As Cancel</field>
+ <field name="model_id" ref="sale.model_sale_order"/>
+ <field name="binding_model_id" ref="sale.model_sale_order"/>
+ <field name="binding_view_types">form,list</field>
+ <field name="state">code</field>
+ <field name="code">action = records.open_form_multi_update_state()</field>
+ </record>
+
+ <record id="sale_order_update_multi_actions_server" model="ir.actions.server">
+ <field name="name">Mark As Completed</field>
+ <field name="model_id" ref="sale.model_sale_order"/>
+ <field name="binding_model_id" ref="sale.model_sale_order"/>
+ <field name="state">code</field>
+ <field name="code">action = records.open_form_multi_update_status()</field>
+ </record>
</data>
</odoo> \ No newline at end of file