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

254.2.1 by chloups208
[UF-379] first commit
1
<?xml version="1.0" encoding="utf-8"?>
2
<openerp>
1935 by jf
[IMP] Code cleanup
3
    <data>
4
254.2.1 by chloups208
[UF-379] first commit
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">
1935 by jf
[IMP] Code cleanup
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')]}" />
1282.6.2 by Quentin THEURET
UTP-270 [FIX] Tender : Tender reference readonly
15
                        <field name="name" />
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
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')]}" />
359.2.2 by chloups208
uf-489-tender improvement-price lists-tender screen form and tree
19
                        <field name="company_id" invisible="True" />
1935 by jf
[IMP] Code cleanup
20
                        <field name="categ" attrs="{'readonly': [('state', '!=', 'draft')]}"
21
                            on_change="onchange_categ(categ)"/>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
22
                        <field name="priority" attrs="{'readonly': [('state', '!=', 'draft')]}" />
1728.24.7 by Quentin THEURET
UTP-674 [IMP] Add a delivery address on tender and RfQ
23
                        <field name="delivery_address" colspan="4" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('dest_address', '=', company_id)]"/>
254.2.6 by chloups208
[UF-379]tests and UI details - purchase and procurement refactoring with hooks - sourcing refactoring
24
                        <field name="details" />
254.2.1 by chloups208
[UF-379] first commit
25
                    </group>
26
                    <notebook colspan="5">
27
                        <page string="Tender Lines">
552.1.1 by Quentin THEURET
UF-631 [FIX] Tender : Add possibility to remove lines in 'Comparison' state
28
                            <field colspan="4" mode="tree,form,graph" name="tender_line_ids" nolabel="1" widget="one2many_list">
1775.1.14 by Quentin THEURET
UTP-873 [IMP] Tender : Re-source the FO line if cancel the tender lines or the remove the tender
29
                                <tree string="Tender Lines" editable="top" hide_delete_button="1" noteditable="line_state in ['cancel', 'done']" colors="blue: line_state=='cancel'">
1743.1.2 by Quentin THEURET
Merge latest trunk and UF-1044
30
                                    <field name="product_id" on_change="on_product_change(product_id, product_uom, qty)" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('purchase_type', '=', parent.categ)]" context="{'available_for_restriction': 'tender', 'search_default_not_restricted': 1}" />
892.15.37 by matthieu.choplin at msf
uf-1055 when we process an IR of type MTO and we did not select a product we have a comment, but as the product is required on the tender line, we set a product [To Be Defined] that prevent from generating an RfQ if we didn't change it.
31
                                    <field name="comment" />
1533.8.27 by Quentin THEURET
UF-1763 [IMP] Tender lines : Add check of round qty according to UoM
32
                                    <field name="qty" attrs="{'readonly': [('state', '!=', 'draft')]}" 
33
                                        on_change="onchange_uom_qty(product_uom, qty)" />
1421.1.6 by matthieu.choplin at msf
[IMP] utp-129: add a domain on the uom of the tender line
34
                                    <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('uom_by_product', '=', product_id)]"/>
254.2.1 by chloups208
[UF-379] first commit
35
                                    <field name="supplier_id" />
36
                                    <field name="price_unit" />
37
                                    <field name="total_price" />
837.3.12 by Quentin THEURET
UF-1048 [IMP] Tender : Add currency of the tender line when supplier is choosen
38
                                    <field name="currency_id" />
254.2.1 by chloups208
[UF-379] first commit
39
                                    <field name="purchase_order_id" />
254.2.5 by chloups208
[UF-379]creation of po for on_order, procurement order workflow
40
                                    <field name="purchase_order_line_number" />
1832.2.1 by Quentin THEURET
UTP-868 [IMP] : Request for Quotation : Disallow the possibility to change the product on RfQ lines generated by a tender
41
                                    <field name="created_by_rfq" invisible="0" />
451.4.11 by Quentin THEURET
UF-631 [IMP] Reworked tender flow manually to done process
42
                                    <field name="state" invisible="1" />
1775.1.14 by Quentin THEURET
UTP-873 [IMP] Tender : Re-source the FO line if cancel the tender lines or the remove the tender
43
                                    <field name="line_state" invisible="1" />
1775.1.52 by Quentin THEURET
UTP-872 [IMP] If a tender line is canceled and a procurement order was attached to this tender line, cancel the procurement order to avoid PO line creation for this tender line
44
                                    <button name="ask_unlink" type="object" string="Delete" icon="gtk-del" attrs="{'invisible': ['|', ('state', '=', 'done'), ('line_state', 'in', ['done', 'cancel'])]}" />
254.2.1 by chloups208
[UF-379] first commit
45
                                </tree>
46
                            </field>
47
                            <newline/>
48
                            <group col="13" colspan="10">
49
                            </group>
50
                        </page>
51
                        <page string="Suppliers">
1935 by jf
[IMP] Code cleanup
52
                            <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] } )]">
254.2.1 by chloups208
[UF-379] first commit
53
                                <tree string="Suppliers">
54
                                    <field name="name" />
254.2.3 by chloups208
[UF-379]rfq generation, purchase order workflow modification
55
                                    <field name="partner_type" />
