9
by Omar (pexego)
[ADD] Traceability modules ported to 6.1 |
1 |
<?xml version="1.0" ?>
|
2 |
<openerp>
|
|
3 |
<data>
|
|
4 |
||
5 |
# |
|
6 |
# Returns Orders |
|
7 |
# |
|
8 |
||
9 |
<record id="view_picking_returns_tree" model="ir.ui.view"> |
|
10 |
<field name="name">stock.picking.returns.tree</field> |
|
11 |
<field name="model">stock.picking</field> |
|
12 |
<field name="type">tree</field> |
|
13 |
<field name="priority" eval="50"/> |
|
14 |
<field name="arch" type="xml"> |
|
15 |
<tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date < current_date" string="Returns list"> |
|
16 |
<field name="name"/> |
|
17 |
<field name="partner_id" /> |
|
18 |
<field name="backorder_id" groups="base.group_extended"/> |
|
19 |
<field name="origin"/> |
|
20 |
<field name="date"/> |
|
21 |
<field name="min_date"/> |
|
22 |
<field name="invoice_state"/> |
|
23 |
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/> |
|
24 |
<field name="state"/> |
|
25 |
<button name="action_process" states="confirmed,assigned" groups="stock.group_stock_user" string="Process" type="object" icon="gtk-go-forward"/> |
|
26 |
<button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" confirm="This operation will cancel the shipment. Do you want to continue?" /> |
|
27 |
</tree>
|
|
28 |
</field>
|
|
29 |
</record>
|
|
30 |
||
31 |
<record id="view_picking_returns_form" model="ir.ui.view"> |
|
32 |
<field name="name">stock.picking.returns.form</field> |
|
33 |
<field name="model">stock.picking</field> |
|
34 |
<field name="type">form</field> |
|
35 |
<field name="priority" eval="50"/> |
|
36 |
<field name="arch" type="xml"> |
|
37 |
<form string="Returns list"> |
|
38 |
<group colspan="4" col="6"> |
|
39 |
<group colspan="4" col="4"> |
|
40 |
<field name="name" readonly="1"/> |
|
41 |
<field name="origin"/> |
|
42 |
<field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/> |
|
43 |
<field name="invoice_state" string="Invoice Control"/> |
|
44 |
<field name="backorder_id" readonly="1" groups="base.group_extended"/> |
|
45 |
</group>
|
|
46 |
<group colspan="2" col="2"> |
|
47 |
<field name="date"/> |
|
48 |
<field name="min_date" readonly="1"/> |
|
49 |
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/> |
|
50 |
</group>
|
|
51 |
</group>
|
|
52 |
<notebook colspan="4"> |
|
53 |
<page string="General Information"> |
|
54 |
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_return_id': address_id, 'customer_address_id': address_id}" > |
|
55 |
<tree colors="grey:scrapped==True" string="Stock Moves"> |
|
56 |
<field name="product_id" /> |
|
57 |
<field name="product_qty" /> |
|
58 |
<field name="product_uom" string="UoM" /> |
|
59 |
<button name="%(stock.move_scrap)d" |
|
60 |
string="Scrap Products" type="action" |
|
61 |
icon="gtk-convert" context="{'scrap': True}" |
|
62 |
states="draft,waiting,confirmed,assigned" |
|
63 |
groups="base.group_extended"/> |
|
64 |
<field name="scrapped" invisible="1"/> |
|
65 |
<field name="prodlot_id" groups="base.group_extended"/> |
|
66 |
<button
|
|
67 |
name="%(stock.track_line)d" |
|
68 |
string="Split in production lots" |
|
69 |
groups="base.group_extended" |
|
70 |
type="action" icon="terp-stock_effects-object-colorize" |
|
71 |
states="draft,waiting,confirmed,assigned" /> |
|
72 |
<field name="tracking_id" groups="base.group_extended"/> |
|
73 |
<button name="setlast_tracking" string="Put in current pack" type="object" |
|
74 |
groups="base.group_extended" |
|
75 |
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','<>',False)]}" |
|
76 |
states="draft,assigned,confirmed"/> |
|
77 |
<button name="%(stock.split_into)d" string="Put in a new pack" type="action" |
|
78 |
groups="base.group_extended" |
|
79 |
icon="terp-stock_effects-object-colorize" |
|
80 |
states="draft,assigned,confirmed"/> |
|
81 |
<field name="location_dest_id"/> |
|
82 |
<field name="state"/> |
|
83 |
</tree>
|
|
84 |
<form string="Stock Moves"> |
|
85 |
<group colspan="2" col="4"> |
|
86 |
<separator colspan="4" string="Move Information"/> |
|
87 |
<field name="name" invisible="1" colspan="4"/> |
|
88 |
<field colspan="4" name="product_id" context="{'location': location_id}" on_change="onchange_product_id(product_id,location_id,location_dest_id,address_id,product_qty,prodlot_id)"/> |
|
89 |
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="3"/> |
|
90 |
<button name="%(stock.move_scrap)d" |
|
91 |
string="Scrap" type="action" groups="base.group_extended" |
|
92 |
icon="gtk-convert" context="{'scrap': True}" |
|
93 |
states="draft,waiting,confirmed,assigned" colspan="1"/> |
|
94 |
<field name="product_uom" string="Unit Of Measure" colspan="4"/> |
|
95 |
<field name="product_uos_qty" groups="product.group_uos" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" colspan="4"/> |
|
96 |
<field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4"/> |
|
97 |
<field groups="base.group_extended" name="product_packaging" domain="[('product_id','=',product_id)]" colspan="4"/> |
|
98 |
</group>
|
|
99 |
||
100 |
<group colspan="2" col="2"> |
|
101 |
<separator string="Locations" colspan="2" /> |
|
102 |
<field name="location_id" on_change="onchange_location_id(product_id,location_id,prodlot_id,product_qty,product_uom)" domain="[('usage','=','customer')]"/> |
|
103 |
<field name="location_dest_id" domain="[('usage','<>','view')]"/> |
|
104 |
</group>
|
|
105 |
||
106 |
<group colspan="2" col="2"> |
|
107 |
<separator string="Dates" colspan="2" /> |
|
108 |
<field name="create_date" invisible="1"/> |
|
109 |
<field name="date"/> |
|
110 |
<field name="date_expected"/> |
|
111 |
</group>
|
|
112 |
||
113 |
<group colspan="2" col="4" groups="base.group_extended"> |
|
114 |
<separator string="Traceability" colspan="4" groups="base.group_extended"/> |
|
115 |
<field name="tracking_id" groups="base.group_extended" colspan="3" /> |
|
116 |
<button name="%(stock.split_into)d" string="New pack" type="action" |
|
117 |
groups="base.group_extended" |
|
118 |
icon="terp-stock_effects-object-colorize" |
|
119 |
states="draft,assigned,confirmed" colspan="1"/> |
|
120 |
<field name="prodlot_id" groups="base.group_extended" |
|
121 |
context="{'location_id':location_id, 'product_id':product_id}" |
|
122 |
domain="[('product_id','=?',product_id)]" |
|
123 |
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"/> |
|
124 |
<button name="%(stock.track_line)d" |
|
125 |
groups="base.group_extended" |
|
126 |
states="draft,waiting,confirmed,assigned" |
|
127 |
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1" /> |
|
128 |
</group>
|
|
129 |
<label string="" colspan="4"/> |
|
130 |
<field name="state"/> |
|
131 |
<group col="4" colspan="2"> |
|
132 |
<button name="action_cancel" states="assigned" string="_Cancel" type="object" icon="gtk-cancel"/> |
|
133 |
<button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/> |
|
134 |
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/> |
|
135 |
<button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/> |
|
136 |
</group>
|
|
137 |
</form>
|
|
138 |
</field>
|
|
139 |
<group col="10" colspan="4"> |
|
140 |
<field name="state" readonly="1"/> |
|
141 |
<button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/> |
|
142 |
<button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/> |
|
143 |
<button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/> |
|
144 |
<button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/> |
|
145 |
<button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_extended" icon="gtk-jump-to"/> |
|
146 |
<button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/> |
|
147 |
<group colspan="1" states="done"> |
|
148 |
<button name="%(stock.act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/> |
|
149 |
</group>
|
|
150 |
<button states="done" name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl" /> |
|
151 |
</group>
|
|
152 |
</page>
|
|
153 |
<page string="Additional Info" groups="base.group_extended,base.group_multi_company"> |
|
154 |
<field name="type" groups="base.group_extended"/> |
|
155 |
<field name="company_id" groups="base.group_multi_company" widget="selection"/> |
|
156 |
</page>
|
|
157 |
<page string="Notes"> |
|
158 |
<field colspan="4" name="note" nolabel="1"/> |
|
159 |
</page>
|
|
160 |
</notebook>
|
|
161 |
</form>
|
|
162 |
</field>
|
|
163 |
</record>
|
|
164 |
||
165 |
<record id="view_picking_returns_search" model="ir.ui.view"> |
|
166 |
<field name="name">stock.picking.returns.search</field> |
|
167 |
<field name="model">stock.picking</field> |
|
168 |
<field name="type">search</field> |
|
169 |
<field name="arch" type="xml"> |
|
170 |
<search string="Returns list"> |
|
171 |
<group col="8" colspan="4"> |
|
172 |
<filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Returns Available" /> |
|
173 |
<filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Returns already processed"/> |
|
174 |
<separator orientation="vertical" /> |
|
175 |
<filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" groups="base.group_extended"/> |
|
176 |
<separator orientation="vertical"/> |
|
177 |
<field name="name"/> |
|
178 |
<field name="partner_id"/> |
|
179 |
<field name="origin"/> |
|
180 |
<field name="stock_journal_id" groups="base.group_extended" widget="selection"/> |
|
181 |
<field name="company_id" widget="selection" groups="base.group_multi_company" /> |
|
182 |
</group>
|
|
183 |
<newline/>
|
|
184 |
<group expand="0" string="Extended Filters..." colspan="4" col="8"> |
|
185 |
<filter string="To invoice" name="to_invoice" icon="terp-dolar" domain="[('invoice_state', '=', '2binvoiced')]" /> |
|
186 |
</group>
|
|
187 |
<newline/>
|
|
188 |
<group expand="0" string="Group By..." colspan="4" col="8"> |
|
189 |
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> |
|
190 |
<separator orientation="vertical" /> |
|
191 |
<filter icon="terp-stock_effects-object-colorize" name="state" string="State" domain="[]" context="{'group_by':'state'}"/> |
|
192 |
<separator orientation="vertical" /> |
|
193 |
<filter string="Order Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/> |
|
194 |
<filter string="Expected Date" icon="terp-go-month" domain="[]" context="{'group_by':'min_date'}"/> |
|
195 |
<separator orientation="vertical" /> |
|
196 |
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}" groups="base.group_extended"/> |
|
197 |
</group>
|
|
198 |
</search>
|
|
199 |
</field>
|
|
200 |
</record>
|
|
201 |
||
202 |
<record id="action_picking_return_tree" model="ir.actions.act_window"> |
|
203 |
<field name="name">Returning Products</field> |
|
204 |
<field name="res_model">stock.picking</field> |
|
205 |
<field name="type">ir.actions.act_window</field> |
|
206 |
<field name="view_type">form</field> |
|
207 |
<field name="view_mode">tree,form,calendar</field> |
|
208 |
<field name="domain">[('type','=','return')]</field> |
|
209 |
</record>
|
|
210 |
<record id="action_picking_return_tree_return_view1_waiting" model="ir.actions.act_window.view"> |
|
211 |
<field eval="1" name="sequence"/> |
|
212 |
<field name="view_mode">tree</field> |
|
213 |
<field name="view_id" ref="view_picking_returns_tree"/> |
|
214 |
<field name="act_window_id" ref="action_picking_return_tree"/> |
|
215 |
</record>
|
|
216 |
<record id="action_picking_return_tree_out_view2_waiting" model="ir.actions.act_window.view"> |
|
217 |
<field eval="2" name="sequence"/> |
|
218 |
<field name="view_mode">form</field> |
|
219 |
<field name="view_id" ref="view_picking_returns_form"/> |
|
220 |
<field name="act_window_id" ref="action_picking_return_tree"/> |
|
221 |
</record>
|
|
222 |
<record id="action_picking_return_tree_out_view2_waiting_cal" model="ir.actions.act_window.view"> |
|
223 |
<field eval="3" name="sequence"/> |
|
224 |
<field name="view_mode">calendar</field> |
|
225 |
<field name="act_window_id" ref="action_picking_return_tree"/> |
|
226 |
</record>
|
|
227 |
<menuitem action="action_picking_return_tree" id="menu_action_return_picking_tree" parent="stock.menu_stock_warehouse_mgmt" sequence="25"/> |
|
228 |
||
229 |
</data>
|
|
230 |
</openerp>
|