~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to tender_flow/tender_flow_view.xml

  • Committer: chloups208
  • Date: 2011-06-30 14:54:26 UTC
  • mto: (307.2.1 unifield-wm)
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: chloups208@chloups208-laptop-20110630145426-qsj5j0pp3e5b23bc
[UF-53][UF-58][UF-63] initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8"?>
2
 
<openerp>
3
 
        <data>
4
 
        
5
 
        <record id="tender_form" model="ir.ui.view">
6
 
            <field name="name">tender.form</field>
7
 
            <field name="model">tender</field>
8
 
            <field name="type">form</field>
9
 
            <field name="arch" type="xml">
10
 
                <form string="Tender">
11
 
                    <group col="6" colspan="4">
12
 
                        <field name="creator" />
13
 
                        <field name="creation_date" />
14
 
                        <field name="requested_date" />
15
 
                        <field name="name"/>
16
 
                        <field name="sale_order_id"/>
17
 
                        <field name="warehouse_id" widget="selection" on_change="onchange_warehouse(warehouse_id)" />
18
 
                        <field name="location_id" />
19
 
                        <field name="company_id" invisible="True" />
20
 
                        <field name="categ" />
21
 
                        <field name="priority" />
22
 
                        <field name="details" />
23
 
                    </group>
24
 
                    <notebook colspan="5">
25
 
                        <page string="Tender Lines">
26
 
                            <field colspan="4" mode="tree,form,graph" name="tender_line_ids" nolabel="1" widget="one2many_list">
27
 
                                <tree string="Tender Lines" editable="top">
28
 
                                        <!-- <field name="date_planned" /> -->
29
 
                                    <field name="product_id" on_change="on_product_change(product_id)" />
30
 
                                    <field name="qty" />
31
 
                                    <field name="product_uom" />
32
 
                                    <field name="supplier_id" />
33
 
                                    <field name="price_unit" />
34
 
                                    <field name="total_price" />
35
 
                                    <field name="purchase_order_id" />
36
 
                                    <field name="purchase_order_line_number" />
37
 
                                </tree>
38
 
                            </field>
39
 
                            <newline/>
40
 
                            <group col="13" colspan="10">
41
 
                            </group>
42
 
                        </page>
43
 
                        <page string="Suppliers">
44
 
                                <field colspan="4" mode="tree,form,graph" name="supplier_ids" nolabel="1">
45
 
                                <tree string="Suppliers">
46
 
                                    <field name="name" />
47
 
                                    <field name="partner_type" />
48
 
                                    <field name="city" />
49
 
                                    <field name="country" />
50
 
                                </tree>
51
 
                            </field>
52
 
                        </page>
53
 
                        <page string="RfQs">
54
 
                                <field colspan="4" mode="tree,form,graph" name="rfq_ids" nolabel="1">
55
 
                                <tree string="RfQs">
56
 
                                    <field name="name" />
57
 
                                    <field name="state" />
58
 
                                </tree>
59
 
                            </field>
60
 
                        </page>
61
 
                        <page string="Notes">
62
 
                                <field name="notes" nolabel="1" />
63
 
                        </page>
64
 
                    </notebook>
65
 
                    <group col="13" colspan="4">
66
 
                        <field name="state"/>
67
 
                        <button name="tender_cancel" string="Cancel" icon="gtk-cancel" attrs="{'invisible':[('sale_order_id','!=', False),],}" />
68
 
                        <button name="button_generate" states="draft" string="Generate RfQs" icon="gtk-convert" />
69
 
                        <button name="compare_rfqs" states="comparison" string="Compare RfQs" type="object" icon="gtk-find" />
70
 
                        <button name="update_supplier_info" states="comparison" string="Update Product's Suppliers" type="object" icon="gtk-edit" />
71
 
                        <button name="button_done" states="comparison" string="Continue Sourcing Process" icon="gtk-go-forward" attrs="{'invisible':['|', ('state', '!=', 'comparison'), ('sale_order_id','=', False),],}" />
72
 
                        <button name="create_po" states="comparison" string="Create PO" type="object" icon="gtk-add" attrs="{'invisible':['|', ('state', '!=', 'comparison'), ('sale_order_id','!=', False),],}" />
73
 
                        <button name="done" string="Done" type="object" icon="gtk-go-forward" attrs="{'invisible':['|', ('state', '!=', 'comparison'), ('sale_order_id','!=', False),],}" />
74
 
                    </group>
75
 
                </form>
76
 
            </field>
77
 
        </record>