56
                                    <field name="city" />
57
                                    <field name="country" />
254.2.1 by chloups208
[UF-379] first commit
58
                                </tree>
59
                            </field>
60
                        </page>
254.2.4 by chloups208
[UF-379]rfq generation, purchase order workflow modification
61
                        <page string="RfQs">
1935 by jf
[IMP] Code cleanup
62
                            <field colspan="4" mode="tree,form,graph" name="rfq_ids" nolabel="1" attrs="{'readonly': [('state', '!=', 'draft')]}"
63
                                context="{'rfq_ok': True}" >
254.2.4 by chloups208
[UF-379]rfq generation, purchase order workflow modification
64
                                <tree string="RfQs">
65
                                    <field name="name" />
631.2.1 by Quentin THEURET
UF-848 [IMP] Add comparison of notes of RfQ lines in a new tab
66
                                    <field name="partner_id" />
67
                                    <field name="notes" />
68
                                    <field name="amount_total" />
69
                                    <field name="currency_id" />
254.2.4 by chloups208
[UF-379]rfq generation, purchase order workflow modification
70
                                    <field name="state" />
71
                                </tree>
72
                            </field>
73
                        </page>
254.2.6 by chloups208
[UF-379]tests and UI details - purchase and procurement refactoring with hooks - sourcing refactoring
74
                        <page string="Notes">
1935 by jf
[IMP] Code cleanup
75
                            <field name="notes" nolabel="1" />
254.2.6 by chloups208
[UF-379]tests and UI details - purchase and procurement refactoring with hooks - sourcing refactoring
76
                        </page>
254.2.1 by chloups208
[UF-379] first commit
77
                    </notebook>
254.2.5 by chloups208
[UF-379]creation of po for on_order, procurement order workflow
78
                    <group col="13" colspan="4">
391.1.10 by chloups208
uf-489 the cancel button is hidden for cancel and done states. cannot generate rfq if no product have been selected
79
                        <field name="state" />
465.1.1 by duy.vo at msf
[IMP] uf-733: Refactored to have better buttons show/hide in Tender
80
                        <field name="internal_state" invisible="True"/>
1775.1.48 by Quentin THEURET
UTP-872 [IMP] At tender cancelation, cancel the RfQs linked to this tender
81
                        <button name="cancel_tender" type="object" string="Cancel" icon="gtk-cancel" attrs="{'invisible':[('state', 'in', ['cancel', 'done'])]}" />
340.5.1 by chloups208
tender improvement
82
                        <button name="button_generate" states="draft" string="Generate RfQs" icon="gtk-convert" />
83
                        <button name="compare_rfqs" states="comparison" string="Compare RfQs" type="object" icon="gtk-find" />
1935 by jf
[IMP] Code cleanup
84
                        <button name="update_supplier_info" states="comparison" string="Update Product's Suppliers" type="object" icon="gtk-edit"
580 by jf
Too much commas
85
                            attrs="{'invisible':['|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison')]}" />
1935 by jf
[IMP] Code cleanup
86
                        <button name="button_done" states="comparison" string="Continue Sourcing Process" icon="gtk-go-forward"
580 by jf
Too much commas
87
                            attrs="{'invisible':['|', '|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison'), ('sale_order_id','=', False)]}" />
1935 by jf
[IMP] Code cleanup
88
                        <button name="create_po" states="comparison" string="Create PO" type="object" icon="gtk-add"
580 by jf
Too much commas
89
                            attrs="{'invisible':['|', '|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison'), ('sale_order_id','!=', False)]}" />
1935 by jf
[IMP] Code cleanup
90
                        <button name="done" string="Closed" type="object" icon="gtk-go-forward"
580 by jf
Too much commas
91
                            attrs="{'invisible':['|', '|', ('internal_state','!=', 'updated'), ('state', '!=', 'comparison'), ('sale_order_id','!=', False)]}" />
254.2.5 by chloups208
[UF-379]creation of po for on_order, procurement order workflow
92
                    </group>
254.2.1 by chloups208
[UF-379] first commit
93
                </form>
94
            </field>
95
        </record>
1935 by jf
[IMP] Code cleanup
96
254.2.1 by chloups208
[UF-379] first commit
97
        <record id="tender_tree" model="ir.ui.view">
98
            <field name="name">tender.tree</field>
99
            <field name="model">tender</field>
100
            <field name="type">tree</field>
101
            <field name="arch" type="xml">
102
                <tree string="Tender">
103
                    <field name="name" />
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
104
                    <field name="priority" />
105
                    <field name="categ" />
106
                    <field name="creation_date" />
107
                    <field name="requested_date" />
254.2.1 by chloups208
[UF-379] first commit
108
                    <field name="sale_order_id" />
109
                    <field name="state" />
110
                </tree>
111
            </field>
112
        </record>
1935 by jf
[IMP] Code cleanup
113
114
        <record id="tender_search_form_view" model="ir.ui.view">
115
            <field name="name">tender.search.form</field>
116
            <field name="model">tender</field>
117
            <field name="type">search</field>
118
            <field name="arch" type="xml">
