~unifield-team/unifield-wm/wm-2418-rw-fix

« back to all changes in this revision

Viewing changes to purchase_override/purchase_view.xml

  • Committer: pierre-marie
  • Date: 2012-07-25 15:04:47 UTC
  • mfrom: (1038 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 1059.
  • Revision ID: pierre-marie@pierre-marie-laptop-20120725150447-namc1a6lqi455ez2
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
            <field name="inherit_id" ref="purchase.purchase_order_form" />
26
26
            <field name="arch" type="xml">
27
27
                <data>
28
 
 
 
28
                    <xpath expr="/form/group/field[@name='partner_ref']" position="attributes">
 
29
                        <attribute name="attrs">{'readonly': ['|', ('partner_type', 'not in', ['external', 'esc']), ('state', 'not in', ['draft', 'confirmed'])]}</attribute>
 
30
                    </xpath>
29
31
                    <xpath expr="/form/notebook//page[@string='Delivery &amp; Invoicing']/group[2]" position="replace" >
30
32
                    </xpath>
31
33
 
51
53
                                <field name="invoice_method"/>
52
54
                                <field name="fiscal_position" widget="selection"/>
53
55
                            </group>
54
 
                                <separator string="Invoices" colspan="4"/>
55
 
                                <newline/>
56
 
                                <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type': 'purchase'}"/>
 
56
                            <separator string="Invoices" colspan="4"/>
 
57
                            <newline/>
 
58
                            <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type': 'purchase'}"/>
57
59
                        </page>
58
60
                   </xpath>
59
61
 
60
 
                        
61
 
                        <xpath expr="/form//field[@name='warehouse_id']" position="replace">
62
 
                                <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id,order_type,dest_address_id)" widget="selection"/>
63
 
                        </xpath>
64
 
                        
 
62
                    <xpath expr="/form//field[@name='warehouse_id']" position="replace">
 
63
                        <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id,order_type,dest_address_id)" widget="selection"/>
 
64
                    </xpath>
 
65
 
65
66
                    <xpath expr="/form/notebook/page[@string='Purchase Order']/field[@name='partner_id']" position="replace">
66
67
                        <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1}" domain="[('id', '!=', company_id)]" />
 
68
                        <field name="allocation_setup" invisible="1" />
67
69
                    </xpath>
68
 
                    
 
70
 
69
71
                    <xpath expr="/form/group/field[@name='company_id']" position="before">
70
72
                        <field name="order_type" on_change="onchange_internal_type(order_type, partner_id, dest_partner_id, warehouse_id)" />
71
73
                        <field name="priority" />
76
78
                    </xpath>
77
79
                    <xpath expr="/form/notebook/page//field[@name='invoice_method']" position="replace">
78
80
                        <field name="invoice_method" attrs="{'invisible': [('order_type', 'in', ['donation_exp', 'donation_st', 'in_kind', 'loan'])]}" />
 
81
                        <field name="unallocation_ok" attrs="{'readonly': ['|', ('cross_docking_ok', '=', True), ('allocation_setup', '!=', 'mixed')]}" />
79
82
                    </xpath>
80
83
                    <xpath expr="/form/notebook//field[@name='dest_address_id']" position="replace">
81
84
                        <field name="dest_partner_id" attrs="{'invisible': [('order_type', '!=', 'direct')], 'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}"
82
 
                                on_change="on_change_dest_partner_id(dest_partner_id)" />
 
85
                            on_change="on_change_dest_partner_id(dest_partner_id)" />
83
86
                        <field name="dest_address_id" domain="[('partner_id', '=', dest_partner_id)]" attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" />
84
87
                    </xpath>
85
88
                    <xpath expr="/form/notebook//field[@name='fiscal_position']" position="after">
86
 
                        <field name="invoice_address_id" domain="[('partner_id', 'in', (dest_partner_id, company_id))]"
87
 
                                attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}" />
 
89
                        <field name="invoice_address_id"
 
90
                            domain="[('partner_id', 'in', (dest_partner_id, company_id))]"
 
91
                            attrs="{'required': [('order_type', '=', 'direct')], 'readonly': [('state', 'not in', ['draft', 'confirmed'])]}"
 
92
                            />
88
93
                    </xpath>
89
94
 
90
95
                    <xpath expr="/form/notebook//tree//field[@name='price_subtotal']" position="after">
94
99
                        <button string="Split line" icon="terp-stock_effects-object-colorize" name="open_split_wizard" type="object" 
