6E2G8E8mBdj9lMCL08tfBX changeset

Changeset376238626361 (b)
ParentNone (a)
ab
0+<?xml version="1.0" encoding="utf-8"?>
0+<openerp>
0+    <data>
0+        <record id="commission_sale_order_form_view" model="ir.ui.view">
0+            <field name="inherit_id" ref="sale.view_order_form"/>
0+            <field name="priority" eval="100"/> <!-- Let the old view the default -->
0+            <field name="name">commission.sale.order.form</field>
0+            <field name="type">form</field>
0+            <field name="model">sale.order</field>
0+            <field name="arch" type="xml">
0+                <data>
0+                    <!-- Sale order line modifications -->
0+                    <xpath expr="//page[@string='Order Line']/separator[@string='Taxes']" position="before">
0+                        <separator colspan="5" string="Commission"/>
0+                        <field name="supplier_id" attrs="{'readonly': [('product_id', '=', False)]}"
0+                               context="{'search_default_supplier' : True}"
0+                               on_change="supplier_id_change(product_id, supplier_id)"/>
0+                        <field name="commission"/>
0+                    </xpath>
0+                    <xpath expr="//tree[@string='Sales Order Lines']/field[@name='discount']" position="before">
0+                        <field name="supplier_id"/>
0+                        <field name="commission"/>
0+                    </xpath>
0+                    <!-- Sale order modifications -->
0+                    <xpath expr="//button[@name='manual_invoice']" position="attributes">
0+                        <attribute name="invisible">1</attribute>
0+                    </xpath>
0+                    <xpath expr="//field[@name='amount_tax']" position="after">
0+                        <field name="total_commissions" readonly="1"/>
0+                    </xpath>
0+                    <xpath expr="//button[@string='Advance Invoice']" position="attributes">
0+                        <attribute name="invisible">1</attribute>
0+                    </xpath>
0+                    <xpath expr="//separator[@string='Logistic']" position="after">
0+                        <field name="disable_logistic"/>
0+                    </xpath>
0+                </data>
0+            </field>
0+        </record>
0+        <!-- Menu -->
0+        <record model="ir.actions.act_window" id="action_sale_order_commission">
0+            <field name="name">Sale Orders</field>
0+            <field name="res_model">sale.order</field>
0+            <field name="view_type">form</field>
0+            <field name="view_mode">tree,form,calendar,graph</field>
0+            <field name="context">{'search_default_user_id' : uid}</field>
0+            <field name="search_view_id" ref="sale.view_sales_order_filter"/>
0+            <field name="type">ir.actions.act_window</field>
0+        </record>
0+        <menuitem id="menu_sale_order" name="Sale Order (for commissions)" groups="base.group_sale_salesman,base.group_sale_manager"
0+                  action="action_sale_order_commission" parent="base.menu_sales"/>
0+    </data>
0+</openerp>
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- Revision None
+++ Revision 376238626361
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="commission_sale_order_form_view" model="ir.ui.view">
+ <field name="inherit_id" ref="sale.view_order_form"/>
+ <field name="priority" eval="100"/> <!-- Let the old view the default -->
+ <field name="name">commission.sale.order.form</field>
+ <field name="type">form</field>
+ <field name="model">sale.order</field>
+ <field name="arch" type="xml">
+ <data>
+ <!-- Sale order line modifications -->
+ <xpath expr="//page[@string='Order Line']/separator[@string='Taxes']" position="before">
+ <separator colspan="5" string="Commission"/>
+ <field name="supplier_id" attrs="{'readonly': [('product_id', '=', False)]}"
+ context="{'search_default_supplier' : True}"
+ on_change="supplier_id_change(product_id, supplier_id)"/>
+ <field name="commission"/>
+ </xpath>
+ <xpath expr="//tree[@string='Sales Order Lines']/field[@name='discount']" position="before">
+ <field name="supplier_id"/>
+ <field name="commission"/>
+ </xpath>
+ <!-- Sale order modifications -->
+ <xpath expr="//button[@name='manual_invoice']" position="attributes">
+ <attribute name="invisible">1</attribute>
+ </xpath>
+ <xpath expr="//field[@name='amount_tax']" position="after">
+ <field name="total_commissions" readonly="1"/>
+ </xpath>
+ <xpath expr="//button[@string='Advance Invoice']" position="attributes">
+ <attribute name="invisible">1</attribute>
+ </xpath>
+ <xpath expr="//separator[@string='Logistic']" position="after">
+ <field name="disable_logistic"/>
+ </xpath>
+ </data>
+ </field>
+ </record>
+ <!-- Menu -->
+ <record model="ir.actions.act_window" id="action_sale_order_commission">
+ <field name="name">Sale Orders</field>
+ <field name="res_model">sale.order</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form,calendar,graph</field>
+ <field name="context">{'search_default_user_id' : uid}</field>
+ <field name="search_view_id" ref="sale.view_sales_order_filter"/>
+ <field name="type">ir.actions.act_window</field>
+ </record>
+ <menuitem id="menu_sale_order" name="Sale Order (for commissions)" groups="base.group_sale_salesman,base.group_sale_manager"
+ action="action_sale_order_commission" parent="base.menu_sales"/>
+ </data>
+</openerp>