119
                <search string="Tender">
120
                    <filter name="draft" icon="gtk-file" string="Draft"
580 by jf
Too much commas
121
                            domain="[('state', '=', 'draft')]" />
359.2.3 by chloups208
search view - tree view
122
                    <filter name="comparison" icon="gtk-sort-descending" string="Comparison"
580 by jf
Too much commas
123
                            domain="[('state', '=', 'comparison')]" />
584.11.1 by Quentin THEURET
UF-800 [FIX] Rename 'Done' by 'Closed' on all supply documents
124
                    <filter name="done" icon="gtk-apply" string="Closed"
580 by jf
Too much commas
125
                            domain="[('state', '=', 'done')]" />
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
126
                    <filter name="cancel" icon="gtk-cancel" string="Cancelled"
580 by jf
Too much commas
127
                            domain="[('state', '=', 'cancel')]" />
1935 by jf
[IMP] Code cleanup
128
                    <field name="name" />
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
129
                    <field name="supplier_ids" string="Supplier" widget="many2one" />
130
                    <field name="product_id" string="Product" widget="many2one" />
1935 by jf
[IMP] Code cleanup
131
                    <field name="sale_order_id" string="Sale Order" />
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
132
                    <field name="creator" />
133
                    <field name="creation_date" />
1935 by jf
[IMP] Code cleanup
134
                    <newline />
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
135
                    <group string="Priority" expand="0">
136
                      <filter icon="gtk-dialog-warning" string="Emergency" domain="[('priority','=','emergency')]"/>
137
                      <filter icon="gtk-yes" string="Normal" domain="[('priority','=','normal')]"/>
662 by jf
SO/PO/Tender/RfQ: 'medium' renamed by 'Priority'
138
                      <filter icon="gtk-info" string="Priority" domain="[('priority','=','priority')]"/>
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
139
                    </group>
1935 by jf
[IMP] Code cleanup
140
428.4.6 by Quentin THEURET
UF-657 [IMP] Reworked the Tender and RfQ list views
141
                    <newline />
1935 by jf
[IMP] Code cleanup
142
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
143
                    <group string="Category" expand="0">
144
                      <filter icon="gtk-color-picker" string="Medical" domain="[('categ','=','medical')]"/>
145
                      <filter icon="terp-stock" string="Logistic" domain="[('categ','=','log')]"/>
146
                      <filter icon="terp-purchase" string="Service" domain="[('categ','=','service')]"/>
147
                      <filter icon="gtk-harddisk" string="Other" domain="[('categ','=','other')]"/>
148
                    </group> 
1935 by jf
[IMP] Code cleanup
149
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
150
                    <newline />
1935 by jf
[IMP] Code cleanup
151
1140.1.1 by jf
Removed groups= in xml (except for group_multi_company and group_no_one)
152
                    <group expand="0" string="Group By..." colspan="11" col="11">
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
153
                        <filter string="Priority" icon="terp-project" domain="[]" context="{'group_by': 'priority'}" />
154
                        <separator orientation="vertical" />
155
                        <filter string="Category" icon="terp-translate" domain="[]" context="{'group_by':'categ'}"/>
156
                        <separator orientation="vertical" />
157
                        <filter string="Sale Order" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'sale_order_id'}"/>
158
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
159
                        <separator orientation="vertical" />
160
                        <filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'creation_date'}"/>
161
                        <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'requested_date'}" />
1935 by jf
[IMP] Code cleanup
162
                    </group>
163
                </search>
164
            </field>
1789.6.4 by Quentin THEURET
UTP-101 [IMP] Tender : Add button to delete lines
165
        </record>
166
167
        <record id="tender_line_tree_view" model="ir.ui.view">
168
            <field name="name">tender.line.tree.view</field>
169
            <field name="model">tender.line</field>
170
            <field name="type">tree</field>
171
            <field name="arch" type="xml">
172
                <tree string="Tender Lines" editable="top">
1935 by jf
[IMP] Code cleanup
173
                    <!-- <field name="date_planned" /> -->
1789.6.4 by Quentin THEURET
UTP-101 [IMP] Tender : Add button to delete lines
174
                    <field name="product_id" on_change="on_product_change(product_id, product_uom, qty)" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('purchase_type', '=', parent.categ)]" context="{'available_for_restriction': 'tender', 'search_default_not_restricted': 1}" />
175
                    <field name="comment" />
176
                    <field name="qty" attrs="{'readonly': [('state', '!=', 'draft')]}" 
177
                           on_change="onchange_uom_qty(product_uom, qty)" />
178
                    <field name="product_uom" attrs="{'readonly': [('state', '!=', 'draft')]}" domain="[('uom_by_product', '=', product_id)]"/>
179
                    <field name="supplier_id" />
180
                    <field name="price_unit" />
181
                    <field name="total_price" />
182
                    <field name="currency_id" />
183
                    <field name="purchase_order_id" />
184
                    <field name="purchase_order_line_number" />
185
                    <field name="state" invisible="1" />
186
                </tree>
187
            </field>
188
        </record>
254.2.1 by chloups208
[UF-379] first commit
189
1935 by jf
[IMP] Code cleanup
190
        <record id="tender_action" model="ir.actions.act_window">