95
100
                            attrs="{'invisible': ['|', ('rfq_ok', '=', True), ('order_state_purchase_order_line', 'not in', ('draft', 'wait', 'confirmed'))]}" />
96
101
                    </xpath>
97
 
                    
 
102
 
98
103
                    <xpath expr="/form//field[@name='state']" position="after">
99
 
                        <button name="dpo_received" string="Validate the reception" icon="terp-camera_test"
100
 
                                    attrs="{'invisible': ['|', ('state', '!=', 'approved'), ('order_type', '!=', 'direct')]}" />
 
104
                        <button name="dpo_received"
 
105
                            string="Validate the reception"
 
106
                            icon="terp-camera_test"
 
107
                            attrs="{'invisible': ['|', ('state', '!=', 'approved'), ('order_type', '!=', 'direct')]}" 
 
108
                            />
101
109
                    </xpath>
102
110
                </data>
103
111
            </field>
135
143
                    <group col="8" colspan="4">
136
144
                      <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state', 'in', ['draft'])]" separator="1" help="Purchase orders which are in draft state" />
137
145
                      <filter icon="terp-camera_test" name="confirmed" string="Validated" domain="[('state','in',['confirmed','wait'])]" separator="1" help="Purchase orders which are in validated state." />
 
146
                      <filter icon="terp-check" name="confirmed_wait" string="Confirmed (waiting)" domain="[('state', 'in', ['confirmed_wait'])]" separator="1" help="Purchase orders which are in approved state." />
138
147
                      <filter icon="terp-check" name="approved" string="Confirmed" domain="[('state', 'in', ['approved'])]" separator="1" help="Purchase orders which are in approved state." />
139
148
                      <filter icon="gtk-close" name="done" string="Closed" domain="[('state', 'in', ['done'])]" separator="1" help="Purchase orders which are in done state." />
140
149
                      <separator orientation="vertical" />
247
256
            <field name="type">form</field>
248
257
            <field name="inherit_id" ref="purchase.purchase_order_line_form" />
249
258
            <field name="arch" type="xml">
250
 
                <data>                          
251
 
                        <xpath expr="/form//field[@name='product_id']" position="replace">
252
 
                                <field name="product_id" colspan="4" 
253
 
                                        context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" 
254
 
                                        on_change="product_id_on_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,parent.state,old_price_unit,nomen_manda_0,comment,context)"/>
255
 
                        </xpath>
256
 
                        
257
 
                        <xpath expr="/form//field[@name='price_unit']" position="replace">
258
 
                            <field name="rfq_ok" invisible="1" />
259
 
                            <field name="state" invisible="1" />
260
 
                            <field name="fake_id" invisible="1" />
261
 
                            <field name="change_price_ok" invisible="1" />
262
 
                            <field name="old_price_unit" invisible="1" />
263
 
                            <field name="price_unit" 
264
 
                                on_change="price_unit_change(fake_id, price_unit, product_id, product_uom, product_qty, parent.pricelist_id, parent.partner_id, parent.date_order, change_price_ok, parent.state, old_price_unit, nomen_manda_0, comment, context)" />
265
 
                        </xpath>
266
 
                </data>
 
259
                <data>
 
260
                    <xpath expr="/form//field[@name='product_id']" position="replace">
 
261
                        <field name="product_id" colspan="4" 
 
262
                            context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" 
 
263
                            on_change="product_id_on_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes,parent.state,old_price_unit,nomen_manda_0,comment,context)"/>
 
264
                    </xpath>
 
265
 
 
266
                    <xpath expr="/form//field[@name='price_unit']" position="replace">
 
267
                        <field name="rfq_ok" invisible="1" />
 
268
                        <field name="state" invisible="1" />
 
269
                        <field name="fake_id" invisible="1" />
 
270
                        <field name="change_price_ok" invisible="1" />
 
271
                        <field name="old_price_unit" invisible="1" />
 
272
                        <field name="price_unit" 
 
273
                            on_change="price_unit_change(fake_id, price_unit, product_id, product_uom, product_qty, parent.pricelist_id, parent.partner_id, parent.date_order, change_price_ok, parent.state, old_price_unit, nomen_manda_0, comment, context)" />
 
274
                    </xpath>
 
275
 
 
276
                </data>
267
277
            </field>
268
278
        </record>
269
 
        
 
279
 
270
280
        <record id="purchase_order_confirm_wizard" model="ir.ui.view">
271
 
                <field name="name">purchase.order.confirm.wizard</field>
272
 
                <field name="model">purchase.order.confirm.wizard</field>
273
 
                <field name="type">form</field>
