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

« back to all changes in this revision

Viewing changes to tender_flow/tender_flow_view.xml

UF-358 [ADD] Initial creation : backup of this day

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" attrs="{'readonly': [('state', '!=', 'draft')]}" />
13
 
                        <field name="creation_date" attrs="{'readonly': [('state', '!=', 'draft')]}" />
14
 
                        <field name="requested_date" attrs="{'readonly': [('state', '!=', 'draft')]}" />
15
 
                        <field name="name" />
16
 
                        <field name="sale_order_id" attrs="{'readonly': [('state', '!=', 'draft')]}" />
17
 
                        <field name="warehouse_id" widget="selection" on_change="onchange_warehouse(warehouse_id)" attrs="{'readonly': [('state', '!=', 'draft')]}" />
18
 
                        <field name="location_id" attrs="{'readonly': [('state', '!=', 'draft')]}" />
19
 
                        <field name="company_id" invisible="True" />
20
 
                        <field name="categ" attrs="{'readonly': [('state', '!=', 'draft')]}" />
21
 
                        <field name="priority" attrs="{'readonly': [('state', '!=', 'draft')]}" />
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)" attrs="{'readonly': [('state', '!=', 'draft')]}" />
30
 
                                    <field name="comment" />
31
 
                                    <field name="qty" attrs="{'readonly': [('state', '!=', 'draft')]}" />
32
 
                                    <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft')]}" />
33
 
                                    <field name="supplier_id" />
34
 
                                    <field name="price_unit" />
35
 
                                    <field name="total_price" />
36
 
                                    <field name="currency_id" />
37
 
                                    <!--<field name="func_total_price" />
38
 
                                    <field name="func_currency_id" /> -->
39
 
                                    <field name="purchase_order_id" />
40
 
                                    <field name="purchase_order_line_number" />
41
 
                                    <field name="state" invisible="1" />
42
 
                                </tree>
43
 
                            </field>
44
 
                            <newline/>
45
 
                            <group col="13" colspan="10">
46
 
                            </group>
47
 
                        </page>
48
 
                        <page string="Suppliers">
49
 
                                <field colspan="4" mode="tree,form,graph" name="supplier_ids" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('check_partner', '=', sale_order_id ),('partner_not_int','in', { 'type':'tender', 'ids':[active_id] } )]">
50
 
                                <tree string="Suppliers">
51
 
                                    <field name="name" />
52
 
                                    <field name="partner_type" />
53
 
                                    <field name="city" />
54
 
                                    <field name="country" />
55
 
                                </tree>
56
 
                            </field>
57
 
                        </page>
58
 
                        <page string="RfQs">
59
 
                                <field colspan="4" mode="tree,form,graph" name="rfq_ids" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}"
60
 
                                        context="{'rfq_ok': True}" >
61
 
                                <tree string="RfQs">
62
 
                                    <field name="name" />
63
 
                                    <field name="partner_id" />
64
 
                                    <field name="notes" />
65
 
                                    <field name="amount_total" />
66
 
                                    <field name="currency_id" />
67
 
                                    <field name="state" />
68
 
                                </tree>
69
 
                            </field>
70
 
                        </page>
71
 
                        <page string="Notes">
72
 
                                <field name="notes" nolabel="1" />
73
 
                        </page>
74
 
                    </notebook>
75
 
                    <group col="13" colspan="4">
76
 
                        <field name="state" />
77
 
                        <field name="internal_state" invisible="True"/>
78
 
                        <button name="tender_cancel" string="Cancel" icon="gtk-cancel" attrs="{'invisible':['|', ('sale_order_id','!=', False), ('state', 'in', ['cancel', 'done'])]}" />
79
 
                        <button name="button_generate" states="draft" string="Generate RfQs" icon="gtk-convert" />
80
 
                        <button name="compare_rfqs" states="comparison" string="Compare RfQs" type="object" icon="gtk-find" />
81
 
                        <button name="update_supplier_info" states="comparison" string="Update Product's Suppliers" type="object" icon="gtk-edit" 
82
 
                            attrs="{'invisible':['|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison')]}" />
83
 
                        <button name="button_done" states="comparison" string="Continue Sourcing Process" icon="gtk-go-forward" 