78
 
        
79
 
        <record id="tender_tree" model="ir.ui.view">
80
 
            <field name="name">tender.tree</field>
81
 
            <field name="model">tender</field>
82
 
            <field name="type">tree</field>
83
 
            <field name="arch" type="xml">
84
 
                <tree string="Tender">
85
 
                    <field name="name" />
86
 
                    <field name="sale_order_id" />
87
 
                    <field name="rfq_name_list" />
88
 
                    <field name="categ" />
89
 
                    <field name="priority" />
90
 
                    <field name="state" />
91
 
                </tree>
92
 
            </field>
93
 
        </record>
94
 
        
95
 
                <record id="tender_search_form_view" model="ir.ui.view">
96
 
                        <field name="name">tender.search.form</field>
97
 
                        <field name="model">tender</field>
98
 
                        <field name="type">search</field>
99
 
                        <field name="arch" type="xml">
100
 
                                <search string="Tender">
101
 
                                        <filter name="draft" icon="gtk-file" string="Draft"
102
 
                            domain="[('state', '=', 'draft'),]" />
103
 
                    <filter name="comparison" icon="gtk-sort-descending" string="Comparison"
104
 
                            domain="[('state', '=', 'comparison'),]" />
105
 
                    <filter name="done" icon="gtk-apply" string="Done"
106
 
                            domain="[('state', '=', 'done'),]" />
107
 
                    <filter name="cancel" icon="gtk-cancel" string="Cancel"
108
 
                            domain="[('state', '=', 'cancel'),]" />
109
 
                                        <field name="name" />
110
 
                                        <field name="sale_order_id" />
111
 
                                        <field name="rfq_ids" />
112
 
                                        <field name="state" />
113
 
                                        
114
 
                                        <newline />
115
 
                                        <group expand="0" string="Group By..." colspan="11" col="11"
116
 
                                                groups="base.group_extended">
117
 
                                                <filter string="Sale Order" icon="terp-accessories-archiver" domain="[]"
118
 
                                                        context="{'group_by':'sale_order_id'}" />
119
 
                                                <filter string="Tender State" icon="terp-rating-rated"
120
 
                                                        domain="[]" context="{'group_by':'state'}" />
121
 
                                        </group>
122
 
                                </search>
123
 
                        </field>
124
 
                </record>
125
 
 
126
 
                <record id="tender_action" model="ir.actions.act_window">
127
 
                        <field name="name">Tenders</field>
128
 
                        <field name="res_model">tender</field>
129
 
                        <field name="view_type">form</field>
130
 
                        <field name="view_mode">tree,form</field>
131
 
                        <field name="domain">[]</field>
132
 
                        <field name="search_view_id" ref="tender_search_form_view" />
133
 
                </record>
134
 
 
135
 
                <menuitem icon="STOCK_INDENT" action="tender_action"
136
 
                        id="menu_tender" parent="purchase.menu_procurement_management" sequence="100" />
137
 
                        
138
 
        <record id="purchase_order_form" model="ir.ui.view">
139
 
            <field name="name">purchase.order.form</field>
140
 
            <field name="model">purchase.order</field>
141
 
            <field name="type">form</field>
142
 
            <field name="priority">300</field>
143
 
            <field name="inherit_id" ref="purchase.purchase_order_form" />
144
 
            <field name="arch" type="xml">
145
 
                <data>
146
 
                        
147
 
                        <field name="details" position="after">
148
 
                                <field name="tender_id" attrs="{'invisible': [('rfq_ok', '=', False),],}" />
149
 
                                <field name="valid_till" attrs="{'invisible': [('rfq_ok', '=', False),],}" />
150
 
                                <field name="rfq_ok" invisible="True" />
151
 
                        </field>
152
 
 
153
 
                        <xpath expr="/form/notebook/page/group[2]" position="replace">
154
 
                                <group colspan="4" col="13">
155
 
                                        <field name="state" readonly="1"/>
156
 
                                        <button name="purchase_cancel" states="draft,confirmed,wait_auth,rfq_sent" string="Cancel" icon="gtk-cancel"/>
157
 
                                        <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert" attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'cancel')]}" />
158
 
                                        <button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"  attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state','not in', ['approved','except_picking','except_invoice','wait'])]}"/>
159
 
                                        <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"  attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'except_picking')]}"/>
160
 
                                        <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"  attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'except_invoice')]}"/>
161
 
                                        <button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok" attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'wait_auth')]}"/>
162
 
                                        <button name="purchase_approve" states="confirmed" string="Approved" icon="gtk-go-forward"  attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'confirmed')]}"/>