274
 
                <field name="arch" type="xml">
275
 
                        <form string="Warning on confirmation">
276
 
                                <separator colspan="4" string="Purchase Order" />
277
 
                                <field name="order_id" colspan="4" />
278
 
                                <separator colspan="4" string="Warning" />
279
 
                                <field name="errors" colspan="4" nolabel="1" />
280
 
                                <separator colspan="4" string="Actions" />
281
 
                                <button special="cancel" icon="gtk-cancel" string="Close window" colspan="1" />
282
 
                                <button type="object" name="validate_order" icon="terp-check" string="Confirm" colspan="3" />
283
 
                        </form>
284
 
                </field>
 
281
            <field name="name">purchase.order.confirm.wizard</field>
 
282
            <field name="model">purchase.order.confirm.wizard</field>
 
283
            <field name="type">form</field>
 
284
            <field name="arch" type="xml">
 
285
                <form string="Warning on confirmation">
 
286
                    <separator colspan="4" string="Purchase Order" />
 
287
                    <field name="order_id" colspan="4" />
 
288
                    <separator colspan="4" string="Warning" />
 
289
                    <field name="errors" colspan="4" nolabel="1" />
 
290
                    <separator colspan="4" string="Actions" />
 
291
                    <button special="cancel" icon="gtk-cancel" string="Close window" colspan="1" />
 
292
                    <button type="object" name="validate_order" icon="terp-check" string="Confirm" colspan="3" />
 
293
                </form>
 
294
            </field>
285
295
        </record>
286
296
 
287
 
                <menuitem id="purchase.menu_action_stock_move_report_po" parent="stock.next_id_61" />
288
 
        
289
 
        <!-- Invoice control -->
 
297
        <menuitem id="purchase.menu_action_stock_move_report_po" parent="stock.next_id_61" />
 
298
 
 
299
        <!-- Invoice control -->
290
300
        <delete id="purchase.menu_procurement_management_invoice" model="ir.ui.menu" />
291
301
        <delete id="purchase.menu_procurement_management_pending_invoice" model="ir.ui.menu" />
292
302
        <delete id="purchase.menu_purchase_line_order_draft" model="ir.ui.menu" />
295
305
        <delete id="purchase.menu_procurement_partner_contact_form" model="ir.ui.menu" />
296
306
        <delete id="purchase.menu_product_by_category_purchase_form" model="ir.ui.menu" />
297
307
        <delete id="purchase.menu_procurement_management_product" model="ir.ui.menu" />
298
 
        
 
308
 
299
309
        <!-- Picking on Purchase menu -->
300
310
        <delete model="ir.ui.menu" id="purchase.menu_action_picking_tree4" />
301
311
        <delete model="ir.ui.menu" id="purchase.menu_action_picking_tree_in_move" />
302
 
        <delete model="ir.ui.menu" id="purchase.menu_procurement_management_inventory" />
303
 
        
 
312
<!--        <delete model="ir.ui.menu" id="purchase.menu_procurement_management_inventory" /> -->
 
313
 
304
314
        <!-- Purchase configuration menu -->
305
 
        <delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
306
 
        <delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
307
 
        <delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
 
315
<!--
 
316
        <delete model="ir.ui.menu" id="base.menu_procurement_management_supplier" />
 
317
-->
308
318
        <delete model="ir.ui.menu" id="purchase.menu_purchase_uom_categ_form_action" />
309
319
        <delete model="ir.ui.menu" id="purchase.menu_purchase_uom_form_action" />
310
320
        <delete model="ir.ui.menu" id="purchase.menu_purchase_unit_measure_purchase" />
312
322
        <delete model="ir.ui.menu" id="purchase.menu_product_pricelist_action2_purchase" />
313
323
        <delete model="ir.ui.menu" id="purchase.menu_purchase_product_pricelist_type" />
314
324
        <delete model="ir.ui.menu" id="purchase.menu_product_category_config_purchase" />
 
325
<!--
315
326
        <delete model="ir.ui.menu" id="purchase.menu_purchase_config_pricelist" />
316
327
        <delete model="ir.ui.menu" id="purchase.menu_product_in_config_purchase" />
 
328
    used in useability_dashboard_and_menu/menu/supply_config_menu.xml
 
329
-->
317
330
        <delete model="ir.ui.menu" id="purchase.action_supplier_address_form" />
 
331
 
 
332
        <!-- Here was an act_window to display all PO from products views.
 
333
             This action is defined on product_attributes module -->
318
334
        
319
 
    
320
335
    </data>
321
336
</openerp>