191
            <field name="name">Tenders</field>
192
            <field name="res_model">tender</field>
193
            <field name="view_type">form</field>
194
            <field name="view_mode">tree,form</field>
195
            <field name="domain">[]</field>
196
            <field name="search_view_id" ref="tender_search_form_view" />
197
        </record>
198
199
        <menuitem icon="STOCK_INDENT" action="tender_action"
200
            id="menu_tender" parent="purchase.menu_procurement_management" sequence="3" />
201
254.2.3 by chloups208
[UF-379]rfq generation, purchase order workflow modification
202
        <record id="purchase_order_form" model="ir.ui.view">
203
            <field name="name">purchase.order.form</field>
204
            <field name="model">purchase.order</field>
205
            <field name="type">form</field>
280 by jf
[MERGE] UF-403 Threshold value
206
            <field name="priority">300</field>
254.2.3 by chloups208
[UF-379]rfq generation, purchase order workflow modification
207
            <field name="inherit_id" ref="purchase.purchase_order_form" />
208
            <field name="arch" type="xml">
506 by jf
UF-654 [MERGE] Delivery mechanism
209
                <data>
210
                    <field name="details" position="after">
1728.24.7 by Quentin THEURET
UTP-674 [IMP] Add a delivery address on tender and RfQ
211
                        <newline />
212
                        <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'])]}" />
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
213
                        <field name="tender_id" attrs="{'invisible': [('rfq_ok', '=', False)],'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'approved', 'except_picking', 'except_invoice'])]}" />
506 by jf
UF-654 [MERGE] Delivery mechanism
214
                        <field name="rfq_ok" invisible="1" />
1728.24.7 by Quentin THEURET
UTP-674 [IMP] Add a delivery address on tender and RfQ
215
                        <field
1935 by jf
[IMP] Code cleanup
216
                            name="rfq_delivery_address"
1728.24.7 by Quentin THEURET
UTP-674 [IMP] Add a delivery address on tender and RfQ
217
                            colspan="4"
218
                            domain="[('dest_address', '=', company_id)]"
219
                            attrs="{'invisible': [('rfq_ok', '=', False)], 'readonly': ['|', ('tender_id', '!=', False), ('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'approved', 'except_picking', 'except_invoice'])]}" />
506 by jf
UF-654 [MERGE] Delivery mechanism
220
                    </field>
1532.5.1 by Quentin THEURET
UTP-292 [IMP] The Delivery
221
222
                    <xpath expr="/form/notebook//page[@string='Delivery &amp; Invoicing']" position="attributes">
223
                        <attribute name="attrs">{'invisible': [('rfq_ok', '=', True)]}</attribute>
224
                    </xpath>
225
226
                    <xpath expr="/form/notebook//page[@string='Invoices']" position="attributes">
227
                        <attribute name="attrs">{'invisible': [('rfq_ok', '=', True)]}</attribute>
228
                    </xpath>
1935 by jf
[IMP] Code cleanup
229
820.1.2 by chloups208
uf-921 Purchase Order Lines becomes Lines
230
                    <xpath expr="/form/notebook/page/field[@name='order_line']/tree" position="attributes">
1935 by jf
[IMP] Code cleanup
231
                        <attribute name="string">Lines</attribute>
820.1.2 by chloups208
uf-921 Purchase Order Lines becomes Lines
232
                    </xpath>
395.3.1 by Quentin THEURET
UF-492 [IMP] Reworking the PO form view to move buttons to the up line
233
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
234
                    <xpath expr="/form//field[@name='date_order']" position="attributes">
1381.4.4 by Quentin THEURET
UF-1679 [FIX]
235
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
236
                    </xpath>
237
                    <xpath expr="/form//field[@name='warehouse_id']" position="attributes">
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
238
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
239
                    </xpath>
240
                    <xpath expr="/form//field[@name='order_type']" position="attributes">
1381.4.4 by Quentin THEURET
UF-1679 [FIX]
241
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
242
                    </xpath>
243
                    <xpath expr="/form//field[@name='priority']" position="attributes">
1381.4.3 by Quentin THEURET
UF-1679 [FIX]
244
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
245
                    </xpath>
246
                    <xpath expr="/form//field[@name='categ']" position="attributes">
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
247
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
248
                    </xpath>
249
                    <xpath expr="/form//field[@name='invoiced']" position="attributes">
250
                        <attribute name="readonly">True</attribute>
251
                    </xpath>
252
                    <xpath expr="/form//field[@name='shipped']" position="attributes">
253
                        <attribute name="readonly">True</attribute>
254
                    </xpath>
255
                    <xpath expr="/form/notebook//field[@name='partner_id']" position="attributes">
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
256
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])],}</attribute>
1110 by jf
UF-1189 [IMP] Block the sourcing of a FO from an internal/inter-section/inter-mission partners (due to synch engine)
257
                        <attribute name="domain">[('check_partner_rfq', '=', tender_id)]</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
258
                    </xpath>
259
                    <xpath expr="/form/notebook//field[@name='partner_address_id']" position="attributes">
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
260
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
261
                    </xpath>