163
 
                                        <button name="%(purchase.report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print" attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'approved')]}"/>
164
 
                                        <button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward" attrs="{'invisible': ['|', ('rfq_ok', '!=', False), ('state', '!=', 'draft'),],}" />
165
 
                                        <button name="rfq_sent" states="draft" string="RfQ Sent" icon="gtk-go-forward" attrs="{'invisible': ['|', ('rfq_ok', '=', False), ('state', '!=', 'draft'),],}" />
166
 
                                        <button name="rfq_updated" states="draft" string="RfQ Updated" icon="gtk-go-forward" attrs="{'invisible': ['|', ('rfq_ok', '=', False), ('state', '!=', 'rfq_sent'),],}" />
167
 
                                    <button name="rfq_done" states="rfq_updated" string="RfQ Done" icon="gtk-go-forward" attrs="{'invisible': ['|', ('tender_id', '!=', False), ('state', '!=', 'rfq_updated'),],}" />
168
 
                                </group>
169
 
                        </xpath>
170
 
                        
171
 
                </data>
172
 
            </field>
173
 
        </record>
174
 
        
175
 
        <record id="rfq_form" model="ir.ui.view">
176
 
            <field name="name">rfq.form</field>
177
 
            <field name="model">purchase.order</field>
178
 
            <field name="type">form</field>
179
 
            <field name="arch" type="xml">
180
 
                <form string="Request for Quotation">
181
 
                    <group col="6" colspan="4">
182
 
                        <field name="name"/>
183
 
                        <field name="rfq_ok" invisible="1" />
184
 
                        <field name="date_order"/>
185
 
                        <field name="invoiced"/>
186
 
                        <newline/>
187
 
                        <field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection"/>
188
 
                        <field name="partner_ref"/>
189
 
                        <field name="shipped"/>
190
 
                        <!-- purchase_override > purchase_view.xml -->
191
 
                        <field name="order_type" on_change="onchange_internal_type(order_type, partner_id)" />
192
 
                        <field name="priority" />
193
 
                        <newline />
194
 
                        <field name="categ" />
195
 
                        <field name="loan_duration" attrs="{'invisible': [('order_type', '!=', 'loan')], 'required': [('order_type', '=', 'loan')]}" />
196
 
                        <field name="details" />
197
 
                        <field name="tender_id" />
198
 
                                <field name="valid_till" />
199
 
                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
200
 
                    </group>
201
 
                    <notebook colspan="4">
202
 
                        <page string="Purchase Order">
203
 
                            <field name="partner_id" on_change="onchange_partner_id(partner_id)" context="{'search_default_supplier':1}" />
204
 
                            <field name="partner_address_id"/>
205
 
                            <field domain="[('type','=','purchase')]" name="pricelist_id" groups="base.group_extended"/>
206
 
                            <field name="origin" groups="base.group_extended"/>
207
 
                            <newline/>
208
 
                            <field colspan="4" name="order_line" nolabel="1" mode="tree,form">
209
 
                                <tree string="Purchase Order Lines">
210
 
                                    <field name="date_planned"/>
211
 
                                    <field name="name"/>
212
 
                                    <field name="product_qty"/>
213
 
                                    <field name="product_uom"/>
214
 
                                    <field name="price_unit"/>
215
 
                                    <field name="price_subtotal"/>
216
 
                                </tree>
217
 
                                <!-- default form view -->
218
 
                            </field>
219
 
                            <group col="7" colspan="4">
220
 
                                <field name="amount_untaxed" sum="Untaxed amount"/>
221
 
                                <field name="amount_tax"/>
222
 
                                <field name="amount_total" sum="Total amount"/>
223
 
                                <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
224
 
                            </group>
225
 
                            <group col="11" colspan="4">
226
 
                                <field name="state" readonly="1"/>
227
 
                                <button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
228
 
                                <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
229
 
                                <button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
230
 
                                <button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
231
 
                                <button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
232
 
                                <button name="rfq_sent" states="draft" string="RfQ Sent" icon="gtk-go-forward" attrs="{'invisible': ['|', ('rfq_ok', '!=', True), ('state', '!=', 'draft'),],}" />
233
 
                                                <button name="rfq_updated" states="draft" string="RfQ Updated" icon="gtk-go-forward" attrs="{'invisible': [('state', '!=', 'rfq_sent'),],}" />
234
 
                            </group>
235
 
                        </page>
236
 
                        <page string="Delivery &amp; Invoicing" groups="base.group_extended">