84
 
                            attrs="{'invisible':['|', '|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison'), ('sale_order_id','=', False)]}" />
85
 
                        <button name="create_po" states="comparison" string="Create PO" type="object" icon="gtk-add" 
86
 
                            attrs="{'invisible':['|', '|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison'), ('sale_order_id','!=', False)]}" />
87
 
                        <button name="done" string="Closed" type="object" icon="gtk-go-forward" 
88
 
                            attrs="{'invisible':['|', '|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison'), ('sale_order_id','!=', False)]}" />
89
 
                    </group>
90
 
                </form>
91
 
            </field>
92
 
        </record>
93
 
        
94
 
        <record id="tender_tree" model="ir.ui.view">
95
 
            <field name="name">tender.tree</field>
96
 
            <field name="model">tender</field>
97
 
            <field name="type">tree</field>
98
 
            <field name="arch" type="xml">
99
 
                <tree string="Tender">
100
 
                    <field name="name" />
101
 
                    <field name="priority" />
102
 
                    <field name="categ" />
103
 
                    <field name="creation_date" />
104
 
                    <field name="requested_date" />
105
 
                    <field name="sale_order_id" />
106
 
                    <field name="state" />
107
 
                </tree>
108
 
            </field>
109
 
        </record>
110
 
        
111
 
                <record id="tender_search_form_view" model="ir.ui.view">
112
 
                        <field name="name">tender.search.form</field>
113
 
                        <field name="model">tender</field>
114
 
                        <field name="type">search</field>
115
 
                        <field name="arch" type="xml">
116
 
                                <search string="Tender">
117
 
                                        <filter name="draft" icon="gtk-file" string="Draft"
118
 
                            domain="[('state', '=', 'draft')]" />
119
 
                    <filter name="comparison" icon="gtk-sort-descending" string="Comparison"
120
 
                            domain="[('state', '=', 'comparison')]" />
121
 
                    <filter name="done" icon="gtk-apply" string="Closed"
122
 
                            domain="[('state', '=', 'done')]" />
123
 
                    <filter name="cancel" icon="gtk-cancel" string="Cancelled"
124
 
                            domain="[('state', '=', 'cancel')]" />
125
 
                                        <field name="name" />
126
 
                    <field name="supplier_ids" string="Supplier" widget="many2one" />
127
 
                    <field name="product_id" string="Product" widget="many2one" />
128
 
                                        <field name="sale_order_id" string="Sale Order" />
129
 
                    <field name="creator" />
130
 
                    <field name="creation_date" />
131
 
                                        <newline />
132
 
                    <group string="Priority" expand="0">
133
 
                      <filter icon="gtk-dialog-warning" string="Emergency" domain="[('priority','=','emergency')]"/>
134
 
                      <filter icon="gtk-yes" string="Normal" domain="[('priority','=','normal')]"/>
135
 
                      <filter icon="gtk-info" string="Priority" domain="[('priority','=','priority')]"/>
136
 
                    </group>
137
 
                    
138
 
                    <newline />
139
 
                
140
 
                    <group string="Category" expand="0">
141
 
                      <filter icon="gtk-color-picker" string="Medical" domain="[('categ','=','medical')]"/>
142
 
                      <filter icon="terp-stock" string="Logistic" domain="[('categ','=','log')]"/>
143
 
                      <filter icon="terp-purchase" string="Service" domain="[('categ','=','service')]"/>
144
 
                      <filter icon="gtk-harddisk" string="Other" domain="[('categ','=','other')]"/>
145
 
                    </group> 
146
 
                    
147
 
                    <newline />
148
 
                                        
149
 
                    <group expand="0" string="Group By..." colspan="11" col="11">
150
 
                        <filter string="Priority" icon="terp-project" domain="[]" context="{'group_by': 'priority'}" />
151
 
                        <separator orientation="vertical" />
152
 
                        <filter string="Category" icon="terp-translate" domain="[]" context="{'group_by':'categ'}"/>
153
 
                        <separator orientation="vertical" />
154
 
                        <filter string="Sale Order" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'sale_order_id'}"/>
155
 
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
156
 
                        <separator orientation="vertical" />
157
 
                        <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'creation_date'}"/>