262
                    <xpath expr="/form/notebook//field[@name='pricelist_id']" position="attributes">
1935 by jf
[IMP] Code cleanup
263
                        <attribute name="string">Currency</attribute>
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
264
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
265
                    </xpath>
266
                    <xpath expr="/form/notebook//field[@name='origin']" position="attributes">
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
267
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_sent', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
431.7.5 by Quentin THEURET
UF-629 [IMP] Made fields readonly according to specifications in tender/rfq/purchase order
268
                    </xpath>
540 by jf
Order on view + fields duplication
269
                    <xpath expr="/form//field[@name='fiscal_position']" position="attributes">
1342.5.2 by matthieu.choplin at msf
[uf-1635] add several fields redonly for the state sourced and split of the PO
270
                        <attribute name="attrs">{'readonly': [('state', 'in', ['sourced', 'split', 'rfq_updated', 'done', 'cancel', 'confirmed', 'confirmed_wait', 'approved', 'except_picking', 'except_invoice'])]}</attribute>
540 by jf
Order on view + fields duplication
271
                    </xpath>
535 by jf
[FIX] PO: other fields
272
                </data>
254.2.3 by chloups208
[UF-379]rfq generation, purchase order workflow modification
273
            </field>
535 by jf
[FIX] PO: other fields
274
        </record>
275
1935 by jf
[IMP] Code cleanup
276
819 by jf
UF-868 [FIX] Request for quotation name vs Purchase order
277
       <record id="product_supplierinfo_form_view" model="ir.ui.view">
359.2.2 by chloups208
uf-489-tender improvement-price lists-tender screen form and tree
278
            <field name="name">product.supplierinfo.form.view</field>
279
            <field name="model">product.supplierinfo</field>
280
            <field name="type">form</field>
459.5.21 by Quentin THEURET
UF-637 [IMP] Fix inherited views
281
            <field name="inherit_id" ref="supplier_catalogue.product_supplierinfo_form_view" />
282
            <field name="arch" type="xml">
1935 by jf
[IMP] Code cleanup
283
                <data>
284
285
                    <xpath expr="//field[@name='pricelist_ids']" position="attributes">
286
                        <attribute name="context">{'partner_id': name}</attribute>
287
                    </xpath>
288
289
                    <xpath expr="//tree[@string='Pricelist']/field[@name='rounding']" position="after">
290
                        <field name="partner_id" />
291
                        <field name="currency_id" domain="[('partner_currency', '=', partner_id)]" />
292
                    </xpath>
293
294
                    <xpath expr="//tree[@string='Pricelist']/field[@name='valid_from']" position="after">
295
                        <field name="valid_till" />
296
                        <field name="comment" />
297
                        <field name="purchase_order_id" />
298
                        <field name="purchase_order_line_number" />
299
                        <field name="purchase_order_line_id" />
300
                    </xpath>
459.5.21 by Quentin THEURET
UF-637 [IMP] Fix inherited views
301
                 </data>
302
            </field>
303
        </record>
1935 by jf
[IMP] Code cleanup
304
459.5.21 by Quentin THEURET
UF-637 [IMP] Fix inherited views
305
        <record id="product_supplierinfo_form_view2" model="ir.ui.view">
306
            <field name="name">product.supplierinfo.form.view</field>
307
            <field name="model">product.supplierinfo</field>
308
            <field name="type">form</field>
359.2.2 by chloups208
uf-489-tender improvement-price lists-tender screen form and tree
309
            <field name="inherit_id" ref="product.product_supplierinfo_form_view" />
310
            <field name="arch" type="xml">
1935 by jf
[IMP] Code cleanup
311
                <data>
312
                    <!-- Modificaiton of lines -->
313
                    <xpath expr="//form/field[@name='price']" position="after">
314
                        <field name="partner_id" />
315
                        <field name="currency_id" domain="[('partner_currency', '=', partner_id)]" />
316
                        <field name="valid_till" />
317
                        <field name="purchase_order_id" />
318
                        <field name="purchase_order_line_number" />
319
                        <field name="purchase_order_line_id" />
320
                    </xpath>
321
322
                </data>
359.2.2 by chloups208
uf-489-tender improvement-price lists-tender screen form and tree
323
            </field>
324
        </record>
1935 by jf
[IMP] Code cleanup
325
359.2.3 by chloups208
search view - tree view
326
        <record id="view_rfq_filter" model="ir.ui.view">
327
            <field name="name">purchase.order.rfq.list.select</field>
328
            <field name="model">purchase.order</field>
329
            <field name="type">search</field>
330
            <field name="arch" type="xml">
331
                <search string="Search Purchase Order">
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
332
                  <group col='10' colspan='4'>
333
                    <filter icon="terp-document-new" name="draft_rfq" string="Draft" domain="[('state','=','draft')]" separator="1" help="Requests for Quotation which are in draft state"/>
359.2.3 by chloups208
search view - tree view
334
                    <filter icon="gtk-apply" name="sent" string="Sent" domain="[('state','=','rfq_sent')]" separator="1" />