237
 
                            <group colspan="2" col="2">
238
 
                                <separator string="Delivery" colspan="2"/>
239
 
                                <field name="dest_address_id" on_change="onchange_dest_address_id(dest_address_id)"/>
240
 
                                <field name="minimum_planned_date"/>
241
 
                                <field name="location_id"/>
242
 
                            </group>
243
 
                            <group colspan="2" col="2">
244
 
                                <separator string="Invoice Control" colspan="2"/>
245
 
                                <field name="invoice_method" attrs="{'readonly':[('state','in', ['confirmed','approved','done'] )] , 'invisible': [('order_type', 'in', ['donation_exp', 'donation_st', 'in_kind', 'loan'])]}" />
246
 
                                <field name="fiscal_position" widget="selection"/>
247
 
                            </group>
248
 
                            <newline/>
249
 
                            <separator string="Purchase Control" colspan="4"/>
250
 
                            <field name="validator"/>
251
 
                            <field name="date_approve"/>
252
 
                                <separator string="Invoices" colspan="4"/>
253
 
                                <newline/>
254
 
                                <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice', 'journal_type': 'purchase'}"/>
255
 
                        </page>
256
 
                        <page string="Notes">
257
 
                            <field colspan="4" name="notes" nolabel="1"/>
258
 
                        </page>
259
 
                    </notebook>
260
 
                </form>
261
 
            </field>
262
 
        </record>
263
 
        
264
 
        <record id="product_supplierinfo_form_view" model="ir.ui.view">
265
 
            <field name="name">product.supplierinfo.form.view</field>
266
 
            <field name="model">product.supplierinfo</field>
267
 
            <field name="type">form</field>
268
 
            <field name="inherit_id" ref="product.product_supplierinfo_form_view" />
269
 
            <field name="arch" type="xml">
270
 
                <data>
271
 
                
272
 
                        <xpath expr="//tree[@string='Pricelist']/field[@name='price']" position="after">
273
 
                                <field name="currency_id" />
274
 
                                <field name="valid_till" />
275
 
                                <field name="purchase_order_id" />
276
 
                                <field name="purchase_order_line_number" />
277
 
                                <field name="purchase_order_line_id" />
278
 
                        </xpath>
279
 
                        
280
 
                        <xpath expr="//form/field[@name='price']" position="after">
281
 
                                <field name="currency_id" />
282
 
                                <field name="valid_till" />
283
 
                                <field name="purchase_order_id" />
284
 
                                <field name="purchase_order_line_number" />
285
 
                                <field name="purchase_order_line_id" />
286
 
                        </xpath>
287
 
                
288
 
                </data>
289
 
                
290
 
            </field>
291
 
        </record>
292
 
        
293
 
        <record id="view_rfq_filter" model="ir.ui.view">
294
 
            <field name="name">purchase.order.rfq.list.select</field>
295
 
            <field name="model">purchase.order</field>
296
 
            <field name="type">search</field>
297
 
            <field name="arch" type="xml">
298
 
                <search string="Search Purchase Order">
299
 
                 <group col='10' colspan='4'>
300
 
                    <filter icon="terp-document-new" name="draft_rfq" string="Draft" domain="[('state','=','draft')]" separator="1" help="Purchase order which are in draft state"/>
301
 
                    <filter icon="gtk-apply" name="sent" string="Sent" domain="[('state','=','rfq_sent')]" separator="1" />
302
 
                    <filter icon="gtk-edit" name="updated" string="Updated" domain="[('state','=','rfq_updated')]" separator="1" />
303
 
                    <filter icon="gtk-yes" name="done" string="Done" domain="[('state','=','done')]" separator="1" />
304
 
                    <separator orientation="vertical"/>
305
 
                    <field name="name" select="1" string="Reference"/>
306
 
                    <field name="partner_id" select="1"/>
307
 
                    <field name="product_id" select="1"/>
308
 
                    <field name="create_uid" select="1"/>
309
 
                    <newline />
310
 
                    <group string="Type" expand="0">
311
 
                                <filter icon="terp-check" string="Regular" domain="[('order_type','=','regular')]" />
312
 
                                <filter icon="terp-stage" string="Donation before expiry" domain="[('order_type','=','donation_exp')]" />
313
 
                                <filter icon="terp-gtk-jump-to-ltr" string="Standard Donation" domain="[('order_type','=','donation_st')]" />
314
 
                                <filter icon="terp-partner" string="Loan" domain="[('order_type','=','loan')]" />