158
 
                        <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'requested_date'}" />
159
 
                                        </group>
160
 
                                </search>
161
 
                        </field>
162
 
                </record>
163
 
 
164
 
                <record id="tender_action" model="ir.actions.act_window">
165
 
                        <field name="name">Tenders</field>
166
 
                        <field name="res_model">tender</field>
167
 
                        <field name="view_type">form</field>
168
 
                        <field name="view_mode">tree,form</field>
169
 
                        <field name="domain">[]</field>
170
 
                        <field name="search_view_id" ref="tender_search_form_view" />
171
 
                </record>
172
 
 
173
 
                <menuitem icon="STOCK_INDENT" action="tender_action"
174
 
                        id="menu_tender" parent="purchase.menu_procurement_management" sequence="3" />
175
 
                        
176
 
        <record id="purchase_order_form" model="ir.ui.view">
177
 
            <field name="name">purchase.order.form</field>
178
 
            <field name="model">purchase.order</field>
179
 
            <field name="type">form</field>
180
 
            <field name="priority">300</field>
181
 
            <field name="inherit_id" ref="purchase.purchase_order_form" />
182
 
            <field name="arch" type="xml">
183
 
                <data>
184
 
                    <field name="details" position="after">
185
 
                        <field name="tender_id" attrs="{'invisible': [('rfq_ok', '=', False)],'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'approved', 'except_picking', 'except_invoice'])]}" />
186
 
                        <field name="valid_till" attrs="{'invisible': [('rfq_ok', '=', False)],'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'draft', 'done', 'cancel', 'confirmed', 'approved', 'except_picking', 'except_invoice'])]}" />
187
 
                        <field name="rfq_ok" invisible="1" />
188
 
                    </field>
189
 
 
190
 
                    <xpath expr="/form/notebook//page[@string='Delivery &amp; Invoicing']" position="attributes">
191
 
                        <attribute name="attrs">{'invisible': [('rfq_ok', '=', True)]}</attribute>
192
 
                    </xpath>
193
 
 
194
 
                    <xpath expr="/form/notebook//page[@string='Invoices']" position="attributes">
195
 
                        <attribute name="attrs">{'invisible': [('rfq_ok', '=', True)]}</attribute>
196
 
                    </xpath>
197
 
                    
198
 
                    <xpath expr="/form/notebook/page/field[@name='order_line']/tree" position="attributes">
199
 
                        <attribute name="string">Lines</attribute>
200
 
                    </xpath>
201
 
 
202
 
                    <xpath expr="/form//field[@name='date_order']" position="attributes">
203
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
204
 
                    </xpath>
205
 
                    <xpath expr="/form//field[@name='warehouse_id']" position="attributes">
206
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
207
 
                    </xpath>
208
 
                    <xpath expr="/form//field[@name='order_type']" position="attributes">
209
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
210
 
                    </xpath>
211
 
                    <xpath expr="/form//field[@name='priority']" position="attributes">
212
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
213
 
                    </xpath>
214
 
                    <xpath expr="/form//field[@name='categ']" position="attributes">
215
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
216
 
                    </xpath>
217
 
                    <xpath expr="/form//field[@name='invoiced']" position="attributes">
218
 
                        <attribute name="readonly">True</attribute>
219
 
                    </xpath>
220
 
                    <xpath expr="/form//field[@name='shipped']" position="attributes">
221
 
                        <attribute name="readonly">True</attribute>
222
 
                    </xpath>
223
 
                    <xpath expr="/form/notebook//field[@name='partner_id']" position="attributes">
224
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])],}</attribute>
225
 
                        <attribute name="domain">[('check_partner_rfq', '=', tender_id)]</attribute>
226
 
                    </xpath>
227
 
                    <xpath expr="/form/notebook//field[@name='partner_address_id']" position="attributes">
228
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
229
 
                    </xpath>
230
 
                    <xpath expr="/form/notebook//field[@name='pricelist_id']" position="attributes">
231
 
                        <attribute name="string">Currency</attribute>
232
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
233
 
                    </xpath>
234
 
                    <xpath expr="/form/notebook//field[@name='origin']" position="attributes">
235
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
236
 
                    </xpath>
237
 
                    <!--