428.4.12 by Quentin THEURET
UF-657 [FIX] Renamed some fields in list/search view and moved some menu entries
335
                    <filter icon="terp-camera_test" name="updated" string="Updated" domain="[('state','=','rfq_updated')]" separator="1" />
584.11.1 by Quentin THEURET
UF-800 [FIX] Rename 'Done' by 'Closed' on all supply documents
336
                    <filter icon="gtk-yes" name="done" string="Closed" domain="[('state','=','done')]" separator="1" />
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
337
                    <filter icon="gtk-cancel" name="cancelled" string="Cancelled" domain="[('state','=','cancel')]" separator="1" />
338
                    <field name="partner_id" select="1" string="Supplier" />
339
                    <field name="product_id" select="1" />
340
                    <field name="origin" />
359.2.3 by chloups208
search view - tree view
341
                    <field name="create_uid" select="1"/>
428.4.12 by Quentin THEURET
UF-657 [FIX] Renamed some fields in list/search view and moved some menu entries
342
                    <field name="date_order" string="Creation date"/>
359.2.3 by chloups208
search view - tree view
343
                    <newline />
344
                    <group string="Type" expand="0">
1935 by jf
[IMP] Code cleanup
345
                            <filter icon="terp-check" string="Regular" domain="[('order_type','=','regular')]" />
346
                            <filter icon="terp-stage" string="Donation before expiry" domain="[('order_type','=','donation_exp')]" />
347
                            <filter icon="terp-gtk-jump-to-ltr" string="Standard Donation" domain="[('order_type','=','donation_st')]" />
348
                            <filter icon="terp-partner" string="Loan" domain="[('order_type','=','loan')]" />
349
                            <filter icon="terp-gtk-jump-to-rtl" string="In-Kind donation" domain="[('order_type','=','in_kind')]" />
350
                            <filter icon="terp-purchase" string="Purchase List" domain="[('order_type','=','purchase_list')]" />
351
                            <filter icon="terp-crm" string="Direct PO" domain="[('order_type','=','direct')]" />
352
                        </group>
353
                        <newline />
354
                        <group string="Priority" expand="0">
359.2.3 by chloups208
search view - tree view
355
                            <filter icon="gtk-dialog-warning" string="Emergency" domain="[('priority','=','emergency')]"/>
356
                            <filter icon="gtk-yes" string="Normal" domain="[('priority','=','normal')]"/>
662 by jf
SO/PO/Tender/RfQ: 'medium' renamed by 'Priority'
357
                            <filter icon="gtk-info" string="Priority" domain="[('priority','=','priority')]"/>
1935 by jf
[IMP] Code cleanup
358
                        </group>
359
                        <newline />
360
                        <group string="Category" expand="0">
359.2.3 by chloups208
search view - tree view
361
                            <filter icon="gtk-color-picker" string="Medical" domain="[('categ','=','medical')]"/>
362
                            <filter icon="terp-stock" string="Logistic" domain="[('categ','=','log')]"/>
363
                            <filter icon="terp-purchase" string="Service" domain="[('categ','=','service')]"/>
1935 by jf
[IMP] Code cleanup
364
                            <filter icon="gtk-harddisk" string="Other" domain="[('categ','=','other')]"/>
365
                        </group>
359.2.3 by chloups208
search view - tree view
366
                        <newline />
367
                </group>
368
                <newline/>
1140.1.1 by jf
Removed groups= in xml (except for group_multi_company and group_no_one)
369
                <group expand="0" string="Group By..." colspan="4" col="10">
359.2.3 by chloups208
search view - tree view
370
                  <filter string="Order Type" icon="terp-rating-rated" domain="[]" context="{'group_by':'order_type'}"/>
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
371
                  <separator orientation="vertical"/>
372
                  <filter string="Priority" icon="terp-project" domain="[]" context="{'group_by':'priority'}"/>
373
                  <separator orientation="vertical"/>
374
                  <filter string="Category" icon="terp-translate" domain="[]" context="{'group_by':'categ'}"/>
375
                  <separator orientation="vertical"/>
376
                  <filter string="Supplier" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
377
                  <separator orientation="vertical"/>
378
                  <filter string="Origin" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'origin'}"/>
379
                  <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
380
                  <separator orientation="vertical"/>
428.4.12 by Quentin THEURET
UF-657 [FIX] Renamed some fields in list/search view and moved some menu entries
381
                  <filter string="Creation Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_order'}"/>
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
382
                  <filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'delivery_requested_date'}"/>
359.2.3 by chloups208
search view - tree view
383
                </group>
384
              </search>
385
            </field>
386
        </record>
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
387
388
        <record id="view_rfq_tree" model="ir.ui.view">
389
            <field name="name">view.rfq.tree</field>
390
            <field name="model">purchase.order</field>
391
            <field name="type">tree</field>
392
            <field name="priority" eval="300" />
393
            <field name="arch" type="xml">
394
                <tree string="Requests for Quotation">
395
                    <field name="name" />
396
                    <field name="order_type" />
397
                    <field name="priority" />
398
                    <field name="categ" />
428.4.12 by Quentin THEURET
UF-657 [FIX] Renamed some fields in list/search view and moved some menu entries
399
                    <field name="date_order" string="Creation date"/>
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
400
                    <field name="partner_id" />