315
 
                                <filter icon="terp-gtk-jump-to-rtl" string="In-Kind donation" domain="[('order_type','=','in_kind')]" />
316
 
                                <filter icon="terp-purchase" string="Purchase List" domain="[('order_type','=','purchase_list')]" />
317
 
                                <filter icon="terp-crm" string="Direct PO" domain="[('order_type','=','direct')]" />
318
 
                            </group>
319
 
                            <newline />
320
 
                            <group string="Priority" expand="0">
321
 
                            <filter icon="gtk-dialog-warning" string="Emergency" domain="[('priority','=','emergency')]"/>
322
 
                            <filter icon="gtk-yes" string="Normal" domain="[('priority','=','normal')]"/>
323
 
                            <filter icon="gtk-info" string="Medium" domain="[('priority','=','priority')]"/>
324
 
                            </group>
325
 
                            <newline />
326
 
                            <group string="Category" expand="0">
327
 
                            <filter icon="gtk-color-picker" string="Medical" domain="[('categ','=','medical')]"/>
328
 
                            <filter icon="terp-stock" string="Logistic" domain="[('categ','=','log')]"/>
329
 
                            <filter icon="terp-accessories-archiver" string="Food" domain="[('categ','=','food')]"/>
330
 
                            <filter icon="terp-purchase" string="Service" domain="[('categ','=','service')]"/>
331
 
                            <filter icon="gtk-network" string="Asset" domain="[('categ','=','asset')]"/>
332
 
                            <filter icon="terp-stock_symbol-selection" string="Mixed" domain="[('categ','=','mixed')]"/>
333
 
                            <filter icon="gtk-harddisk" string="Other" domain="[('categ','=','other')]"/>                            
334
 
                            </group>
335
 
                        <newline />
336
 
                </group>
337
 
                <newline/>
338
 
                  <group expand="0" string="Group By..." colspan="4" col="10" groups="base.group_extended">
339
 
                  <filter string="Order Type" icon="terp-rating-rated" domain="[]" context="{'group_by':'order_type'}"/>
340
 
                        <separator orientation="vertical"/>
341
 
                        <filter string="Priority" icon="terp-project" domain="[]" context="{'group_by':'priority'}"/>
342
 
                        <separator orientation="vertical"/>
343
 
                        <filter string="Category" icon="terp-translate" domain="[]" context="{'group_by':'categ'}"/>
344
 
                        <separator orientation="vertical"/>
345
 
                    <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
346
 
                     <separator orientation="vertical"/>
347
 
                    <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
348
 
                    <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
349
 
                     <separator orientation="vertical"/>
350
 
                    <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
351
 
                    <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'minimum_planned_date'}"/>
352
 
 
353
 
                </group>
354
 
              </search>
355
 
            </field>
356
 
        </record>
357
 
        
358
 
        <record id="purchase.purchase_rfq" model="ir.actions.act_window">
359
 
            <field name="name">Requests for Quotation</field>
360
 
            <field name="type">ir.actions.act_window</field>
361
 
            <field name="res_model">purchase.order</field>
362
 
            <field name="view_type">form</field>
363
 
            <field name="context">{'rfq_ok': True, 'search_default_draft_rfq': 1,}</field>
364
 
            <field name="domain">[('rfq_ok', '=', True),]</field>
365
 
            <field name="view_mode">tree,form,graph,calendar</field>
366
 
            <field name="search_view_id" ref="view_rfq_filter"/>
367
 
            <field name="help">You can create a request for quotation when you want to buy products to a supplier but the purchase is not confirmed yet. Use also this menu to review requests for quotation created automatically based on your logistic rules (minimum stock, MTO, etc). You can convert the request for quotation into a purchase order once the order is confirmed. If you use the extended interface (from user's preferences), you can select the way to control your supplier invoices: based on the order, based on the receptions or manual encoding.</field>
368
 
        </record>
369
 
        
370
 
        <record id="purchase.purchase_form_action" model="ir.actions.act_window">
371
 
            <field name="name">Purchase Orders</field>
372
 
            <field name="type">ir.actions.act_window</field>
373
 
            <field name="res_model">purchase.order</field>
374
 
            <field name="view_mode">tree,form,graph,calendar</field>
375
 
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid}</field>
376
 
            <field name="domain">[('rfq_ok', '=', False),]</field>
377
 
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
378
 
            <field name="help">Use this menu to search within your purchase orders by references, supplier, products, etc. For each purchase order, you can track the products received, and control the supplier invoices.</field>
379
 
        </record>
380
 
 
381
 
        </data>
382
 
</openerp>