238
 
                    Deletion of the attrs on order_line because this avoid the opening of the purchase order line form view in readonly mode
239
 
                    <xpath expr="/form/notebook//field[@name='order_line']" position="attributes">
240
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['rfq_updated', 'done', 'cancel', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
241
 
                    </xpath>-->
242
 
                    <xpath expr="/form//field[@name='fiscal_position']" position="attributes">
243
 
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
244
 
                    </xpath>
245
 
                    <!-- IT was already defined in cross_docking 
246
 
                    <xpath expr="/form//field[@name='location_id']" position="attributes">
247
 
                        <attribute name="attrs">{'invisible': [('order_type', '=', 'direct')], 'readonly': [('state', 'in', ['rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
248
 
                    </xpath>
249
 
                    -->
250
 
                </data>
251
 
            </field>
252
 
        </record>
253
 
 
254
 
       
255
 
       <record id="product_supplierinfo_form_view" model="ir.ui.view">
256
 
            <field name="name">product.supplierinfo.form.view</field>
257
 
            <field name="model">product.supplierinfo</field>
258
 
            <field name="type">form</field>
259
 
            <field name="inherit_id" ref="supplier_catalogue.product_supplierinfo_form_view" />
260
 
            <field name="arch" type="xml">
261
 
                <data>
262
 
                        
263
 
                        <xpath expr="//field[@name='pricelist_ids']" position="attributes">
264
 
                                <attribute name="context">{'partner_id': name}</attribute>
265
 
                        </xpath>
266
 
                
267
 
                        <xpath expr="//tree[@string='Pricelist']/field[@name='rounding']" position="after">
268
 
                            <field name="partner_id" />
269
 
                                <field name="currency_id" domain="[('partner_currency', '=', partner_id)]" />
270
 
                        </xpath>
271
 
                        
272
 
                        <xpath expr="//tree[@string='Pricelist']/field[@name='valid_from']" position="after">
273
 
                                <field name="valid_till" />
274
 
                                <field name="comment" />
275
 
                                <field name="purchase_order_id" />
276
 
                                <field name="purchase_order_line_number" />
277
 
                                <field name="purchase_order_line_id" />
278
 
                        </xpath>
279
 
                 </data>
280
 
            </field>
281
 
        </record>
282
 
                        
283
 
        <record id="product_supplierinfo_form_view2" model="ir.ui.view">
284
 
            <field name="name">product.supplierinfo.form.view</field>
285
 
            <field name="model">product.supplierinfo</field>
286
 
            <field name="type">form</field>
287
 
            <field name="inherit_id" ref="product.product_supplierinfo_form_view" />
288
 
            <field name="arch" type="xml">
289
 
                <data>  
290
 
                    <!-- Modificaiton of lines -->
291
 
                        <xpath expr="//form/field[@name='price']" position="after">
292
 
                            <field name="partner_id" />
293
 
                                <field name="currency_id" domain="[('partner_currency', '=', partner_id)]" />
294
 
                                <field name="valid_till" />
295
 
                                <field name="purchase_order_id" />
296
 
                                <field name="purchase_order_line_number" />
297
 
                                <field name="purchase_order_line_id" />
298
 
                        </xpath>
299
 
                
300
 
                </data>
301
 
            </field>
302
 
        </record>
303
 
        
304
 
        <record id="view_rfq_filter" model="ir.ui.view">
305
 
            <field name="name">purchase.order.rfq.list.select</field>
306
 
            <field name="model">purchase.order</field>
307
 
            <field name="type">search</field>
308
 
            <field name="arch" type="xml">
309
 
                <search string="Search Purchase Order">
310
 
                  <group col='10' colspan='4'>
311
 
                    <filter icon="terp-document-new" name="draft_rfq" string="Draft" domain="[('state','=','draft')]" separator="1" help="Requests for Quotation which are in draft state"/>
312
 
                    <filter icon="gtk-apply" name="sent" string="Sent" domain="[('state','=','rfq_sent')]" separator="1" />
313
 
                    <filter icon="terp-camera_test" name="updated" string="Updated" domain="[('state','=','rfq_updated')]" separator="1" />
314
 
                    <filter icon="gtk-yes" name="done" string="Closed" domain="[('state','=','done')]" separator="1" />
315
 
                    <filter icon="gtk-cancel" name="cancelled" string="Cancelled" domain="[('state','=','cancel')]" separator="1" />
316
 
                    <field name="partner_id" select="1" string="Supplier" />
317
 
                    <field name="product_id" select="1" />
318
 
                    <field name="origin" />
319
 
                    <field name="create_uid" select="1"/>
320
 
                    <field name="date_order" string="Creation date"/>
321
 
                    <newline />
322
 
                    <group string="Type" expand="0">
323
 
                                <filter icon="terp-check" string="Regular" domain="[('order_type','=','regular')]" />
324
 
                                <filter icon="terp-stage" string="Donation before expiry" domain="[('order_type','=','donation_exp')]" />
325
 
                                <filter icon="terp-gtk-jump-to-ltr" string="Standard Donation" domain="[('order_type','=','donation_st')]" />
326
 
                                <filter icon="terp-partner" string="Loan" domain="[('order_type','=','loan')]" />
327
 
                                <filter icon="terp-gtk-jump-to-rtl" string="In-Kind donation" domain="[('order_type','=','in_kind')]" />
328
 
                                <filter icon="terp-purchase" string="Purchase List" domain="[('order_type','=','purchase_list')]" />
329
 
                                <filter icon="terp-crm" string="Direct PO" domain="[('order_type','=','direct')]" />
330
 
                            </group>
331
 
                            <newline />
332
 
                            <group string="Priority" expand="0">
333
 
                            <filter icon="gtk-dialog-warning" string="Emergency" domain="[('priority','=','emergency')]"/>
334
 
                            <filter icon="gtk-yes" string="Normal" domain="[('priority','=','normal')]"/>
335
 
                            <filter icon="gtk-info" string="Priority" domain="[('priority','=','priority')]"/>
336
 
                            </group>
337
 
                            <newline />
338
 
                            <group string="Category" expand="0">
339
 
                            <filter icon="gtk-color-picker" string="Medical" domain="[('categ','=','medical')]"/>
340
 
                            <filter icon="terp-stock" string="Logistic" domain="[('categ','=','log')]"/>
341
 
                            <filter icon="terp-purchase" string="Service" domain="[('categ','=','service')]"/>
342
 
                            <filter icon="gtk-harddisk" string="Other" domain="[('categ','=','other')]"/>                            
343
 
                            </group>
344
 
                        <newline />
345
 
                </group>
346
 
                <newline/>
347
 
                <group expand="0" string="Group By..." colspan="4" col="10">
348
 
                  <filter string="Order Type" icon="terp-rating-rated" domain="[]" context="{'group_by':'order_type'}"/>
349
 
                  <separator orientation="vertical"/>
350
 
                  <filter string="Priority" icon="terp-project" domain="[]" context="{'group_by':'priority'}"/>
351
 
                  <separator orientation="vertical"/>
352
 
                  <filter string="Category" icon="terp-translate" domain="[]" context="{'group_by':'categ'}"/>
353
 
                  <separator orientation="vertical"/>
354
 
                  <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
355
 
                  <separator orientation="vertical"/>
356
 
                  <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
357
 
                  <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
358
 
                  <separator orientation="vertical"/>
359
 
                  <filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
360
 
                  <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'delivery_requested_date'}"/>
361
 
                </group>
362
 
              </search>
363
 
            </field>
364
 
        </record>
365
 
 
366
 
        <record id="view_rfq_tree" model="ir.ui.view">
367
 
            <field name="name">view.rfq.tree</field>
368
 
            <field name="model">purchase.order</field>
369
 
            <field name="type">tree</field>
370
 
            <field name="priority" eval="300" />
371
 
            <field name="arch" type="xml">
372
 
                <tree string="Requests for Quotation">
373
 
                    <field name="name" />
374
 
                    <field name="order_type" />
375
 
                    <field name="priority" />
376
 
                    <field name="categ" />
377
 
                    <field name="date_order" string="Creation date"/>
378
 
                    <field name="partner_id" />
379
 
                    <field name="delivery_requested_date" />
380
 
                    <field name="origin" />
381
 
                    <field name="amount_total" sum="Total amount" />
382
 
                    <field name="state" />
383
 
                </tree>
384
 
            </field>
385
 
        </record>
386
 
        
387
 
        <record id="purchase.purchase_rfq" model="ir.actions.act_window">
388
 
            <field name="name">Requests for Quotation</field>
389
 
            <field name="type">ir.actions.act_window</field>
390
 
            <field name="res_model">purchase.order</field>
391
 
            <field name="view_type">form</field>
392
 
            <field name="context">{'rfq_ok': True, 'search_default_draft_rfq': 1, 'request_for_quotation': True}</field>
393
 
            <field name="domain">[('rfq_ok', '=', True)]</field>
394
 
            <field name="view_mode">tree,form,graph,calendar</field>
395
 
            <field name="search_view_id" ref="view_rfq_filter"/>
396
 
            <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>
397
 
        </record>
398
 
 
399
 
        <record id="purchase_rfq_tree_view_action" model="ir.actions.act_window.view">
400
 
            <field name="act_window_id" ref="purchase.purchase_rfq" />
401
 
            <field name="sequence">1</field>
402
 
            <field name="view_mode">tree</field>
403
 
            <field name="view_id" ref="view_rfq_tree" />
404
 
        </record>
405
 
        
406
 
        <record id="purchase.purchase_form_action" model="ir.actions.act_window">
407
 
            <field name="name">Purchase Orders</field>
408
 
            <field name="type">ir.actions.act_window</field>
409
 
            <field name="res_model">purchase.order</field>
410
 
            <field name="view_mode">tree,form,graph,calendar</field>
411
 
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid, 'purchase_order': True}</field>
412
 
            <field name="domain">[('rfq_ok', '=', False)]</field>
413
 
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
414
 
            <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>
415
 
        </record>
416
 
        
417
 
        <record id="act_relate_tender_rfq" model="ir.actions.act_window">
418
 
                <field name="name">Requests for Quotation</field>
419
 
            <field name="type">ir.actions.act_window</field>
420
 
            <field name="res_model">purchase.order</field>
421
 
            <field name="src_model">tender</field>
422
 
            <field name="key2">client_action_relate</field>
423
 
            <field name="view_type">form</field>
424
 
            <field name="context">{'rfq_ok': True, 'search_default_draft_rfq': 1, 'request_for_quotation': True}</field>
425
 
            <field name="domain">[('rfq_ok', '=', True), ('tender_id', '=', active_id)]</field>
426
 
            <field name="view_mode">tree,form,graph,calendar</field>
427
 
            <field name="search_view_id" ref="view_rfq_filter"/>
428
 
        </record>
429
 
        <record model="ir.values" id="relate_tender_rfq_values">
430
 
            <field name="object" eval="1" />
431
 
            <field name="name">Requests for Quotations</field>
432
 
            <field name="key2">client_action_relate</field>
433
 
            <field name="value" eval="'ir.actions.act_window,' + str(ref('act_relate_tender_rfq'))" />
434
 
            <field name="key">action</field>
435
 
            <field name="model">tender</field>
436
 
        </record>
437
 
            
438
 
        <record id="act_relate_tender_purchase_order" model="ir.actions.act_window">
439
 
            <field name="name">Purchase Orders</field>
440
 
            <field name="type">ir.actions.act_window</field>
441
 
            <field name="res_model">purchase.order</field>
442
 
            <field name="src_model">tender</field>
443
 
            <field name="key2">client_action_relate</field>
444
 
            <field name="view_mode">tree,form,graph,calendar</field>
445
 
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid, 'purchase_order': True}</field>
446
 
            <field name="domain">[('rfq_ok', '=', False), ('origin_tender_id', '=', active_id)]</field>
447
 
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
448
 
        </record>
449
 
        <record model="ir.values" id="relate_tender_purchase_order_values">
450
 
            <field name="object" eval="1" />
451
 
            <field name="name">Purchase Orders</field>
452
 
            <field name="key2">client_action_relate</field>
453
 
            <field name="value" eval="'ir.actions.act_window,' + str(ref('act_relate_tender_purchase_order'))" />
454
 
            <field name="key">action</field>
455
 
            <field name="model">tender</field>
456
 
        </record>
457
 
 
458
 
        </data>
459
 
</openerp>