401
                    <field name="delivery_requested_date" />
402
                    <field name="origin" />
403
                    <field name="amount_total" sum="Total amount" />
404
                    <field name="state" />
405
                </tree>
406
            </field>
407
        </record>
1935 by jf
[IMP] Code cleanup
408
359.2.3 by chloups208
search view - tree view
409
        <record id="purchase.purchase_rfq" model="ir.actions.act_window">
410
            <field name="name">Requests for Quotation</field>
411
            <field name="type">ir.actions.act_window</field>
412
            <field name="res_model">purchase.order</field>
413
            <field name="view_type">form</field>
892.3.1 by Quentin THEURET
UF-1151 [IMP] Purchase order & RfQ : Rework right links bar
414
            <field name="context">{'rfq_ok': True, 'search_default_draft_rfq': 1, 'request_for_quotation': True}</field>
580 by jf
Too much commas
415
            <field name="domain">[('rfq_ok', '=', True)]</field>
359.2.3 by chloups208
search view - tree view
416
            <field name="view_mode">tree,form,graph,calendar</field>
417
            <field name="search_view_id" ref="view_rfq_filter"/>
418
            <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>
419
        </record>
428.4.1 by Quentin THEURET
UF-657 [IMP] Reworked the Purchase menu and all Purchase search/tree views
420
421
        <record id="purchase_rfq_tree_view_action" model="ir.actions.act_window.view">
422
            <field name="act_window_id" ref="purchase.purchase_rfq" />
423
            <field name="sequence">1</field>
424
            <field name="view_mode">tree</field>
425
            <field name="view_id" ref="view_rfq_tree" />
426
        </record>
1935 by jf
[IMP] Code cleanup
427
359.2.10 by chloups208
620:already integrated. 611:small change in sourcing tool and so follow up. 610:attrs in view and _constraints function. 597:the final state is done, no more rfq_done, so follow up modified, filters, po_workflow
428
        <record id="purchase.purchase_form_action" model="ir.actions.act_window">
429
            <field name="name">Purchase Orders</field>
430
            <field name="type">ir.actions.act_window</field>
431
            <field name="res_model">purchase.order</field>
432
            <field name="view_mode">tree,form,graph,calendar</field>
892.3.1 by Quentin THEURET
UF-1151 [IMP] Purchase order & RfQ : Rework right links bar
433
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid, 'purchase_order': True}</field>
580 by jf
Too much commas
434
            <field name="domain">[('rfq_ok', '=', False)]</field>
359.2.10 by chloups208
620:already integrated. 611:small change in sourcing tool and so follow up. 610:attrs in view and _constraints function. 597:the final state is done, no more rfq_done, so follow up modified, filters, po_workflow
435
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
436
            <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>
437
        </record>
1935 by jf
[IMP] Code cleanup
438
892.3.2 by Quentin THEURET
UF-1151 [IMP] Tender : Add a link to related RfQ and PO
439
        <record id="act_relate_tender_rfq" model="ir.actions.act_window">
1935 by jf
[IMP] Code cleanup
440
            <field name="name">Requests for Quotation</field>
892.3.2 by Quentin THEURET
UF-1151 [IMP] Tender : Add a link to related RfQ and PO
441
            <field name="type">ir.actions.act_window</field>
442
            <field name="res_model">purchase.order</field>
443
            <field name="src_model">tender</field>
444
            <field name="key2">client_action_relate</field>
445
            <field name="view_type">form</field>
446
            <field name="context">{'rfq_ok': True, 'search_default_draft_rfq': 1, 'request_for_quotation': True}</field>
447
            <field name="domain">[('rfq_ok', '=', True), ('tender_id', '=', active_id)]</field>
448
            <field name="view_mode">tree,form,graph,calendar</field>
449
            <field name="search_view_id" ref="view_rfq_filter"/>
450
        </record>
892.3.12 by Quentin THEURET
UF-1151 [IMP] Tender : add ir.values to add right links
451
        <record model="ir.values" id="relate_tender_rfq_values">
452
            <field name="object" eval="1" />
453
            <field name="name">Requests for Quotations</field>
454
            <field name="key2">client_action_relate</field>
455
            <field name="value" eval="'ir.actions.act_window,' + str(ref('act_relate_tender_rfq'))" />
456
            <field name="key">action</field>
457
            <field name="model">tender</field>
458
        </record>
1935 by jf
[IMP] Code cleanup
459
892.3.2 by Quentin THEURET
UF-1151 [IMP] Tender : Add a link to related RfQ and PO
460
        <record id="act_relate_tender_purchase_order" model="ir.actions.act_window">
461
            <field name="name">Purchase Orders</field>
462
            <field name="type">ir.actions.act_window</field>
463
            <field name="res_model">purchase.order</field>
464
            <field name="src_model">tender</field>
465
            <field name="key2">client_action_relate</field>
466
            <field name="view_mode">tree,form,graph,calendar</field>
467
            <field name="context">{'search_default_approved': 1,'search_default_create_uid':uid, 'purchase_order': True}</field>
1595.12.1 by matthieu.choplin at msf
[FIX] utp-365: we update the tender_id so that it can be accessible through the right panel
468
            <field name="domain">[('rfq_ok', '=', False), ('origin_tender_id', '=', active_id)]</field>
892.3.2 by Quentin THEURET
UF-1151 [IMP] Tender : Add a link to related RfQ and PO
469
            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
470
        </record>
892.3.12 by Quentin THEURET
UF-1151 [IMP] Tender : add ir.values to add right links
471
        <record model="ir.values" id="relate_tender_purchase_order_values">
472
            <field name="object" eval="1" />
473
            <field name="name">Purchase Orders</field>
474
            <field name="key2">client_action_relate</field>
475
            <field name="value" eval="'ir.actions.act_window,' + str(ref('act_relate_tender_purchase_order'))" />
476
            <field name="key">action</field>
477
            <field name="model">tender</field>
478
        </record>
254.2.1 by chloups208
[UF-379] first commit
479
1775.1.46 by Quentin THEURET
UTP-872 [IMP] Tender line : At tender line cancelation, ask user if he wants to re-source the needs
480
        <record id="tender_line_cancel_wizard_form_view" model="ir.ui.view">
481
            <field name="name">tender.line.cancel.wizard.form.view</field>
482
            <field name="model">tender.line.cancel.wizard</field>
483
            <field name="type">form</field>
484
            <field name="arch" type="xml">
485
                <form string="Tender line cancelation">
486
                    <group colspan="4" col="1">
487
                        <html>
488
                            <h4 style="text-align: center; margin: 10px">Would you re-source the needs sourced by this tender line ?</h4>
489
                        </html>
490
                    </group>
491
                    <newline />
492
                    <separator string="Actions" colspan="4" />
493
                    <button name="just_cancel" string="No" type="object" icon="gtk-execute" colspan="2" />
494
                    <button name="cancel_and_resource" string="Yes" type="object" icon="gtk-execute" colspan="2" />
495
                </form>
496
            </field>
497
        </record>
498
1775.1.47 by Quentin THEURET
UTP-872 [IMP] Tender line resourcing : Re-source FO line and ask user to cancel the tender when all lines are canceled
499
        <record id="ask_tender_cancel_wizard_form_view" model="ir.ui.view">
500
            <field name="name">ask.tender.cancel.wizard.form.view</field>
501
            <field name="model">tender.cancel.wizard</field>
502
            <field name="type">form</field>
503
            <field name="priority" eval="99" />
504
            <field name="arch" type="xml">
505
                <form string="Tender cancelation">
506
                    <group colspan="4" col="1">
507
                        <html>
508
                            <h4 style="text-align: center; margin: 10px">All lines of this tender have been canceled. Would you also cancel this tender ?</h4>
509
                        </html>
510
                    </group>
511
                    <newline />
512
                    <separator string="Actions" colspan="4" />
513
                    <button name="close_window" string="No" type="object" icon="gtk-execute" colspan="2" />
514
                    <button name="just_cancel" string="Yes" type="object" icon="gtk-execute" colspan="2" />
515
                </form>
516
            </field>
517
        </record>
518
519
        <record id="tender_cancel_wizard_form_view" model="ir.ui.view">
520
            <field name="name">tender.cancel.wizard.form.view</field>
521
            <field name="model">tender.cancel.wizard</field>
522
            <field name="type">form</field>
523
            <field name="arch" type="xml">
524
                <form string="Tender cancelation">
1775.1.48 by Quentin THEURET
UTP-872 [IMP] At tender cancelation, cancel the RfQs linked to this tender
525
                    <field name="not_draft" invisible="1" />
526
                    <group colspan="4" col="1" attrs="{'invisible': [('not_draft', '=', False)]}">
527
                        <html>
528
                            <h4 style="text-align: center; margin: 10px">Some Requests for Quotation have been generated by this tender. All these RfQs will be canceled if you cancel the tender.</h4>
529
                        </html>
530
                    </group>
1775.1.47 by Quentin THEURET
UTP-872 [IMP] Tender line resourcing : Re-source FO line and ask user to cancel the tender when all lines are canceled
531
                    <group colspan="4" col="1">
532
                        <html>
1775.1.48 by Quentin THEURET
UTP-872 [IMP] At tender cancelation, cancel the RfQs linked to this tender
533
                            <h4 style="text-align: center; margin: 10px">If you click on 'Cancel &amp; Resource' button, all Field Order lines or Internal Request lines attached to this tender will be re-sourced.</h4>
1775.1.47 by Quentin THEURET
UTP-872 [IMP] Tender line resourcing : Re-source FO line and ask user to cancel the tender when all lines are canceled
534
                        </html>
535
                    </group>
536
                    <newline />
537
                    <separator string="Actions" />
538
                    <button name="just_cancel" string="Cancel only" type="object" icon="gtk-cancel" colspan="2" />
539
                    <button name="cancel_and_resource" string="Cancel &amp; Resource" type="object" icon="gtk-cancel" colspan="2" />
540
                </form>
541
            </field>
542
        </record>
543
1935 by jf
[IMP] Code cleanup
544
    </data>
254.2.1 by chloups208
[UF-379] first commit
545
</openerp>