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

« back to all changes in this revision

Viewing changes to msf_outgoing/msf_outgoing_view.xml

  • Committer: Quentin THEURET
  • Date: 2011-11-30 13:31:37 UTC
  • mto: This revision was merged to the branch mainline in revision 515.
  • Revision ID: qt@tempo-consulting.fr-20111130133137-mdf2fp6hkqmwbppn
UF-647 [ADD] Added a line in Purchase Order to have information about international transport costs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8"?>
2
2
<openerp>
3
 
        <data>
4
 
 
5
 
                <menuitem name="Deliveries" id="menu_warehouse_deliveries" parent="stock.menu_stock_warehouse_mgmt" sequence="3"/>
6
 
                <menuitem id="menu_report_config" name="Report Customization" parent="stock.menu_stock_configuration" sequence="1"/>
7
 
                # -------------------------------------------------------------
8
 
                # Labels
9
 
                # -------------------------------------------------------------
10
 
                <record id="view_labels_tree" model="ir.ui.view">
11
 
                        <field name="name">stock.labels.tree</field>
12
 
                        <field name="model">ppl.customize.label</field>
13
 
                        <field name="type">tree</field>
14
 
                        <field name="arch" type="xml">
15
 
                                <tree string="Labels Customization">
16
 
                                        <field name="name"/>
17
 
                                        <field name="logo" />
18
 
                                        <field name="requestor_order_reference" />
19
 
                                        <field name="packing_parcel_number" />
20
 
                                        <field name="pre_packing_list_reference" />
21
 
                                        <field name="destination_partner" />
22
 
                                        <field name="destination_address" />
23
 
                                        <field name="weight" />
24
 
                                        <field name="specific_information" />
25
 
                                </tree>
26
 
                        </field>
27
 
                </record>
28
 
                <record id="view_labels_form" model="ir.ui.view">
29
 
                        <field name="name">stock.labels.form</field>
30
 
                        <field name="model">ppl.customize.label</field>
31
 
                        <field name="type">form</field>
32
 
                        <field name="arch" type="xml">
33
 
                                <form string="Labels Customization">
34
 
                                        <notebook>
35
 
                                                <page string="Customization">
36
 
                                                        <field name="name"/>
37
 
                                                        <separator string="Options" />
38
 
                                                        <field name="logo" />
39
 
                                                        <field name="requestor_order_reference" />
40
 
                                                        <field name="packing_parcel_number" />
41
 
                                                        <field name="pre_packing_list_reference" />
42
 
                                                        <field name="destination_partner" />
43
 
                                                        <field name="destination_address" />
44
 
                                                        <field name="weight" />
45
 
                                                        <field name="specific_information" />
46
 
                                                </page>
47
 
                                                <page string="Notes">
48
 
                                                        <field name="notes" nolabel="True" />
49
 
                                                </page>
50
 
                                        </notebook>
51
 
                                </form>
52
 
                        </field>
53
 
                </record>
54
 
                <record id="action_labels_tree" model="ir.actions.act_window">
55
 
                        <field name="name">Labels</field>
56
 
                        <field name="res_model">ppl.customize.label</field>
57
 
                        <field name="type">ir.actions.act_window</field>
58
 
                        <field name="view_type">form</field>
59
 
                        <field name="view_mode">tree,form</field>
60
 
                </record>
61
 
                <menuitem action="action_labels_tree" id="menu_report_custo_labels" parent="menu_report_config" sequence="7"/>
62
 
                <record id="view_picking_out_search" model="ir.ui.view">
63
 
                        <field name="name">view.picking.out.search</field>
64
 
                        <field name="model">stock.picking</field>
65
 
                        <field name="type">search</field>
66
 
                        <field name="inherit_id" ref="stock.view_picking_out_search" />
67
 
                        <field name="arch" type="xml">
68
 
                                <data>
69
 
                                        <xpath expr="/search/group[@string='Group By...']/filter[@string='Partner']" position="before">
70
 
                                                <filter string="Origin" name="origin" icon="terp-partner" domain="[]" context="{'group_by':'origin'}"/>
71
 
                                        </xpath>
72
 
                                </data>
73
 
                        </field>
74
 
                </record>
75
 
                <record id="view_picking_out_tree" model="ir.ui.view">
76
 
                        <field name="name">stock.picking.out.tree</field>
77
 
                        <field name="model">stock.picking</field>
78
 
                        <field name="type">tree</field>
79
 
                        <field name="inherit_id" ref="stock.view_picking_out_tree" />
80
 
                        <field name="arch" type="xml">
81
 
                                <data>
82
 
                                        <field name="origin" position="after">
83
 
                                                <field name="sale_id" invisible="True" />
84
 
                                        </field>
85
 
                                </data>
86
 
                        </field>
87
 
                </record>
88
 
                <record id="stock.action_picking_tree" model="ir.actions.act_window">
89
 
                        <field name="name">Delivery Orders</field>
90
 
                        <field name="res_model">stock.picking</field>
91
 
                        <field name="type">ir.actions.act_window</field>
92
 
                        <field name="view_type">form</field>
93
 
                        <field name="view_mode">tree,form,calendar</field>
94
 
                        <field name="domain">[('type','=','out'), ('subtype', '=', 'standard')]</field>
95
 
                        <field name="context">{'contact_display': 'partner_address', 'search_default_available': 1,'picking_type': 'delivery_order', 'subtype': 'standard'}</field>
96
 
                        <field name="search_view_id" ref="stock.view_picking_out_search"/>
97
 
                        <field name="help">This is the list of all delivery orders that have to be prepared, according to your different sales orders and your logistics rules.</field>
98
 
                </record>
99
 
                <menuitem id="stock.menu_action_picking_tree" parent="menu_warehouse_deliveries" />
100
 
                <record id="view_warehouse" model="ir.ui.view">
101
 
                        <field name="name">stock.warehouse</field>
102
 
                        <field name="model">stock.warehouse</field>
103
 
                        <field name="type">form</field>
104
 
                        <field name="inherit_id" ref="stock.view_warehouse" />
105
 
                        <field name="arch" type="xml">
106
 
                                <data>
107
 
 
108
 
                                        <field name="lot_stock_id" position="after">
109
 
                                                <field name="lot_packing_id" domain="[('quarantine_location', '=', False)]" />
110
 
                                                <field name="lot_dispatch_id" domain="[('quarantine_location', '=', False)]" />
111
 
                                                <field name="lot_distribution_id" domain="[('quarantine_location', '=', False)]" />
112
 
                                        </field>
113
 
                                </data>
114
 
                        </field>
115
 
                </record>
116
 
                <record id="view_pack_type_tree" model="ir.ui.view">
117
 
                        <field name="name">pack.type.tree</field>
118
 
                        <field name="model">pack.type</field>
119
 
                        <field name="type">tree</field>
120
 
                        <field name="arch" type="xml">
121
 
                                <tree string="Pack Types" editable="bottom">
122
 
                                        <field name="name" />
123
 
                                        <field name="length" />
124
 
                                        <field name="width" />
125
 
                                        <field name="height" />
126
 
                                </tree>
127
 
                        </field>
128
 
                </record>
129
 
                <record id="action_pack_type_tree" model="ir.actions.act_window">
130
 
                        <field name="name">Pack Types</field>
131
 
                        <field name="type">ir.actions.act_window</field>
132
 
                        <field name="res_model">pack.type</field>
133
 
                        <field name="view_type">form</field>
134
 
                        <field name="view_id" ref="view_pack_type_tree"/>
135
 
                        <field name="help">This is the list of all your pack types.</field>
136
 
                </record>
137
 
                <menuitem action="action_pack_type_tree" id="menu_action_pack_type_tree"
138
 
                sequence="6"
139
 
                parent="stock.menu_product_in_config_stock"/>
140
 
                <!-- Changed name to 'Picking Tickets' -->
 
3
    <data>
 
4
    
 
5
        <menuitem id="menu_report_config" name="Report Customization" parent="stock.menu_stock_configuration" sequence="1"/>
 
6
    
 
7
        # -------------------------------------------------------------
 
8
        # Labels
 
9
        # -------------------------------------------------------------
 
10
        <record id="view_labels_tree" model="ir.ui.view">
 
11
            <field name="name">stock.labels.tree</field>
 
12
            <field name="model">ppl.customize.label</field>
 
13
            <field name="type">tree</field>
 
14
            <field name="arch" type="xml">
 
15
                <tree string="Labels Customization">
 
16
                    <field name="name"/>
 
17
                    <field name="logo" />
 
18
                    <field name="requestor_order_reference" />
 
19
                    <field name="packing_parcel_number" />
 
20
                    <field name="pre_packing_list_reference" />
 
21
                    <field name="destination_partner" />
 
22
                    <field name="destination_address" />
 
23
                    <field name="weight" />
 
24
                    <field name="specific_information" />
 
25
                </tree>
 
26
            </field>
 
27
        </record>
 
28
        <record id="view_labels_form" model="ir.ui.view">
 
29
            <field name="name">stock.labels.form</field>
 
30
            <field name="model">ppl.customize.label</field>
 
31
            <field name="type">form</field>
 
32
            <field name="arch" type="xml">
 
33
                <form string="Labels Customization">
 
34
                    <notebook>
 
35
                                <page string="Customization">
 
36
                                        <field name="name"/>
 
37
                                        <separator string="Options" />
 
38
                                        <field name="logo" />
 
39
                                        <field name="requestor_order_reference" />
 
40
                                        <field name="packing_parcel_number" />
 
41
                                    <field name="pre_packing_list_reference" />
 
42
                                    <field name="destination_partner" />
 
43
                                    <field name="destination_address" />
 
44
                                    <field name="weight" />
 
45
                                    <field name="specific_information" />
 
46
                                </page>
 
47
                                <page string="Notes">
 
48
                                        <field name="notes" nolabel="True" />
 
49
                                </page>
 
50
                    </notebook>
 
51
                </form>
 
52
            </field>
 
53
        </record>
 
54
        
 
55
        <record id="action_labels_tree" model="ir.actions.act_window">
 
56
            <field name="name">Labels</field>
 
57
            <field name="res_model">ppl.customize.label</field>
 
58
            <field name="type">ir.actions.act_window</field>
 
59
            <field name="view_type">form</field>
 
60
            <field name="view_mode">tree,form</field>
 
61
        </record>
 
62
        <menuitem action="action_labels_tree" id="menu_report_custo_labels" parent="menu_report_config" sequence="7"/>
 
63
        
 
64
        <record id="stock.action_picking_tree" model="ir.actions.act_window">
 
65
            <field name="name">Delivery Orders</field>
 
66
            <field name="res_model">stock.picking</field>
 
67
            <field name="type">ir.actions.act_window</field>
 
68
            <field name="view_type">form</field>
 
69
            <field name="view_mode">tree,form,calendar</field>
 
70
            <field name="domain">[('type','=','out'), ('subtype', '=', 'standard'),]</field>
 
71
            <field name="context">{'contact_display': 'partner_address', 'search_default_available': 1}</field>
 
72
            <field name="search_view_id" ref="stock.view_picking_out_search"/>
 
73
            <field name="help">This is the list of all delivery orders that have to be prepared, according to your different sales orders and your logistics rules.</field>
 
74
        </record>
 
75
    
 
76
    
 
77
        <record id="stock.action_picking_tree" model="ir.actions.act_window">
 
78
            <field name="name">Delivery Orders</field>
 
79
            <field name="res_model">stock.picking</field>
 
80
            <field name="type">ir.actions.act_window</field>
 
81
            <field name="view_type">form</field>
 
82
            <field name="view_mode">tree,form,calendar</field>
 
83
            <field name="domain">[('type','=','out'), ('subtype', '=', 'standard'),]</field>
 
84
            <field name="context">{'contact_display': 'partner_address', 'search_default_available': 1}</field>
 
85
            <field name="search_view_id" ref="stock.view_picking_out_search"/>
 
86
            <field name="help">This is the list of all delivery orders that have to be prepared, according to your different sales orders and your logistics rules.</field>
 
87
        </record>
 
88
        <!-- delete outgoing delivery menuitem -->
 
89
        <!-- <delete model="ir.ui.menu" id="stock.menu_action_picking_tree"/> -->
 
90
        
 
91
        <record id="view_warehouse" model="ir.ui.view">
 
92
            <field name="name">stock.warehouse</field>
 
93
            <field name="model">stock.warehouse</field>
 
94
            <field name="type">form</field>
 
95
            <field name="inherit_id" ref="stock.view_warehouse" />
 
96
            <field name="arch" type="xml">
 
97
                <data>
 
98
                
 
99
                        <field name="lot_stock_id" position="after">
 
100
                                <field name="lot_packing_id" domain="[('quarantine_location', '=', False)]" />
 
101
                                <field name="lot_dispatch_id" domain="[('quarantine_location', '=', False)]" />
 
102
                                <field name="lot_distribution_id" domain="[('quarantine_location', '=', False)]" />
 
103
                        </field>
 
104
                
 
105
                </data>
 
106
            </field>
 
107
        </record>
 
108
        
 
109
                <record id="view_pack_type_tree" model="ir.ui.view">
 
110
            <field name="name">pack.type.tree</field>
 
111
            <field name="model">pack.type</field>
 
112
            <field name="type">tree</field>
 
113
            <field name="arch" type="xml">
 
114
                <tree string="Pack Types" editable="bottom">
 
115
                    <field name="name" />
 
116
                    <field name="length" />
 
117
                    <field name="width" />
 
118
                    <field name="height" />
 
119
                </tree>
 
120
            </field>
 
121
        </record>
 
122
        
 
123
        <record id="action_pack_type_tree" model="ir.actions.act_window">
 
124
            <field name="name">Pack Types</field>
 
125
            <field name="type">ir.actions.act_window</field>
 
126
            <field name="res_model">pack.type</field>
 
127
            <field name="view_type">form</field>
 
128
            <field name="view_id" ref="view_pack_type_tree"/>
 
129
            <field name="help">This is the list of all your pack types.</field>
 
130
        </record>
 
131
        
 
132
        <menuitem action="action_pack_type_tree" id="menu_action_pack_type_tree"
 
133
            groups="base.group_extended"
 
134
            sequence="6"
 
135
            parent="stock.menu_traceability"/>
 
136
        
 
137
        <!-- Changed name to 'Picking Tickets' -->
141
138
                <record id="view_picking_ticket_tree" model="ir.ui.view">
142
 
 
143
 
                        <field name="name">picking.ticket.tree</field>
144
 
                        <field name="model">stock.picking</field>
145
 
                        <field name="type">tree</field>
146
 
                        <field name="arch" type="xml">
147
 
                                <tree colors="blue:state in ('draft') and min_date &gt;= current_date;grey:state in ('cancel');red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Picking Tickets">
148
 
                                        <field name="name"/>
149
 
                                        <field name="partner_id2" />
150
 
                                        <field name="backorder_id" />
151
 
                                        <field name="sale_id" invisible="True" />
152
 
                                        <field name="reason_type_id" />
153
 
                                        <field name="origin"/>
154
 
                                        <field name="overall_qty" invisible="True" />
155
 
                                        <field name="date"/>
156
 
                                        <field name="min_date" string="Expected Pick Date" />
 
139
            <field name="name">picking.ticket.tree</field>
 
140
            <field name="model">stock.picking</field>
 
141
            <field name="type">tree</field>
 
142
            <field name="arch" type="xml">
 
143
                <tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking Tickets">
 
144
                    <field name="name"/>
 
145
                    <field name="partner_id"/>
 
146
                    <field name="sale_id" invisible="True" />
 
147
                    <field name="reason_type_id" />
 
148
                    <field name="origin"/>
 
149
                    <field name="date"/>
 
150
                    <field name="min_date"/>
 
151
                    <field name="backorder_id" groups="base.group_extended"/>
 
152
                    <field name="invoice_state"/>
 
153
                    <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
157
154
                    <field name="state"/>
158
 
                    <field name="line_state" />
159
 
                                        <button name="create_picking" states="draft" string="Create Picking..." type="object" icon="gtk-add"/>
160
 
                                        <button name="validate_picking" states="assigned" string="Validate Picking..." type="object" icon="gtk-apply"/>
161
 
                                </tree>
162
 
                        </field>
163
 
                </record>
164
 
                <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
165
 
                <!-- 'Check Availability' button available for 'draft' state -->
166
 
                <!-- Add 'Create Picking...' button -->
167
 
                <!-- Changed name to 'Picking Ticket' -->
168
 
                <!-- Add 'Flow Type' drop down list -->
169
 
                <!-- TREE -->
170
 
                <!-- Remove 'Scrap Products' button -->
171
 
                <!-- Remove 'Scrapped' -->
172
 
                <!-- Remove 'Split in production lots' -->
173
 
                <!-- Remove 'Put in current pack' -->
174
 
                <!-- Remove 'Put in a new pack' -->
175
 
                <!-- Remove 'Process' at stock.move level -->
176
 
                <!-- FORM -->
177
 
                <!-- Remove 'Scrap' button -->
178
 
                <!-- Remove 'New Pack' -->
179
 
                <!-- Remove 'tracking_id' -->
180
 
                <!-- Remove 'Split' -->
181
 
                <!-- Remove 'Process' button -->
182
 
                <!-- Added Asset Id to move tree and form -->
183
 
                <record id="view_picking_ticket_form" model="ir.ui.view">
184
 
                        <field name="name">picking.ticket.form</field>
185
 
                        <field name="model">stock.picking</field>
186
 
                        <field name="type">form</field>
187
 
                        <!-- without priority 'view_picking_form' from stock is used -->
188
 
                        <!-- but then other form view also use it... -->
189
 
                        <!-- <field eval="11" name="priority"/> -->
190
 
                        <field name="arch" type="xml">
191
 
                                <form string="Picking Ticket">
192
 
                                        <group col="6" colspan="4">
193
 
                                                <group colspan="4" col="4">
194
 
                                                        <field name="name" readonly="1"/>
195
 
                                                        <field name="origin" readonly="1"/>
196
 
                                                        <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)"
197
 
                                                        required="1"
198
 
                                                        attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
199
 
                                                        <field name="address_id" colspan="2" context="{'contact_display':'partner'}" attrs="{'required': [('subtype', 'in', ('picking', 'ppl'))]}" />
200
 
                                                        <field name="backorder_id" readonly="1" />
201
 
                                                        <field name="reason_type_id" widget="selection" domain="[('outgoing_ok', '=', True)]" attrs="{'readonly': [('from_wkf', '=', True)]}"/>
202
 
                                                </group>
203
 
                                                <group colspan="2" col="2">
204
 
                                                        <field name="date" readonly="1"/>
205
 
                                                        <field name="stock_journal_id" widget="selection" invisible="True" />
206
 
                                                        <field name="min_date" string="Expected Pick Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}" 
207
 
                                                                   on_change="change_min_date()" required="1" />
208
 
                            <field name="min_date_manually" invisible="1" />
209
 
                                                        <field name="sale_id" invisible="True" />
210
 
                                                        <field name="subtype" invisible="True" />
211
 
                                                        <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking')]}" />
212
 
                                                </group>
213
 
                                        </group>
214
 
                                        <notebook colspan="4">
215
 
                                                <page string="Products">
216
 
                                                        <field name="from_wkf" invisible="1"/>
217
 
                                                        <field colspan="4" 
218
 
                                                                name="move_lines" 
219
 
                                                                nolabel="1" 
220
 
                                                                widget="one2many_list" 
221
 
                                                                default_get="{'subtype': subtype, 'type': 'out', 'reason_type_id': reason_type_id, 'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id, 'warehouse_id': warehouse_id, 'from_wkf': from_wkf, 'date_expected': min_date}" 
222
 
                                                            on_change="onchange_move()"  
223
 
                                                            >
224
 
                                                                <tree string="Stock Moves" noteditable="fake_state in ('assigned', 'cancel')" hide_new_button="context.get('from_wkf')" hide_delete_button="context.get('from_wkf')"
225
 
                                                                colors="red: inactive_product==True">
226
 
                                    <field name="product_id" context="{'available_for_restriction': 'picking', 'search_default_not_restricted': 1}"/>
227
 
                                                                        <field name="composition_list_id" />
228
 
                                                                        <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
229
 
                                                                        <field name="product_uom" string="UoM"/>
230
 
                                                                        <field name="asset_id" />
231
 
                                                                        <field name="prodlot_id" string="Batch Number" />
232
 
                                                                        <field name="expired_date" />
233
 
                                                                        <field name="kc_dg" invisible="1" />
234
 
                                                                        <field name="location_id" string="Src. Loc"  />
235
 
                                                                        <field name="location_dest_id" string="Dest. Loc" />
236
 
                                                                        <field name="virtual_available" invisible="1" />
237
 
                                                                        <field name="date" string="Actual Pick Date" />
238
 
                                                                        <field name="state"/>
239
 
                                                                        <field name="fake_state" invisible="1"/>
240
 
                                                                    <button name="cancel_assign" string="Cancel Availability" type="object" icon="gtk-undo" states="assigned" />
241
 
                                    <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
242
 
                                    <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
243
 
 
244
 
                                                                        <field name="lot_check" />
245
 
                                                                        <field name="exp_check" />
246
 
                                                                        <field name="kc_check" />
247
 
                                                                        <field name="ssl_check" invisible="True" />
248
 
                                                                        <field name="dg_check" />
249
 
                                                                        <field name="np_check" />
250
 
                                                                        <field name="inactive_product" invisible="1" />
251
 
                                    <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
252
 
                                    <field name="pt_created" invisible="1" />
253
 
                                    <button name="call_cancel_wizard" type="object" string="Cancel" states="draft,assigned,confirmed" icon="gtk-del"  attrs="{'invisible': [('pt_created', '=', True)]}" />
254
 
                                                                </tree>
255
 
                                                                <form string="Stock Moves">
256
 
                                                                        <group colspan="2" col="4">
257
 
                                                                                <separator colspan="4" string="Move Information"/>
258
 
                                                                                <field name="name" invisible="1" colspan="4" />
259
 
                                                                                <field name="from_wkf_line" invisible="1" />
260
 
                                                                                <!-- Service products can't be sent -->
261
 
                                        <field name="product_id"
262
 
                                               context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True, 'available_for_restriction': 'picking', 'search_default_not_restricted': 1}"
263
 
                                               on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id,parent.type,purchase_line_id,True)"
264
 
                                               attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
265
 
                                               colspan="4" />
266
 
                                        <field name="composition_list_id" invisible="True" />
267
 
                                                                                <field name="product_qty"
268
 
                                                                                        on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"
269
 
                                                                                        attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
270
 
                                                                                         />
271
 
                                                                                <field name="product_uom"
272
 
                                            on_change="onchange_uom(product_uom, product_qty)"
273
 
                                            string="Unit Of Measure"
274
 
                                                                                        attrs="{'readonly': ['|', ('from_wkf_line', '=', True), ('state', '=', 'assigned')]}"
275
 
                                                                                        colspan="2"
276
 
                                                                                        domain="[('uom_by_product', '=', product_id)]"
277
 
                                                                                         />
278
 
                                                                                <field name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" invisible="1" />
279
 
                                                                        </group>
280
 
                                                                        <group colspan="2" col="2">
281
 
                                                                                <separator string="Locations" colspan="2" />
282
 
                                                                                <field name="location_virtual_id" invisible="1" />
283
 
                                                        <field name="location_output_id" invisible="1" />
284
 
                                                        <!-- # picking_ticket_src is a fields.function to compute the available locations according to the product-->
285
 
                                                                                <field name="location_id"
286
 
                                                                                        domain="[('picking_ticket_src', '=', product_id), ('id', '!=', location_dest_id)]"
287
 
                                                                                        context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}"
288
 
                                                                                        attrs="{'readonly': [('state', '=', 'assigned')]}"
289
 
                                                                                         />
290
 
                                                                                <field name="location_dest_id" on_change="location_dest_change(location_dest_id, location_id)" domain="[('name', '=', 'Packing')]" />
291
 
                                                                        </group>
292
 
                                                                        <group colspan="2" col="4">
293
 
                                                                                <separator string="Traceability" colspan="4" />
294
 
                                                                                <field name="asset_id" colspan="4" />
295
 
                                                                                <field name="hidden_batch_management_mandatory" invisible="True" />
296
 
                                                                                <field name="hidden_perishable_mandatory" invisible="True" />
297
 
                                                                                <field name="prodlot_id"
298
 
                                                                                        context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,
299
 
                                                                                        'search_default_real': True}"
300
 
                                                                                        domain="[('product_id','=?',product_id), ('check_type','=', True)]"
301
 
                                                                                        on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="2"
302
 
                                                                                        attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
155
                    <button name="create_picking" states="draft" string="Create Picking..." type="object" icon="gtk-add"/>
 
156
                    <button name="validate_picking" states="assigned" string="Validate Picking..." type="object" icon="gtk-apply"/>
 
157
                </tree>
 
158
            </field>
 
159
        </record>
 
160
        
 
161
        <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
 
162
        <!-- 'Check Availability' button available for 'draft' state -->
 
163
        <!-- Add 'Create Picking...' button -->
 
164
        <!-- Changed name to 'Picking Ticket' -->
 
165
        <!-- Add 'Flow Type' drop down list -->
 
166
        <!-- TREE -->
 
167
        <!-- Remove 'Scrap Products' button -->
 
168
        <!-- Remove 'Scrapped' -->
 
169
        <!-- Remove 'Split in production lots' -->
 
170
        <!-- Remove 'Put in current pack' -->
 
171
        <!-- Remove 'Put in a new pack' -->
 
172
        <!-- Remove 'Process' at stock.move level -->
 
173
        <!-- FORM -->
 
174
        <!-- Remove 'Scrap' button -->
 
175
        <!-- Remove 'New Pack' -->
 
176
        <!-- Remove 'tracking_id' -->
 
177
        <!-- Remove 'Split' -->
 
178
        <!-- Remove 'Process' button -->
 
179
        <!-- Added Asset Id to move tree and form -->
 
180
        <record id="view_picking_ticket_form" model="ir.ui.view">
 
181
            <field name="name">picking.ticket.form</field>
 
182
            <field name="model">stock.picking</field>
 
183
            <field name="type">form</field>
 
184
            <!-- without priority 'view_picking_form' from stock is used -->
 
185
            <!-- but then other form view also use it... -->
 
186
            <!-- <field eval="11" name="priority"/> -->
 
187
            <field name="arch" type="xml">
 
188
                <form string="Picking Ticket">
 
189
                    <group col="6" colspan="4">
 
190
                        <group colspan="4" col="4">
 
191
                            <field name="name" readonly="1"/>
 
192
                            <field name="origin" readonly="1"/>
 
193
                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4" attrs="{'required': [('subtype', 'in', ('picking', 'ppl',))],}" />
 
194
                            <field name="invoice_state"/>
 
195
                            <field name="backorder_id" readonly="1" groups="base.group_extended"/>
 
196
                        </group>
 
197
                        <group colspan="2" col="2">
 
198
                            <field name="date"/>
 
199
                            <field name="min_date" readonly="1"/>
 
200
                            <field name="stock_journal_id" groups="base.group_extended" widget="selection" invisible="True" />
 
201
                            <field name="reason_type_id" widget="selection"/>
 
202
                            <field name="sale_id" invisible="True" />
 
203
                            <field name="subtype" invisible="True" />
 
204
                            <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking'),]}" />
 
205
                        </group>
 
206
                    </group>
 
207
                    <notebook colspan="4">
 
208
                        <page string="Products">
 
209
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'reason_type_id': reason_type_id, 'move_line':move_lines, 'address_out_id': address_id}">
 
210
                                <tree string="Stock Moves">
 
211
                                    <field name="product_id"/>
 
212
                                    <field name="asset_id" />
 
213
                                    <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
 
214
                                    <field name="product_uom" string="UoM"/>
 
215
                                    <field name="product_uos" groups="product.group_uos"/>
 
216
                                    <field name="prodlot_id" string="Prod. Lot" groups="base.group_extended"/>
 
217
                                    <field name="expired_date" />
 
218
                                                                        <field name="kc_dg" />
 
219
                                    <field name="location_id" string="Src. Loc" />
 
220
                                    <field name="location_dest_id" string="Dest. Loc" />
 
221
                                    <field name="virtual_available" />
 
222
                                    <field name="date"/>
 
223
                                    <field name="state"/>
 
224
                                    <field name="kc_check" />
 
225
                                                        <field name="ssl_check" />
 
226
                                                        <field name="dg_check" />
 
227
                                                        <field name="np_check" />
 
228
                                </tree>
 
229
                                <form string="Stock Moves">
 
230
                                    <group colspan="2" col="4">
 
231
                                        <separator colspan="4" string="Move Information"/>
 
232
                                        <field name="name" invisible="1" colspan="4" />
 
233
                                        <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
 
234
                                        <field name="asset_id" />
 
235
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
 
236
                                        <field name="product_uom" string="Unit Of Measure" colspan="4" />
 
237
                                        <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" />
 
238
                                        <field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
 
239
                                        <field groups="base.group_extended" name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" />
 
240
                                    </group>
 
241
 
 
242
                                    <group colspan="2" col="2">
 
243
                                        <separator string="Locations" colspan="2" />
 
244
                                        <field name="location_id" domain="[('usage','=','internal'), ('quarantine_location', '=', False),]" />
 
245
                                        <field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]" on_change="location_dest_change(location_dest_id)" />
 
246
                                    </group>
 
247
 
 
248
                                    <group colspan="2" col="2">
 
249
                                        <separator string="Dates" colspan="2" />
 
250
                                        <field name="create_date" invisible="1"/>
 
251
                                        <field name="date"/>
 
252
                                        <field name="date_expected"/>
 
253
                                    </group>
 
254
 
 
255
                                    <group colspan="2" col="4" groups="base.group_extended">
 
256
                                        <separator string="Traceability" colspan="4" groups="base.group_extended"/>
 
257
                                        <field name="reason_type_id"  attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
 
258
                                        <field name="prodlot_id" groups="base.group_extended"
 
259
                                                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,}"
 
260
                                                                domain="[('product_id','=?',product_id), ('check_type','=', True),]"
 
261
                                                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
262
                                                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False),],}" />
 
263
                                                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
264
                                                        <field name="hidden_perishable_mandatory" invisible="True" />
303
265
                                                                                <field name="expired_date" />
304
 
                                                                                <group colspan="4" col="10">
305
 
                                                                                        <field name="lot_check" />
306
 
                                                                                        <field name="exp_check" />
307
 
                                                                                        <field name="kc_check" />
308
 
                                                                                        <field name="ssl_check" invisible="True" />
309
 
                                                                                        <field name="dg_check" />
310
 
                                                                                        <field name="np_check" />
311
 
                                                                                </group>
312
 
                                                                                <field name="reason_type_id"
313
 
                                                                                       domain="[('outgoing_ok', '=', True)]" 
314
 
                                                                                       attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}" widget="selection"/>
315
 
                                                                        </group>
316
 
                                                                        <group colspan="2" col="2">
317
 
                                                                                <separator string="Dates" colspan="2" />
318
 
                                                                                <field name="create_date" invisible="1"/>
319
 
                                                                                <field name="date" string="Actual Pick Date" />
320
 
                                                                                <field name="date_expected" string="Expected Pick Date" />
321
 
                                                                        </group>
322
 
                                                    <field name="purchase_line_id"  invisible="1"/>
323
 
                                                    <field name="move_cross_docking_ok"  invisible="1"/>
324
 
                                                    <field name="picking_id"  invisible="1"/>
325
 
                                                                        <label string="" colspan="4"/>
326
 
                                                                        <field name="state"/>
327
 
                                                                        <group col="4" colspan="2">
328
 
                                                                                <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
329
 
                                                                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
330
 
                                                                                <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
331
 
                                                                        </group>
332
 
                                                                </form>
333
 
                                                        </field>
334
 
                                                        <group col="14" colspan="4">
 
266
                                                                                <field name="kc_check" />
 
267
                                                                <field name="ssl_check" />
 
268
                                                                <field name="dg_check" />
 
269
                                                                <field name="np_check" />
 
270
                                    </group>
 
271
                                    <label string="" colspan="4"/>
 
272
                                    <field name="state"/>
 
273
                                    <group col="4" colspan="2">
 
274
                                        <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
 
275
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
 
276
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
 
277
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
 
278
                                    </group>
 
279
                                </form>
 
280
                            </field>
 
281
                            <group col="12" colspan="4">
335
282
                                <field name="state" readonly="1"/>
336
 
                                <field name="line_state" readonly="1" attrs="{'invisible': [('state', '!=', 'draft')]}" nolabel="1" />
337
283
                                <field name="flow_type" />
338
 
                                <group colspan="1" col="1">
339
 
                                    <button name="call_cancel_wizard" type="object" states="draft" string="_Cancel Picking" icon="gtk-cancel"/>
340
 
                                    <button name="button_cancel" states="assigned,confirmed" string="_Cancel Picking" icon="gtk-cancel"/>
341
 
                                </group>
342
 
                                <field name="has_draft_moves" invisible="1" />
343
 
                                <button name="action_confirm_moves" states="draft" string="Confirm" type="object" icon="gtk-apply" attrs="{'invisible': [('has_draft_moves', '=', False)]}"/>
344
 
                                                                <button name="action_assign" states="draft,confirmed,assigned" string="Check Availability" type="object" icon="gtk-find"/>
345
 
                                                                <button name="convert_to_standard" states="draft,assigned" string="Convert to Simple Out" type="object" icon="gtk-convert" />
346
 
                                                                <button name="create_picking" states="draft" string="Create Picking..." type="object" icon="gtk-add" help="Non available quantities will not be moved and will remain in the backorder document (unless you “force availability” if you are sure goods are available" />
347
 
                                                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
348
 
                                                                <button name="validate_picking" states="assigned" string="Validate Picking..." type="object" icon="gtk-apply"/>
349
 
                                                                <!-- <button name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/> -->
350
 
                                                        </group>
351
 
                                                </page>
352
 
                                                <page string="Additional info">
353
 
                                                        <field name="auto_picking" invisible="1"/>
354
 
                                                        <field name="date_done" />
355
 
                                                        <field name="move_type" invisible="1"/>
356
 
                                                        <field name="type" invisible="1"/>
357
 
                                                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
358
 
                                                </page>
359
 
                                                <page string="Notes">
360
 
                                                        <field colspan="4" name="note" nolabel="1"/>
361
 
                                                </page>
362
 
                                        </notebook>
363
 
                                </form>
364
 
                        </field>
365
 
                </record>
 
284
                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel Picking" icon="gtk-cancel"/>
 
285
                                <button name="action_assign" states="draft,confirmed" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
 
286
                                <button name="convert_to_standard" states="draft" string="Convert to Simple Out" type="object" icon="gtk-convert" />
 
287
                                <button name="create_picking" states="draft" string="Create Picking..." type="object" icon="gtk-add" />
 
288
                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
 
289
                                <button name="validate_picking" states="assigned" string="Validate Picking..." type="object" icon="gtk-apply"/>
 
290
                                <button name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/>
 
291
                            </group>
 
292
                        </page>
 
293
                        <page string="Additional info" groups="base.group_extended,base.group_multi_company">
 
294
                            <field name="auto_picking" groups="base.group_extended"/>
 
295
                            <field name="date_done" groups="base.group_extended"/>
 
296
                            <field name="move_type" groups="base.group_extended"/>
 
297
                            <field name="type" groups="base.group_extended"/>
 
298
                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
 
299
                        </page>
 
300
                        <page string="Notes">
 
301
                            <field colspan="4" name="note" nolabel="1"/>
 
302
                        </page>
 
303
                    </notebook>
 
304
                </form>
 
305
            </field>
 
306
        </record>
 
307
 
366
308
                <!-- Changed name to 'Picking Tickets' -->
367
 
                <record id="view_picking_ticket_search" model="ir.ui.view">
368
 
                        <field name="name">picking.ticket.search</field>
369
 
                        <field name="model">stock.picking</field>
370
 
                        <field name="type">search</field>
371
 
                        <field name="arch" type="xml">
372
 
                                <search string="Picking Tickets">
373
 
                                        <group col="8" colspan="4">
374
 
                                                <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" />
375
 
                                                <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" />
376
 
                                                <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" />
377
 
                                                <filter icon="terp-dialog-close" name="done" string="Closed" domain="[('state','=','done')]" />
378
 
                                                <separator orientation="vertical"/>
379
 
                                                <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" />
380
 
                                                <separator orientation="vertical"/>
381
 
                                                <filter icon="terp-folder-orange" name="empty" string="Empty" domain="[('overall_qty','=', 0.0)]" />
382
 
                                                <filter icon="terp-folder-green" name="not_empty" string="Not Empty" domain="[('overall_qty','!=', 0.0)]" />
383
 
                                                <separator orientation="vertical"/>
384
 
                                                <field name="name"/>
385
 
                                                <field name="partner_id2" />
386
 
                                                <field name="origin"/>
387
 
                        <newline />
388
 
                                                <field name="reason_type_id" widget="selection" domain="[('outgoing_ok', '=', True)]" />
389
 
                                                <field name="date" />
390
 
                                                <field name="min_date" />
391
 
                    </group>
392
 
                    <newline />
393
 
                    <group string="State of lines" col="8" colspan="4">
394
 
                        <filter icon="gtk-no" name="line_not_available" string="Not available" domain="[('line_state', '=', 'confirmed')]" />
395
 
                        <filter icon="gtk-dialog-question" name="line_mixed" string="Partially available" domain="[('line_state', '=', 'mixed')]" />
396
 
                        <filter icon="gtk-yes" name="line_available" string="Available" domain="[('line_state', '=', 'assigned')]" />
397
 
                    </group>
398
 
                                        <newline/>
399
 
                                        <group expand="0" string="Group By..." colspan="4" col="8">
400
 
                                                <filter string="Origin" name="origin" icon="terp-partner" domain="[]" context="{'group_by':'origin'}"/>
401
 
                                                <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id2'}"/>
402
 
                                                <separator orientation="vertical" />
403
 
                                                <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
404
 
                                                <separator orientation="vertical" />
405
 
                                                <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
406
 
                                                <separator orientation="vertical" />
407
 
                                                <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
408
 
                                                <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
409
 
                                                <separator orientation="vertical" />
410
 
                                                <!-- Field stock_journal_id is not in the tree view
411
 
                                                <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}" />-->
412
 
                                        </group>
413
 
                                </search>
414
 
                        </field>
415
 
                </record>
416
 
 
417
 
                <!-- Search 'PT and PPL' -->
418
 
                <record id="view_pt_ppl_search" model="ir.ui.view">
419
 
                        <field name="name">pt.ppl.search</field>
420
 
                        <field name="model">stock.picking</field>
421
 
                        <field name="type">search</field>
422
 
                        <field name="arch" type="xml">
423
 
                                <search string="Picking Tickets">
424
 
                                        <group col="8" colspan="4">
425
 
                                                <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" />
426
 
                                                <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" />
427
 
                                                <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" />
428
 
                                                <filter icon="terp-dialog-close" name="done" string="Closed" domain="[('state','=','done')]" />
429
 
                                                <separator orientation="vertical"/>
430
 
                                                <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" />
431
 
                                                <separator orientation="vertical"/>
432
 
                                                <filter icon="terp-folder-orange" name="empty" string="Empty" domain="[('overall_qty','=', 0.0)]" />
433
 
                                                <filter icon="terp-folder-green" name="not_empty" string="Not Empty" domain="[('overall_qty','!=', 0.0)]" />
434
 
                                                <separator orientation="vertical"/>
435
 
 
436
 
                                                <filter icon="" name="pt" string="PT" domain="[('subtype','=', 'picking')]" />
437
 
                                                <filter icon="" name="ppl" string="PPL" domain="[('subtype','=', 'ppl')]" />
438
 
 
439
 
                                                <field name="name"/>
440
 
                                                <field name="partner_id2" />
441
 
                                                <field name="origin"/>
442
 
                                                <newline />
443
 
                                                <field name="reason_type_id" widget="selection" />
444
 
                                                <field name="date" />
445
 
                                                <field name="min_date" />
446
 
                                        </group>
447
 
                                        <newline/>
448
 
                                        <group expand="0" string="Group By..." colspan="4" col="8">
449
 
                                                <filter string="Origin" name="origin" icon="terp-partner" domain="[]" context="{'group_by':'origin'}"/>
450
 
                                                <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id2'}"/>
451
 
                                                <separator orientation="vertical" />
452
 
                                                <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
453
 
                                                <separator orientation="vertical" />
454
 
                                                <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
455
 
                                                <separator orientation="vertical" />
456
 
                                                <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
457
 
                                                <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
458
 
                                                <separator orientation="vertical" />
459
 
                                        </group>
460
 
                                </search>
461
 
                        </field>
462
 
                </record>
463
 
 
464
 
 
465
 
                <!-- Added 'subtype' in domain -->
466
 
                <record id="action_draft_picking_ticket" model="ir.actions.act_window">
467
 
                        <field name="name">Draft Picking Ticket</field>
468
 
                        <field name="res_model">stock.picking</field>
469
 
                        <field name="type">ir.actions.act_window</field>
470
 
                        <field name="view_type">form</field>
471
 
                        <field name="view_mode">tree,form,calendar</field>
472
 
                        <field name="domain">[('type','=','out'), ('subtype', '=', 'picking'), ('state', '=', 'draft')]</field>
473
 
                        <field name="context">{'contact_display':'partner_address',
474
 
                                                                   'picking_type': 'picking_ticket', 
475
 
                                                   'search_default_sale_id':1, 
476
 
                                                   'group_by_no_leaf':0, 
477
 
                                                   'group_by':'origin'}</field>
478
 
                        <field name="search_view_id" ref="view_picking_ticket_search"/>
479
 
                        <field name="help">This is the list of draft picking tickets.</field>
480
 
                </record>
481
 
                <record id="action_draft_picking_ticket_tree" model="ir.actions.act_window.view">
482
 
                        <field eval="1" name="sequence"/>
483
 
                        <field name="view_mode">tree</field>
484
 
                        <field name="view_id" ref="view_picking_ticket_tree"/>
485
 
                        <field name="act_window_id" ref="action_draft_picking_ticket"/>
486
 
                </record>
487
 
                <record id="action_draft_picking_ticket_form" model="ir.actions.act_window.view">
488
 
                        <field eval="2" name="sequence"/>
489
 
                        <field name="view_mode">form</field>
490
 
                        <field name="view_id" ref="view_picking_ticket_form"/>
491
 
                        <field name="act_window_id" ref="action_draft_picking_ticket"/>
492
 
                </record>
493
 
                <record id="action_draft_picking_ticket_cal" model="ir.actions.act_window.view">
494
 
                        <field eval="3" name="sequence"/>
495
 
                        <field name="view_mode">calendar</field>
496
 
                        <field name="act_window_id" ref="action_draft_picking_ticket"/>
497
 
                </record>
498
 
                <!-- <menuitem action="action_draft_picking_ticket" id="menu_action_draft_picking_ticket" parent="stock.menu_stock_warehouse_mgmt" sequence="4"/> -->
499
 
 
500
 
                <!-- Added 'subtype' in domain -->
501
 
                <record id="action_picking_ticket" model="ir.actions.act_window">
502
 
                        <field name="name">Picking Tickets</field>
503
 
                        <field name="res_model">stock.picking</field>
504
 
                        <field name="type">ir.actions.act_window</field>
505
 
                        <field name="view_type">form</field>
506
 
                        <field name="view_mode">tree,form,calendar</field>
507
 
                        <field name="domain">[('type','=','out'), ('subtype', '=', 'picking')]</field>
508
 
                        <field name="context">{'picking_screen':True, 'picking_type': 'picking_ticket', 'test':True, 'search_default_not_empty':1}</field>
509
 
                        <!-- <field name="context">{'picking_screen':True, 'test':True, 'group_by':'origin', 'search_default_not_empty':1}</field> -->
510
 
                        <field name="search_view_id" ref="view_picking_ticket_search"/>
511
 
                        <field name="help">This is the list of all picking tickets (draft and confirmed) that have to be prepared from sales orders.</field>
512
 
                </record>
513
 
                <record id="action_picking_ticket_tree" model="ir.actions.act_window.view">
514
 
                        <field eval="1" name="sequence"/>
515
 
                        <field name="view_mode">tree</field>
516
 
                        <field name="view_id" ref="view_picking_ticket_tree"/>
517
 
                        <field name="act_window_id" ref="action_picking_ticket"/>
518
 
                </record>
519
 
                <record id="action_picking_ticket_form" model="ir.actions.act_window.view">
520
 
                        <field eval="2" name="sequence"/>
521
 
                        <field name="view_mode">form</field>
522
 
                        <field name="view_id" ref="view_picking_ticket_form"/>
523
 
                        <field name="act_window_id" ref="action_picking_ticket"/>
524
 
                </record>
525
 
                <record id="action_picking_ticket_cal" model="ir.actions.act_window.view">
526
 
                        <field eval="3" name="sequence"/>
527
 
                        <field name="view_mode">calendar</field>
528
 
                        <field name="act_window_id" ref="action_picking_ticket"/>
529
 
                </record>
530
 
                <menuitem action="action_picking_ticket" id="menu_action_picking_ticket" parent="menu_warehouse_deliveries" sequence="4"/>
531
 
                <!-- Changed name to 'PPL' -->
 
309
        <record id="view_picking_ticket_search" model="ir.ui.view">
 
310
            <field name="name">picking.ticket.search</field>
 
311
            <field name="model">stock.picking</field>
 
312
            <field name="type">search</field>
 
313
            <field name="arch" type="xml">
 
314
                <search string="Picking Tickets">
 
315
                    <group col="8" colspan="4">
 
316
                        <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Picking Ticket"/>
 
317
                        <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Picking Ticket"/>
 
318
                        <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Picking Ticket"/>
 
319
                        <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
 
320
                        <separator orientation="vertical"/>
 
321
                        <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" groups="base.group_extended"/>
 
322
                        <separator orientation="vertical"/>
 
323
                        <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice"/>
 
324
                        <separator orientation="vertical"/>
 
325
                        <field name="name"/>
 
326
                        <field name="partner_id" />
 
327
                        <field name="origin"/>
 
328
                        <field name="reason_type_id" widget="selection" />
 
329
                        <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
 
330
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
 
331
                   </group>
 
332
                    <newline/>
 
333
                    <group expand="0" string="Group By..." colspan="4" col="8">
 
334
                        <filter string="Sale Order" name="sale_id" icon="terp-partner" domain="[]" context="{'group_by':'sale_id'}"/>
 
335
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
 
336
                        <separator orientation="vertical" />
 
337
                        <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
 
338
                        <separator orientation="vertical" />
 
339
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
 
340
                        <separator orientation="vertical" />
 
341
                        <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
 
342
                        <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
 
343
                        <separator orientation="vertical" />
 
344
                        <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"  groups="base.group_extended"/>
 
345
                    </group>
 
346
                </search>
 
347
            </field>
 
348
        </record>
 
349
        
 
350
        <!-- Added 'subtype' in domain -->
 
351
        <record id="action_draft_picking_ticket" model="ir.actions.act_window">
 
352
            <field name="name">Draft Picking Ticket</field>
 
353
            <field name="res_model">stock.picking</field>
 
354
            <field name="type">ir.actions.act_window</field>
 
355
            <field name="view_type">form</field>
 
356
            <field name="view_mode">tree,form,calendar</field>
 
357
            <field name="domain">[('type','=','out'), ('subtype', '=', 'picking'), ('state', '=', 'draft')]</field>
 
358
            <field name="context">{'contact_display':'partner_address', 'search_default_sale_id':1, 'group_by_no_leaf':0, 'group_by':'sale_id'}</field>
 
359
            <field name="search_view_id" ref="view_picking_ticket_search"/>
 
360
            <field name="help">This is the list of draft picking tickets.</field>
 
361
        </record>
 
362
        <record id="action_draft_picking_ticket_tree" model="ir.actions.act_window.view">
 
363
            <field eval="1" name="sequence"/>
 
364
            <field name="view_mode">tree</field>
 
365
            <field name="view_id" ref="view_picking_ticket_tree"/>
 
366
            <field name="act_window_id" ref="action_draft_picking_ticket"/>
 
367
        </record>
 
368
        <record id="action_draft_picking_ticket_form" model="ir.actions.act_window.view">
 
369
            <field eval="2" name="sequence"/>
 
370
            <field name="view_mode">form</field>
 
371
            <field name="view_id" ref="view_picking_ticket_form"/>
 
372
            <field name="act_window_id" ref="action_draft_picking_ticket"/>
 
373
        </record>
 
374
        <record id="action_draft_picking_ticket_cal" model="ir.actions.act_window.view">
 
375
            <field eval="3" name="sequence"/>
 
376
            <field name="view_mode">calendar</field>
 
377
            <field name="act_window_id" ref="action_draft_picking_ticket"/>
 
378
        </record>
 
379
        <!-- <menuitem action="action_draft_picking_ticket" id="menu_action_draft_picking_ticket" parent="stock.menu_stock_warehouse_mgmt" sequence="4"/> -->
 
380
 
 
381
                <!-- Added 'subtype' in domain -->
 
382
        <record id="action_picking_ticket" model="ir.actions.act_window">
 
383
            <field name="name">Picking Tickets</field>
 
384
            <field name="res_model">stock.picking</field>
 
385
            <field name="type">ir.actions.act_window</field>
 
386
            <field name="view_type">form</field>
 
387
            <field name="view_mode">tree,form,calendar</field>
 
388
            <field name="domain">[('type','=','out'), ('subtype', '=', 'picking')]</field>
 
389
            <field name="context">{'picking_screen':True, 'test':True}</field>
 
390
            <field name="search_view_id" ref="view_picking_ticket_search"/>
 
391
            <field name="help">This is the list of all picking tickets (draft and confirmed) that have to be prepared from sales orders.</field>
 
392
        </record>
 
393
        <record id="action_picking_ticket_tree" model="ir.actions.act_window.view">
 
394
            <field eval="1" name="sequence"/>
 
395
            <field name="view_mode">tree</field>
 
396
            <field name="view_id" ref="view_picking_ticket_tree"/>
 
397
            <field name="act_window_id" ref="action_picking_ticket"/>
 
398
        </record>
 
399
        <record id="action_picking_ticket_form" model="ir.actions.act_window.view">
 
400
            <field eval="2" name="sequence"/>
 
401
            <field name="view_mode">form</field>
 
402
            <field name="view_id" ref="view_picking_ticket_form"/>
 
403
            <field name="act_window_id" ref="action_picking_ticket"/>
 
404
        </record>
 
405
        <record id="action_picking_ticket_cal" model="ir.actions.act_window.view">
 
406
            <field eval="3" name="sequence"/>
 
407
            <field name="view_mode">calendar</field>
 
408
            <field name="act_window_id" ref="action_picking_ticket"/>
 
409
        </record>
 
410
        <menuitem action="action_picking_ticket" id="menu_action_picking_ticket" parent="stock.menu_stock_warehouse_mgmt" sequence="5"/>
 
411
 
 
412
        
 
413
        <!-- Changed name to 'PPL' -->
532
414
                <record id="view_ppl_tree" model="ir.ui.view">
533
 
                        <field name="name">ppl.tree</field>
534
 
                        <field name="model">stock.picking</field>
535
 
                        <field name="type">tree</field>
536
 
                        <field name="arch" type="xml">
537
 
                                <tree hide_new_button="1" hide_delete_button="1" colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Pre-Packing Lists">
538
 
                                        <field name="name"/>
539
 
                    <field name="description_ppl"/>
540
 
                                        <field name="partner_id2"/>
541
 
                                        <field name="backorder_id" />
542
 
                                        <field name="origin"/>
543
 
                                        <field name="reason_type_id" />
544
 
                                        <field name="date"/>
545
 
                                        <field name="min_date" string="Expected Pack Date" />
546
 
                                        <field name="state"/>
547
 
                                        <button name="ppl" states="assigned" string="Pack..." type="object" icon="terp-accessories-archiver"/>
548
 
                                </tree>
549
 
                        </field>
550
 
                </record>
551
 
                <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
552
 
                <!-- 'Check Availability' button available for 'draft' state -->
553
 
                <!-- Changed name to 'PPL' -->
554
 
                <!-- Add 'Flow Type' drop down list -->
555
 
                <!-- TREE -->
556
 
                <!-- Remove 'Scrap Products' button -->
557
 
                <!-- Remove 'Scrapped' -->
558
 
                <!-- Remove 'Split in production lots' -->
559
 
                <!-- Remove 'Put in current pack' -->
560
 
                <!-- Remove 'Put in a new pack' -->
561
 
                <!-- Remove 'Process' at stock.move level -->
562
 
                <!-- FORM -->
563
 
                <!-- Remove 'Scrap' button -->
564
 
                <!-- Remove 'New Pack' -->
565
 
                <!-- Remove 'tracking_id' -->
566
 
                <!-- Remove 'Split' -->
567
 
                <!-- Remove 'Process' button -->
568
 
                <!-- Added Asset Id to move tree and form -->
569
 
                <record id="view_ppl_form" model="ir.ui.view">
570
 
                        <field name="name">ppl.form</field>
571
 
                        <field name="model">stock.picking</field>
572
 
                        <field name="type">form</field>
573
 
                        <!-- without priority 'view_picking_form' from stock is used -->
574
 
                        <!-- but then other form view also use it... -->
575
 
                        <!-- <field eval="11" name="priority"/> -->
576
 
                        <field name="arch" type="xml">
577
 
                                <form hide_new_button="1" hide_duplicate_button="1" hide_delete_button="1" string="Pre-Packing List">
578
 
                                        <group col="6" colspan="4">
579
 
                                                <group colspan="4" col="4">
580
 
                                                        <field name="name" readonly="1"/>
581
 
                                                        <field name="origin" readonly="1"/>
582
 
                                                        <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)"
583
 
                                                        required="1"
584
 
                                                        attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
585
 
                                                        <field name="address_id" colspan="2" context="{'contact_display':'partner'}" attrs="{'required': [('subtype', 'in', ('picking', 'ppl'))]}" />
586
 
                                                        <field name="invoice_state" invisible="1" />
587
 
                                                        <field name="backorder_id" readonly="1" />
588
 
                                                        <field name="reason_type_id" widget="selection" domain="[('outgoing_ok', '=', True)]" attrs="{'readonly': [('from_wkf', '=', True)]}"/>
589
 
                                                        <field name="num_of_packs" />
590
 
                                                        <field name="total_volume" />
591
 
                                                        <field name="total_weight" />
592
 
                                                </group>
593
 
                                                <group colspan="2" col="2">
594
 
                                                        <field name="date" readonly="1" />
595
 
                                                        <field name="stock_journal_id" widget="selection" invisible="True" />
596
 
                                                        <field name="min_date" string="Expected Pack Date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}" />
597
 
                                                        <field name="sale_id" invisible="True" />
598
 
                                                        <field name="subtype" invisible="True" />
599
 
                                                        <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking')]}" />
600
 
                                                        <field name='ppl_customize_label' required="True" />
601
 
                                                        <field name="description_ppl"  />
602
 
                                                </group>
603
 
 
604
 
                                        </group>
605
 
                                        <notebook colspan="4">
606
 
                                                <page string="Products">
607
 
                                                        <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id}"  attrs="{'readonly': [ ('from_wkf', '=', True),('state','in',['draft','confirmed','assigned']) ]}" >
608
 
                                                                <tree string="Stock Moves" hide_new_button="True" colors="red: inactive_product==True">
609
 
                                    <field name="product_id" context="{'available_for_restriction': 'picking', 'search_default_not_restricted': 1}" />
610
 
                                                                        <field name="composition_list_id" />
611
 
                                                                        <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
612
 
                                                                        <field name="product_uom" string="UoM"/>
613
 
                                                                        <field name="product_uos" />
614
 
                                                                        <field name="asset_id" />
615
 
                                                                        <field name="prodlot_id" string="Batch Number" />
 
415
            <field name="name">ppl.tree</field>
 
416
            <field name="model">stock.picking</field>
 
417
            <field name="type">tree</field>
 
418
            <field name="arch" type="xml">
 
419
                <tree hide_new_button="1" colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date &lt; current_date" string="Pre-Packing Lists">
 
420
                    <field name="name"/>
 
421
                    <field name="partner_id"/>
 
422
                    <field name="origin"/>
 
423
                    <field name="reason_type_id" />
 
424
                    <field name="date"/>
 
425
                    <field name="min_date"/>
 
426
                    <field name="backorder_id" groups="base.group_extended"/>
 
427
                    <field name="invoice_state"/>
 
428
                    <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
 
429
                    <field name="state"/>
 
430
                    <button name="ppl" states="assigned" string="Pack..." type="object" icon="terp-accessories-archiver"/>
 
431
                </tree>
 
432
            </field>
 
433
        </record>
 
434
        
 
435
        <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
 
436
        <!-- 'Check Availability' button available for 'draft' state -->
 
437
        <!-- Changed name to 'PPL' -->
 
438
        <!-- Add 'Flow Type' drop down list -->
 
439
        <!-- TREE -->
 
440
        <!-- Remove 'Scrap Products' button -->
 
441
        <!-- Remove 'Scrapped' -->
 
442
        <!-- Remove 'Split in production lots' -->
 
443
        <!-- Remove 'Put in current pack' -->
 
444
        <!-- Remove 'Put in a new pack' -->
 
445
        <!-- Remove 'Process' at stock.move level -->
 
446
        <!-- FORM -->
 
447
        <!-- Remove 'Scrap' button -->
 
448
        <!-- Remove 'New Pack' -->
 
449
        <!-- Remove 'tracking_id' -->
 
450
        <!-- Remove 'Split' -->
 
451
        <!-- Remove 'Process' button -->
 
452
        <!-- Added Asset Id to move tree and form -->
 
453
        <record id="view_ppl_form" model="ir.ui.view">
 
454
            <field name="name">ppl.form</field>
 
455
            <field name="model">stock.picking</field>
 
456
            <field name="type">form</field>
 
457
            <!-- without priority 'view_picking_form' from stock is used -->
 
458
            <!-- but then other form view also use it... -->
 
459
            <!-- <field eval="11" name="priority"/> -->
 
460
            <field name="arch" type="xml">
 
461
                <form hide_new_button="1" hide_duplicate_button="1" hide_delete_button="1" string="Pre-Packing List">
 
462
                    <group col="6" colspan="4">
 
463
                        <group colspan="4" col="4">
 
464
                            <field name="name" readonly="1"/>
 
465
                            <field name="origin" readonly="1"/>
 
466
                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4" attrs="{'required': [('subtype', 'in', ('picking', 'ppl',))],}" />
 
467
                            <field name="invoice_state"/>
 
468
                            <field name="backorder_id" readonly="1" groups="base.group_extended"/>
 
469
                            <field name="num_of_packs" />
 
470
                            <field name="total_weight" />
 
471
                        </group>
 
472
                        <group colspan="2" col="2">
 
473
                            <field name="date"/>
 
474
                            <field name="min_date" readonly="1"/>
 
475
                            <field name="stock_journal_id" groups="base.group_extended" widget="selection" invisible="True" />
 
476
                            <field name="reason_type_id" widget="selection"/>
 
477
                            <field name="sale_id" invisible="True" />
 
478
                            <field name="subtype" invisible="True" />
 
479
                            <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking'),]}" />
 
480
                            <field name='ppl_customize_label' required="True" />
 
481
                        </group>
 
482
                    </group>
 
483
                    <notebook colspan="4">
 
484
                        <page string="Products">
 
485
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
 
486
                                <tree string="Stock Moves">
 
487
                                    <field name="product_id"/>
 
488
                                    <field name="asset_id" />
 
489
                                    <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
 
490
                                    <field name="product_uom" string="UoM"/>
 
491
                                    <field name="product_uos" groups="product.group_uos"/>
 
492
                                    <field name="prodlot_id" string="Prod. Lot" groups="base.group_extended"/>
616
493
                                                                        <field name="expired_date" />
617
494
                                                                        <field name="kc_dg" />
618
 
                                                                        <field name="location_id" string="Src. Loc" />
619
 
                                                                        <field name="location_dest_id" string="Dest. Loc" />
620
 
                                                                        <field name="qty_per_pack" />
621
 
                                                                        <field name="from_pack" />
622
 
                                                                        <field name="to_pack" />
623
 
                                                                        <field name="date" string="Actual Pack Date" />
624
 
                                                                        <field name="state"/>
625
 
 
626
 
 
627
 
                                                                        <field name="lot_check" />
628
 
                                                                        <field name="exp_check" />
629
 
                                                                        <field name="kc_check" />
630
 
                                                                        <field name="ssl_check" invisible="True" />
631
 
                                                                        <field name="dg_check" />
632
 
                                                                        <field name="np_check" />
633
 
                                                                        <field name="inactive_product" invisible="1" />
634
 
                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
635
 
                                                                </tree>
636
 
                                                                <form string="Stock Moves">
637
 
                                                                        <group colspan="2" col="4">
638
 
                                                                                <separator colspan="4" string="Move Information"/>
639
 
                                                                                <field name="name" invisible="1" colspan="4" />
640
 
                                        <field name="product_id" 
641
 
                                               context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True, 'available_for_restriction': 'picking', 'search_default_not_restricted': 1}" 
642
 
                                               on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id,parent.type,purchase_line_id,True)" 
643
 
                                               colspan="4" />
644
 
                                        <field name="composition_list_id" invisible="True" />
645
 
                                                                                <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
646
 
                                                                                <field name="product_uom" string="Unit Of Measure" colspan="2" domain="[('uom_by_product', '=', product_id)]"/>
647
 
                                                                                <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" colspan="4" />
648
 
                                                                                <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
649
 
                                                                                <field name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" invisible="1" />
650
 
                                                                        </group>
651
 
                                                                        <group colspan="2" col="2">
652
 
                                                                                <separator string="Locations" colspan="2" />
653
 
                                                                                <field name="location_id" domain="[ ('quarantine_location', '=', False),('check_prod_loc','=',[product_id,'out']), ('check_cd','in',[purchase_line_id,move_cross_docking_ok]), ('id', '!=', location_dest_id)]" readonly="1"
654
 
                                                                                context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" />
655
 
                                                                                <field name="location_dest_id" domain="[('usage','&lt;&gt;','view'), ('id', '!=', location_id)]" on_change="location_dest_change(location_dest_id, location_id)" readonly="1" />
656
 
                                                                        </group>
657
 
                                                                        <group colspan="2" col="4">
658
 
                                                                                <separator string="Traceability" colspan="4" />
659
 
                                                                                <field name="asset_id" colspan="4" />
660
 
                                                                                <field name="hidden_batch_management_mandatory" invisible="True" />
661
 
                                                                                <field name="hidden_perishable_mandatory" invisible="True" />
662
 
                                                                                <field name="prodlot_id"
663
 
                                                                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,
664
 
                                                                                'search_default_real': True}"
665
 
                                                                                domain="[('product_id','=?',product_id), ('check_type','=', True)]"
666
 
                                                                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="2"
667
 
                                                                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
 
495
                                    <field name="location_id" string="Src. Loc" />
 
496
                                    <field name="location_dest_id" string="Dest. Loc" />
 
497
                                    <field name="qty_per_pack" />
 
498
                                    <field name="from_pack" />
 
499
                                    <field name="to_pack" />
 
500
                                    <field name="date"/>
 
501
                                    <field name="state"/>
 
502
                                    <field name="kc_check" />
 
503
                                                        <field name="ssl_check" />
 
504
                                                        <field name="dg_check" />
 
505
                                                        <field name="np_check" />
 
506
                                </tree>
 
507
                                <form string="Stock Moves">
 
508
                                    <group colspan="2" col="4">
 
509
                                        <separator colspan="4" string="Move Information"/>
 
510
                                        <field name="name" invisible="1" colspan="4" />
 
511
                                        <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
 
512
                                        <field name="asset_id" />
 
513
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
 
514
                                        <field name="product_uom" string="Unit Of Measure" colspan="4" />
 
515
                                        <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" />
 
516
                                        <field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
 
517
                                        <field groups="base.group_extended" name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" />
 
518
                                    </group>
 
519
 
 
520
                                    <group colspan="2" col="2">
 
521
                                        <separator string="Locations" colspan="2" />
 
522
                                        <field name="location_id" domain="[('usage','=','internal'), ('quarantine_location', '=', False),]" />
 
523
                                        <field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]" on_change="location_dest_change(location_dest_id)" />
 
524
                                    </group>
 
525
 
 
526
                                    <group colspan="2" col="2">
 
527
                                        <separator string="Dates" colspan="2" />
 
528
                                        <field name="create_date" invisible="1"/>
 
529
                                        <field name="date"/>
 
530
                                        <field name="date_expected"/>
 
531
                                    </group>
 
532
 
 
533
                                    <group colspan="2" col="4" groups="base.group_extended">
 
534
                                        <field name="reason_type_id"  attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
 
535
                                        <separator string="Traceability" colspan="4" groups="base.group_extended"/>
 
536
                                        <field name="prodlot_id" groups="base.group_extended"
 
537
                                                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,}"
 
538
                                                                domain="[('product_id','=?',product_id), ('check_type','=', True),]"
 
539
                                                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
540
                                                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False),],}" />
 
541
                                                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
542
                                                        <field name="hidden_perishable_mandatory" invisible="True" />
668
543
                                                                                <field name="expired_date" />
669
 
                                                                                <group colspan="4" col="10">
670
 
                                                                                        <field name="lot_check" />
671
 
                                                                                        <field name="exp_check" />
672
 
                                                                                        <field name="kc_check" />
673
 
                                                                                        <field name="ssl_check" invisible="True" />
674
 
                                                                                        <field name="dg_check" />
675
 
                                                                                        <field name="np_check" />
676
 
                                                                                </group>
677
 
                                                                                <field name="reason_type_id"  attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}" widget="selection"/>
678
 
                                                                        </group>
679
 
                                                                        <group colspan="2" col="2">
680
 
                                                                                <separator string="Dates" colspan="2" />
681
 
                                                                                <field name="create_date" invisible="1"/>
682
 
                                                                                <field name="date" string="Actual Pack Date" />
683
 
                                                                                <field name="date_expected" string="Expected Pack Date" />
684
 
                                                                        </group>
685
 
                                                    <field name="purchase_line_id"  invisible="1"/>
686
 
                                                    <field name="move_cross_docking_ok"  invisible="1"/>
 
544
                                                                                <field name="kc_check" />
 
545
                                                                <field name="ssl_check" />
 
546
                                                                <field name="dg_check" />
 
547
                                                                <field name="np_check" />
 
548
                                    </group>
 
549
                                    <label string="" colspan="4"/>
 
550
                                    <field name="state"/>
 
551
                                    <group col="4" colspan="2">
 
552
                                        <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
 
553
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
 
554
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
 
555
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
 
556
                                    </group>
 
557
                                </form>
 
558
                            </field>
 
559
                            <group col="12" colspan="4">
 
560
                                <field name="state" readonly="1"/>
 
561
                                <field name="flow_type" />
 
562
                                <button name="return_products" string="Return Products..." states="confirmed,assigned" type="object" icon="gtk-undo"/>
 
563
                                <button name="action_assign" states="draft,confirmed" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
 
564
                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
 
565
                                <button name="ppl" states="assigned" string="Pack..." type="object" icon="terp-accessories-archiver"/>
 
566
                                <button name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/>
 
567
                            </group>
 
568
                        </page>
 
569
                        <page string="Additional info" groups="base.group_extended,base.group_multi_company">
 
570
                            <field name="auto_picking" groups="base.group_extended"/>
 
571
                            <field name="date_done" groups="base.group_extended"/>
 
572
                            <field name="move_type" groups="base.group_extended"/>
 
573
                            <field name="type" groups="base.group_extended"/>
 
574
                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
 
575
                        </page>
 
576
                        <page string="Notes">
 
577
                            <field colspan="4" name="note" nolabel="1"/>
 
578
                        </page>
 
579
                    </notebook>
 
580
                </form>
 
581
            </field>
 
582
        </record>
687
583
 
688
 
                                                                        <label string="" colspan="4"/>
689
 
                                                                        <field name="state"/>
690
 
                                                                        <group col="4" colspan="2">
691
 
                                                                                <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
692
 
                                                                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
693
 
                                                                                <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
694
 
                                                                        </group>
695
 
                                                                </form>
696
 
                                                        </field>
697
 
                                                        <group col="12" colspan="4">
698
 
                                                                <field name="state" readonly="1"/>
699
 
                                                                <field name="flow_type" />
700
 
                                                                <button name="ppl_return" string="Return Products..." states="confirmed,assigned" type="object" icon="gtk-undo"/>
701
 
                                                                <button name="action_assign" states="" string="Check Availability" type="object" icon="gtk-find"/>
702
 
                                                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
703
 
                                                                <button name="ppl" states="assigned" string="Pack..." type="object" icon="terp-accessories-archiver"/>
704
 
                                                                <!-- <button name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/> -->
705
 
                                                        </group>
706
 
                                                </page>
707
 
                                                <page string="Additional info">
708
 
                                                        <field name="auto_picking" invisible="1" />
709
 
                                                        <field name="date_done" />
710
 
                                                        <field name="move_type" invisible="1"/>
711
 
                                                        <field name="type" invisible="1"/>
712
 
                                                        <field name="company_id" groups="base.group_multi_company" widget="selection" invisible="1"/>
713
 
                                                </page>
714
 
                                                <page string="Notes">
715
 
                                                        <field colspan="4" name="note" nolabel="1"/>
716
 
                                                        <field  name="from_wkf" invisible="1"/>
717
 
                                                </page>
718
 
                                        </notebook>
719
 
                                </form>
720
 
                        </field>
721
 
                </record>
722
584
                <!-- Changed name to 'PPL' -->
723
 
                <record id="view_ppl_search" model="ir.ui.view">
724
 
                        <field name="name">ppl.search</field>
725
 
                        <field name="model">stock.picking</field>
726
 
                        <field name="type">search</field>
727
 
                        <field name="arch" type="xml">
728
 
                                <search string="Pre-Packing List">
729
 
                                        <group col="8" colspan="4">
730
 
                                                <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
731
 
                                                <filter icon="terp-dialog-close" name="done" string="Closed" domain="[('state','=','done')]" help="Delivery orders already processed"/>
732
 
                                                <separator orientation="vertical"/>
733
 
                                                <field name="name"/>
734
 
                                                <field name="partner_id2" />
735
 
                                                <field name="origin"/>
736
 
                                                <field name="reason_type_id" widget="selection" />
737
 
                                                <field name="company_id" widget="selection" groups="base.group_multi_company"/>
738
 
                                                <field name="date" />
739
 
                                                <field name="min_date" />
740
 
                                        </group>
741
 
                                        <newline/>
742
 
                                        <group expand="0" string="Group By..." colspan="4" col="8">
743
 
                                                <filter string="Origin" name="origin" icon="terp-partner" domain="[]" context="{'group_by':'origin'}"/>
744
 
                                                <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id2'}"/>
745
 
                                                <separator orientation="vertical" />
746
 
                                                <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
747
 
                                                <separator orientation="vertical" />
748
 
                                                <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
749
 
                                                <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
750
 
                                                <separator orientation="vertical" />
751
 
                                                <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
752
 
                                        </group>
753
 
                                </search>
754
 
                        </field>
755
 
                </record>
 
585
        <record id="view_ppl_search" model="ir.ui.view">
 
586
            <field name="name">ppl.search</field>
 
587
            <field name="model">stock.picking</field>
 
588
            <field name="type">search</field>
 
589
            <field name="arch" type="xml">
 
590
                <search string="Pre-Packing List">
 
591
                    <group col="8" colspan="4">
 
592
                        <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
 
593
                        <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Delivery Orders"/>
 
594
                        <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
 
595
                        <separator orientation="vertical"/>
 
596
                        <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" groups="base.group_extended"/>
 
597
                        <separator orientation="vertical"/>
 
598
                        <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice"/>
 
599
                        <separator orientation="vertical"/>
 
600
                        <field name="name"/>
 
601
                        <field name="partner_id" />
 
602
                        <field name="reason_type_id" widget="selection" />
 
603
                        <field name="origin"/>
 
604
                        <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
 
605
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
 
606
                   </group>
 
607
                    <newline/>
 
608
                    <group expand="0" string="Group By..." colspan="4" col="8">
 
609
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
 
610
                        <separator orientation="vertical" />
 
611
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
 
612
                        <separator orientation="vertical" />
 
613
                        <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
 
614
                        <separator orientation="vertical" />
 
615
                        <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
 
616
                        <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
 
617
                        <separator orientation="vertical" />
 
618
                        <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"  groups="base.group_extended"/>
 
619
                    </group>
 
620
                </search>
 
621
            </field>
 
622
        </record>
 
623
 
756
624
                <!-- Added 'subtype' in domain -->
757
 
                <record id="action_ppl" model="ir.actions.act_window">
758
 
                        <field name="name">Pre-Packing Lists</field>
759
 
                        <field name="res_model">stock.picking</field>
760
 
                        <field name="type">ir.actions.act_window</field>
761
 
                        <field name="view_type">form</field>
762
 
                        <field name="view_mode">tree,form,calendar</field>
763
 
                        <field name="domain">[('type','=','out'), ('subtype', '=', 'ppl')]</field>
764
 
                        <field name="context">{'contact_display': 'partner_address', 'ppl_screen':True,
765
 
                                                                   'picking_type': 'picking_ticket', 
766
 
                                                                   'search_default_available':1}</field>
767
 
                        <!-- <field name="context">{'contact_display': 'partner_address', 'ppl_screen':True, 'group_by':'origin', 'search_default_available':1}</field> -->
768
 
                        <field name="search_view_id" ref="view_ppl_search"/>
769
 
                        <field name="help">This is the list of all ppl that have been picked.</field>
770
 
                </record>
771
 
                <record id="action_ppl_tree" model="ir.actions.act_window.view">
772
 
                        <field eval="1" name="sequence"/>
773
 
                        <field name="view_mode">tree</field>
774
 
                        <field name="view_id" ref="view_ppl_tree"/>
775
 
                        <field name="act_window_id" ref="action_ppl"/>
776
 
                </record>
777
 
                <record id="action_ppl_form" model="ir.actions.act_window.view">
778
 
                        <field eval="2" name="sequence"/>
779
 
                        <field name="view_mode">form</field>
780
 
                        <field name="view_id" ref="view_ppl_form"/>
781
 
                        <field name="act_window_id" ref="action_ppl"/>
782
 
                </record>
783
 
                <record id="action_ppl_cal" model="ir.actions.act_window.view">
784
 
                        <field eval="3" name="sequence"/>
785
 
                        <field name="view_mode">calendar</field>
786
 
                        <field name="act_window_id" ref="action_ppl"/>
787
 
                </record>
788
 
                <menuitem action="action_ppl" id="menu_action_ppl" parent="menu_warehouse_deliveries" sequence="5" />
789
 
 
790
 
                <record id="view_pt_ppl_form" model="ir.ui.view">
791
 
                        <field name="name">pt.ppl.form</field>
792
 
                        <field name="model">stock.picking</field>
793
 
                        <field name="type">form</field>
794
 
                        <field name="arch" type="xml">
795
 
                                <form hide_new_button="1" hide_duplicate_button="1" hide_delete_button="1" string="Shipment preparation">
796
 
                                        <group col="6" colspan="4">
797
 
                                                <group colspan="4" col="4">
798
 
                                                        <field name="name" readonly="1"/>
799
 
                                                        <field name="origin" readonly="1"/>
800
 
                                                        <field name="partner_id2"  readonly="1" on_change="on_change_partner(partner_id2, address_id)"
801
 
                                                        required="1"
802
 
                                                         />
803
 
                                                        <field name="address_id" colspan="2" context="{'contact_display':'partner'}"  readonly="1"/>
804
 
                                                        <field name="invoice_state"/>
805
 
                                                        <field name="backorder_id" readonly="1" />
806
 
                                                        <field name="num_of_packs" attrs="{'invisible': [('subtype', 'in', ('picking'))]}"/>
807
 
                                                        <field name="total_weight" attrs="{'invisible': [('subtype', 'in', ('picking'))]}"/>
808
 
                                                </group>
809
 
                                                <group colspan="2" col="2">
810
 
                                                        <field name="date" readonly="1"/>
811
 
                                                        <field name="stock_journal_id" widget="selection" invisible="True" />
812
 
                                                        <field name="min_date" readonly="1" string="Expected Pack Date"  />
813
 
                                                        <field name="reason_type_id" widget="selection" readonly="1"/>
814
 
                                                        <field name="sale_id" invisible="True" />
815
 
                                                        <field name="subtype" invisible="True" />
816
 
                                                        <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking')]}" />
817
 
                                                        <field name='ppl_customize_label' required="True" readonly="1" attrs="{'invisible': [('subtype', 'in', ('picking'))]}"/>
818
 
                                                </group>
819
 
                                        </group>
820
 
                                        <notebook colspan="4">
821
 
                                                <page string="Products">
822
 
                                                        <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id}" readonly="1">
823
 
                                                                <tree string="Stock Moves" colors="red: inactive_product==True">
824
 
                                                                        <field name="product_id"/>
825
 
                                                                        <field name="asset_id" />
826
 
                                                                        <field name="composition_list_id" />
827
 
                                                                        <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
828
 
                                                                        <field name="product_uom" string="UoM"/>
829
 
                                                                        <field name="product_uos" />
830
 
                                                                        <field name="prodlot_id" string="Batch Number" />
831
 
                                                                        <field name="expired_date" />
832
 
                                                                        <field name="kc_dg" />
833
 
                                                                        <field name="location_id" string="Src. Loc" />
834
 
                                                                        <field name="location_dest_id" string="Dest. Loc" />
835
 
                                                                        <field name="qty_per_pack" />
836
 
                                                                        <field name="from_pack" />
837
 
                                                                        <field name="to_pack" />
838
 
                                                                        <field name="date" string="Actual Pack Date" />
839
 
                                                                        <field name="state"/>
840
 
                                                                        <field name="lot_check" />
841
 
                                                                        <field name="exp_check" />
842
 
                                                                        <field name="kc_check" />
843
 
                                                                        <field name="ssl_check" invisible="True" />
844
 
                                                                        <field name="dg_check" />
845
 
                                                                        <field name="np_check" />
846
 
                                                                        <field name="inactive_product" invisible="1" />
847
 
                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
848
 
                                                                </tree>
849
 
                                                        </field>
850
 
                                                        <group col="12" colspan="4">
851
 
                                                                <field name="state" readonly="1"/>
852
 
                                                                <field name="flow_type" />
853
 
                                                        </group>
854
 
                                                </page>
855
 
                                                <page string="Additional info">
856
 
                                                        <field name="auto_picking" readonly="1"/>
857
 
                                                        <field name="date_done" readonly="1"/>
858
 
                                                        <field name="move_type" readonly="1"/>
859
 
                                                        <field name="type" readonly="1"/>
860
 
                                                        <field name="company_id" groups="base.group_multi_company" widget="selection" readonly="1"/>
861
 
                                                </page>
862
 
                                                <page string="Notes">
863
 
                                                        <field colspan="4" name="note" nolabel="1" readonly="1"/>
864
 
                                                </page>
865
 
                                        </notebook>
866
 
                                </form>
867
 
                        </field>
868
 
                </record>
869
 
                <record id="view_pt_ppl_tree" model="ir.ui.view">
870
 
                        <field name="name">pt.ppl.tree</field>
871
 
                        <field name="model">stock.picking</field>
872
 
                        <field name="type">tree</field>
873
 
                        <field name="arch" type="xml">
874
 
                                <tree hide_new_button="1" hide_delete_button="1" colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Shipment preparation">
875
 
                                        <field name="name"/>
876
 
                                        <field name="partner_id2" />
877
 
                                        <field name="sale_id" invisible="True" />
878
 
                                        <field name="reason_type_id" />
879
 
                                        <field name="origin"/>
880
 
                                        <field name="order_category"/>
881
 
                                        <field name="overall_qty" invisible="True" />
882
 
                                        <field name="date"/>
883
 
                                        <field name="min_date" string="Expected Pick Date" />
884
 
                                        <field name="backorder_id" />
885
 
                                        <field name="invoice_state"/>
886
 
                                        <field name="stock_journal_id" widget="selection"/>
887
 
                                        <field name="state"/>
888
 
                                </tree>
889
 
                        </field>
890
 
                </record>
891
 
                <record id="action_pt_ppl" model="ir.actions.act_window">
892
 
                        <field name="name">Shipment preparation</field>
893
 
                        <field name="res_model">stock.picking</field>
894
 
                        <field name="type">ir.actions.act_window</field>
895
 
                        <field name="view_type">form</field> 
896
 
                        <field name="view_mode">tree,form</field>
897
 
                        <field name="domain">[('type','=','out'), ( 'subtype', 'in', ['picking','ppl'] )]</field>
898
 
                        <field name="context">{'group_by':'origin,state' }</field>
899
 
                        <field name="search_view_id" ref="view_pt_ppl_search"/>
900
 
                </record>
901
 
                <record id="action_pt_ppl_tree" model="ir.actions.act_window.view">
902
 
                        <field eval="1" name="sequence"/>
903
 
                        <field name="view_mode">tree</field>
904
 
                        <field name="view_id" ref="view_pt_ppl_tree"/>
905
 
                        <field name="act_window_id" ref="action_pt_ppl"/>
906
 
                </record>
907
 
                <record id="action_pt_ppl_form" model="ir.actions.act_window.view">
908
 
                        <field eval="2" name="sequence"/>
909
 
                        <field name="view_mode">form</field>
910
 
                        <field name="view_id" ref="view_pt_ppl_form"/>
911
 
                        <field name="act_window_id" ref="action_pt_ppl"/>
912
 
                </record>
913
 
                <!-- <menuitem action="action_pt_ppl" id="menu_action_pt_ppl" parent="menu_warehouse_deliveries" sequence="6" /> -->
914
 
 
915
 
                <!-- Changed name to 'Packing' -->
 
625
        <record id="action_ppl" model="ir.actions.act_window">
 
626
            <field name="name">Pre-Packing Lists</field>
 
627
            <field name="res_model">stock.picking</field>
 
628
            <field name="type">ir.actions.act_window</field>
 
629
            <field name="view_type">form</field>
 
630
            <field name="view_mode">tree,form,calendar</field>
 
631
            <field name="domain">[('type','=','out'), ('subtype', '=', 'ppl')]</field>
 
632
            <field name="context">{'contact_display': 'partner_address', 'ppl_screen':True}</field>
 
633
            <field name="search_view_id" ref="view_ppl_search"/>
 
634
            <field name="help">This is the list of all ppl that have been picked.</field>
 
635
        </record>
 
636
        <record id="action_ppl_tree" model="ir.actions.act_window.view">
 
637
            <field eval="1" name="sequence"/>
 
638
            <field name="view_mode">tree</field>
 
639
            <field name="view_id" ref="view_ppl_tree"/>
 
640
            <field name="act_window_id" ref="action_ppl"/>
 
641
        </record>
 
642
        <record id="action_ppl_form" model="ir.actions.act_window.view">
 
643
            <field eval="2" name="sequence"/>
 
644
            <field name="view_mode">form</field>
 
645
            <field name="view_id" ref="view_ppl_form"/>
 
646
            <field name="act_window_id" ref="action_ppl"/>
 
647
        </record>
 
648
        <record id="action_ppl_cal" model="ir.actions.act_window.view">
 
649
            <field eval="3" name="sequence"/>
 
650
            <field name="view_mode">calendar</field>
 
651
            <field name="act_window_id" ref="action_ppl"/>
 
652
        </record>
 
653
        <menuitem action="action_ppl" id="menu_action_ppl" parent="stock.menu_stock_warehouse_mgmt" sequence="6"/>
 
654
        
 
655
        <!-- Changed name to 'Packing' -->
916
656
                <record id="view_packing_tree" model="ir.ui.view">
917
 
                        <field name="name">packing.tree</field>
918
 
                        <field name="model">stock.picking</field>
919
 
                        <field name="type">tree</field>
920
 
                        <field name="arch" type="xml">
921
 
                                <tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and min_date &lt; current_date" string="Packing">
922
 
                                        <field name="name"/>
923
 
                                        <field name="partner_id2"/>
924
 
                                        <field name="origin"/>
925
 
                                        <field name="reason_type_id" />
926
 
                                        <field name="date"/>
927
 
                                        <field name="min_date"/>
928
 
                                        <field name="backorder_id" />
929
 
                                        <field name="invoice_state"/>
930
 
                                        <field name="stock_journal_id" widget="selection"/>
931
 
                                        <field name="state"/>
932
 
                                </tree>
933
 
                        </field>
934
 
                </record>
935
 
                <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
936
 
                <!-- 'Check Availability' button available for 'draft' state -->
937
 
                <!-- Changed name to 'Packing' -->
938
 
                <!-- Add 'Flow Type' drop down list -->
939
 
                <!-- TREE -->
940
 
                <!-- Remove 'Scrap Products' button -->
941
 
                <!-- Remove 'Scrapped' -->
942
 
                <!-- Remove 'Split in production lots' -->
943
 
                <!-- Remove 'Put in current pack' -->
944
 
                <!-- Remove 'Put in a new pack' -->
945
 
                <!-- Remove 'Process' at stock.move level -->
946
 
                <!-- FORM -->
947
 
                <!-- Remove 'Scrap' button -->
948
 
                <!-- Remove 'New Pack' -->
949
 
                <!-- Remove 'tracking_id' -->
950
 
                <!-- Remove 'Split' -->
951
 
                <!-- Remove 'Process' button -->
952
 
                <!-- Added Asset Id to move tree and form -->
953
 
                <record id="view_packing_form" model="ir.ui.view">
954
 
                        <field name="name">packing.form</field>
955
 
                        <field name="model">stock.picking</field>
956
 
                        <field name="type">form</field>
957
 
                        <!-- without priority 'view_picking_form' from stock is used -->
958
 
                        <!-- but then other form view also use it... -->
959
 
                        <!-- <field eval="11" name="priority"/> -->
960
 
                        <field name="arch" type="xml">
961
 
                                <form string="Packing">
962
 
                                        <group col="6" colspan="4">
963
 
                                                <group colspan="4" col="4">
964
 
                                                        <field name="name" readonly="1"/>
965
 
                                                        <field name="origin" readonly="1"/>
966
 
                                                        <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)"
967
 
                                                        required="1"
968
 
                                                        attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
969
 
                                                        <field name="address_id" colspan="2" context="{'contact_display':'partner'}" />
970
 
                                                        <field name="invoice_state"/>
971
 
                                                        <field name="backorder_id" readonly="1" />
972
 
                                                        <field name="shipment_id" readonly="True" />
973
 
                                                </group>
974
 
                                                <group colspan="2" col="2">
975
 
                                                        <field name="date" readonly="1" />
976
 
                                                        <field name="min_date" attrs="{'readonly': [('state', 'in', ['done', 'cancel'])]}" />
977
 
                                                        <field name="stock_journal_id" widget="selection" invisible="True" />
978
 
                                                        <field name="reason_type_id" widget="selection"/>
979
 
                                                        <field name="sale_id" invisible="True" />
980
 
                                                        <field name="subtype" invisible="True" />
981
 
                                                        <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking')]}" />
982
 
                                                </group>
983
 
                                        </group>
984
 
                                        <notebook colspan="4">
985
 
                                                <page string="Products">
986
 
                                                        <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines and [move_lines[-1]] or [], 'address_out_id': address_id}">
987
 
                                                                <tree string="Stock Moves" colors="red: inactive_product==True">
988
 
                                                                        <field name="product_id"/>
989
 
                                                                        <field name="composition_list_id" />
990
 
                                                                        <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
991
 
                                                                        <field name="product_uom" string="UoM"/>
992
 
                                                                        <field name="product_uos" />
993
 
                                                                        <field name="asset_id" />
994
 
                                                                        <field name="prodlot_id" string="Batch Number" />
995
 
                                                                        <field name="expired_date" />
 
657
            <field name="name">packing.tree</field>
 
658
            <field name="model">stock.picking</field>
 
659
            <field name="type">tree</field>
 
660
            <field name="arch" type="xml">
 
661
                <tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date &lt; current_date" string="Packing">
 
662
                    <field name="name"/>
 
663
                    <field name="partner_id"/>
 
664
                    <field name="origin"/>
 
665
                    <field name="reason_type_id" />
 
666
                    <field name="date"/>
 
667
                    <field name="min_date"/>
 
668
                    <field name="backorder_id" groups="base.group_extended"/>
 
669
                    <field name="invoice_state"/>
 
670
                    <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
 
671
                    <field name="state"/>
 
672
                    <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
 
673
                </tree>
 
674
            </field>
 
675
        </record>
 
676
        
 
677
        <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
 
678
        <!-- 'Check Availability' button available for 'draft' state -->
 
679
        <!-- Changed name to 'Packing' -->
 
680
        <!-- Add 'Flow Type' drop down list -->
 
681
        <!-- TREE -->
 
682
        <!-- Remove 'Scrap Products' button -->
 
683
        <!-- Remove 'Scrapped' -->
 
684
        <!-- Remove 'Split in production lots' -->
 
685
        <!-- Remove 'Put in current pack' -->
 
686
        <!-- Remove 'Put in a new pack' -->
 
687
        <!-- Remove 'Process' at stock.move level -->
 
688
        <!-- FORM -->
 
689
        <!-- Remove 'Scrap' button -->
 
690
        <!-- Remove 'New Pack' -->
 
691
        <!-- Remove 'tracking_id' -->
 
692
        <!-- Remove 'Split' -->
 
693
        <!-- Remove 'Process' button -->
 
694
        <!-- Added Asset Id to move tree and form -->
 
695
        <record id="view_packing_form" model="ir.ui.view">
 
696
            <field name="name">packing.form</field>
 
697
            <field name="model">stock.picking</field>
 
698
            <field name="type">form</field>
 
699
            <!-- without priority 'view_picking_form' from stock is used -->
 
700
            <!-- but then other form view also use it... -->
 
701
            <!-- <field eval="11" name="priority"/> -->
 
702
            <field name="arch" type="xml">
 
703
                <form string="Packing">
 
704
                    <group col="6" colspan="4">
 
705
                        <group colspan="4" col="4">
 
706
                            <field name="name" readonly="1"/>
 
707
                            <field name="origin" readonly="1"/>
 
708
                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
 
709
                            <field name="invoice_state"/>
 
710
                            <field name="backorder_id" readonly="1" groups="base.group_extended"/>
 
711
                            <field name="shipment_id" readonly="True" />
 
712
                        </group>
 
713
                        <group colspan="2" col="2">
 
714
                            <field name="date"/>
 
715
                            <field name="min_date" readonly="1"/>
 
716
                            <field name="stock_journal_id" groups="base.group_extended" widget="selection" invisible="True" />
 
717
                            <field name="reason_type_id" widget="selection"/>
 
718
                            <field name="sale_id" invisible="True" />
 
719
                            <field name="subtype" invisible="True" />
 
720
                            <field name="warehouse_id" attrs="{'readonly': ['|', '|', ('sale_id', '!=', False), ('state', '!=', 'draft'), ('subtype', '!=', 'picking'),]}" />
 
721
                        </group>
 
722
                    </group>
 
723
                    <notebook colspan="4">
 
724
                        <page string="Products">
 
725
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
 
726
                                <tree string="Stock Moves">
 
727
                                    <field name="product_id"/>
 
728
                                    <field name="asset_id" />
 
729
                                    <field name="product_qty" string="Qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
 
730
                                    <field name="product_uom" string="UoM"/>
 
731
                                    <field name="product_uos" groups="product.group_uos"/>
 
732
                                    <field name="prodlot_id" string="Prod. Lot" groups="base.group_extended"/>
 
733
                                    <field name="expired_date" />
996
734
                                                                        <field name="kc_dg" />
997
 
                                                                        <field name="location_id" string="Src. Loc" />
998
 
                                                                        <field name="location_dest_id" string="Dest. Loc" />
999
 
                                                                        <field name="qty_per_pack" />
1000
 
                                                                        <field name="from_pack" />
1001
 
                                                                        <field name="to_pack" />
1002
 
                                                                        <field name="num_of_packs" />
1003
 
                                                                        <field name="total_amount" />
1004
 
                                                                        <field name="currency_id" />
1005
 
                                                                        <field name="date"/>
1006
 
                                                                        <field name="state"/>
1007
 
                                                                        <field name="lot_check" />
1008
 
                                                                        <field name="exp_check" />
1009
 
                                                                        <field name="kc_check" />
1010
 
                                                                        <field name="ssl_check" invisible="True" />
1011
 
                                                                        <field name="dg_check" />
1012
 
                                                                        <field name="np_check" />
1013
 
                                                                        <field name="inactive_product" invisible="1" />
1014
 
                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
1015
 
                                                                </tree>
1016
 
                                                                <form string="Stock Moves">
1017
 
                                                                        <group colspan="2" col="4">
1018
 
                                                                                <separator colspan="4" string="Move Information"/>
1019
 
                                                                                <field name="name" invisible="1" colspan="4" />
1020
 
                                        <field name="product_id" context="{'location': location_id, 'prodlot_id': prodlot_id, 'compute_child': True}" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
1021
 
                                                                                <field name="asset_id" />
1022
 
                                        <field name="composition_list_id" invisible="True" />
1023
 
                                                                                <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
1024
 
                                                                                <field name="product_uom" string="Unit Of Measure" colspan="4" />
1025
 
                                                                                <field name="product_uos_qty" on_change="onchange_uos_quantity(product_id, product_uos_qty, product_uos, product_uom)" colspan="4" />
1026
 
                                                                                <field name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
1027
 
                                                                                <field name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" />
1028
 
                                                                        </group>
1029
 
                                                                        <group colspan="2" col="2">
1030
 
                                                                                <separator string="Locations" colspan="2" />
1031
 
                                                                                <field name="location_id" domain="[('quarantine_location', '=', False),('check_prod_loc','=',[product_id,'out']), ('id', '!=', location_dest_id)]"
1032
 
                                                                                context="{'specific_rules_tree_view': True, 'prodlot_id': prodlot_id, 'product_id': product_id, 'compute_child': False}" />
1033
 
                                                                                <field name="location_dest_id" domain="[('usage','&lt;&gt;','view'),('check_prod_loc','=',[product_id,'out']), ('id', '!=', location_id)]" on_change="location_dest_change(location_dest_id, location_id)" />
1034
 
                                                                        </group>
1035
 
                                                                        <group colspan="2" col="2">
1036
 
                                                                                <separator string="Dates" colspan="2" />
1037
 
                                                                                <field name="create_date" invisible="1"/>
1038
 
                                                                                <field name="date"/>
1039
 
                                                                                <field name="date_expected"/>
1040
 
                                                                        </group>
1041
 
                                                                        <group colspan="2" col="4">
1042
 
                                                                                <separator string="Traceability" colspan="4" />
1043
 
                                                                                <field name="reason_type_id"  attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}" widget="selection"/>
1044
 
                                                                                <field name="prodlot_id"
1045
 
                                                                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,
1046
 
                                                                                'search_default_real': True}"
1047
 
                                                                                domain="[('product_id','=?',product_id), ('check_type','=', True)]"
1048
 
                                                                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
1049
 
                                                                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False)]}" />
1050
 
                                                                                <field name="hidden_batch_management_mandatory" invisible="True" />
1051
 
                                                                                <field name="hidden_perishable_mandatory" invisible="True" />
 
735
                                    <field name="location_id" string="Src. Loc" />
 
736
                                    <field name="location_dest_id" string="Dest. Loc" />
 
737
                                    <field name="qty_per_pack" />
 
738
                                    <field name="from_pack" />
 
739
                                    <field name="to_pack" />
 
740
                                    <field name="num_of_packs" />
 
741
                                    <field name="total_amount" />
 
742
                                    <field name="currency_id" />
 
743
                                    <field name="date"/>
 
744
                                    <field name="state"/>
 
745
                                    <field name="kc_check" />
 
746
                                                        <field name="ssl_check" />
 
747
                                                        <field name="dg_check" />
 
748
                                                        <field name="np_check" />
 
749
                                </tree>
 
750
                                <form string="Stock Moves">
 
751
                                    <group colspan="2" col="4">
 
752
                                        <separator colspan="4" string="Move Information"/>
 
753
                                        <field name="name" invisible="1" colspan="4" />
 
754
                                        <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
 
755
                                        <field name="asset_id" />
 
756
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
 
757
                                        <field name="product_uom" string="Unit Of Measure" colspan="4" />
 
758
                                        <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" />
 
759
                                        <field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
 
760
                                        <field groups="base.group_extended" name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" />
 
761
                                    </group>
 
762
 
 
763
                                    <group colspan="2" col="2">
 
764
                                        <separator string="Locations" colspan="2" />
 
765
                                        <field name="location_id" domain="[('usage','=','internal'), ('quarantine_location', '=', False),]" />
 
766
                                        <field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]" on_change="location_dest_change(location_dest_id)" />
 
767
                                    </group>
 
768
 
 
769
                                    <group colspan="2" col="2">
 
770
                                        <separator string="Dates" colspan="2" />
 
771
                                        <field name="create_date" invisible="1"/>
 
772
                                        <field name="date"/>
 
773
                                        <field name="date_expected"/>
 
774
                                    </group>
 
775
 
 
776
                                    <group colspan="2" col="4" groups="base.group_extended">
 
777
                                        <separator string="Traceability" colspan="4" groups="base.group_extended"/>
 
778
                                        <field name="reason_type_id"  attrs="{'readonly': [('state', 'not in', ('draft', 'confirmed', 'assigned'))]}"/>
 
779
                                        <field name="prodlot_id" groups="base.group_extended"
 
780
                                                                context="{'location_id':location_id, 'product_id':product_id, 'hidden_perishable_mandatory': hidden_perishable_mandatory,}"
 
781
                                                                domain="[('product_id','=?',product_id), ('check_type','=', True),]"
 
782
                                                                on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"
 
783
                                                                attrs="{'readonly': [('hidden_batch_management_mandatory','=',False), ('hidden_perishable_mandatory','=',False),],}" />
 
784
                                                            <field name="hidden_batch_management_mandatory" invisible="True" />
 
785
                                                        <field name="hidden_perishable_mandatory" invisible="True" />
1052
786
                                                                                <field name="expired_date" />
1053
 
                                                                                <field name="lot_check" />
1054
 
                                                                                <field name="exp_check" />
1055
787
                                                                                <field name="kc_check" />
1056
 
                                                                                <field name="ssl_check" invisible="True" />
1057
 
                                                                                <field name="dg_check" />
1058
 
                                                                                <field name="np_check" />
1059
 
                                                                        </group>
1060
 
                                                                        <label string="" colspan="4"/>
1061
 
                                                                        <field name="state"/>
1062
 
                                                                        <group col="4" colspan="2">
1063
 
                                                                                <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
1064
 
                                                                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
1065
 
                                                                                <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
1066
 
                                                                        </group>
1067
 
                                                                </form>
1068
 
                                                        </field>
1069
 
                                                        <group col="12" colspan="4">
1070
 
                                                                <field name="state" readonly="1"/>
1071
 
                                                                <field name="flow_type" />
1072
 
                                                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel Picking" icon="gtk-cancel"/>
1073
 
                                                                <button name="action_assign" states="draft,confirmed" string="Check Availability" type="object" icon="gtk-find"/>
1074
 
                                                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
1075
 
                                                                <button name="packing" states="assigned" string="Pack..." type="object" icon="gtk-go-forward"/>
1076
 
                                                                <button name="%(stock.act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
1077
 
                                                                <!-- <button name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/> -->
1078
 
                                                        </group>
1079
 
                                                </page>
1080
 
                                                <page string="Additional info">
1081
 
                                                        <field name="auto_picking" />
1082
 
                                                        <field name="date_done" />
1083
 
                                                        <field name="move_type" />
1084
 
                                                        <field name="type" />
1085
 
                                                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
1086
 
                                                </page>
1087
 
                                                <page string="Notes">
1088
 
                                                        <field colspan="4" name="note" nolabel="1"/>
1089
 
                                                </page>
1090
 
                                        </notebook>
1091
 
                                </form>
1092
 
                        </field>
1093
 
                </record>
 
788
                                                                <field name="ssl_check" />
 
789
                                                                <field name="dg_check" />
 
790
                                                                <field name="np_check" />
 
791
                                    </group>
 
792
                                    <label string="" colspan="4"/>
 
793
                                    <field name="state"/>
 
794
                                    <group col="4" colspan="2">
 
795
                                        <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
 
796
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
 
797
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
 
798
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
 
799
                                    </group>
 
800
                                </form>
 
801
                            </field>
 
802
                            <group col="12" colspan="4">
 
803
                                <field name="state" readonly="1"/>
 
804
                                <field name="flow_type" />
 
805
                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel Picking" icon="gtk-cancel"/>
 
806
                                <button name="action_assign" states="draft,confirmed" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
 
807
                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
 
808
                                <button name="packing" states="assigned" string="Pack..." type="object" icon="gtk-go-forward"/>
 
809
                                <button name="%(stock.act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
 
810
                                <button name="%(stock.action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" icon="terp-gtk-go-back-rtl"/>
 
811
                            </group>
 
812
                        </page>
 
813
                        <page string="Additional info" groups="base.group_extended,base.group_multi_company">
 
814
                            <field name="auto_picking" groups="base.group_extended"/>
 
815
                            <field name="date_done" groups="base.group_extended"/>
 
816
                            <field name="move_type" groups="base.group_extended"/>
 
817
                            <field name="type" groups="base.group_extended"/>
 
818
                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
 
819
                        </page>
 
820
                        <page string="Notes">
 
821
                            <field colspan="4" name="note" nolabel="1"/>
 
822
                        </page>
 
823
                    </notebook>
 
824
                </form>
 
825
            </field>
 
826
        </record>
 
827
 
1094
828
                <!-- Changed name to 'Packing' -->
1095
 
                <record id="view_packing_search" model="ir.ui.view">
1096
 
                        <field name="name">packing.search</field>
1097
 
                        <field name="model">stock.picking</field>
1098
 
                        <field name="type">search</field>
1099
 
                        <field name="arch" type="xml">
1100
 
                                <search string="Packing">
1101
 
                                        <group col="8" colspan="4">
1102
 
                                                <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
1103
 
                                                <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Delivery Orders"/>
1104
 
                                                <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
1105
 
                                                <separator orientation="vertical"/>
1106
 
                                                <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" />
1107
 
                                                <separator orientation="vertical"/>
1108
 
                                                <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice"/>
1109
 
                                                <separator orientation="vertical"/>
1110
 
                                                <field name="name"/>
1111
 
                                                <field name="partner_id2" />
1112
 
                                                <field name="origin"/>
1113
 
                                                <field name="reason_type_id" widget="selection"/>
1114
 
                                                <field name="stock_journal_id" widget="selection"/>
1115
 
                                                <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1116
 
                                        </group>
1117
 
                                        <newline/>
1118
 
                                        <group expand="0" string="Group By..." colspan="4" col="8">
1119
 
                                                <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id2'}"/>
1120
 
                                                <separator orientation="vertical" />
1121
 
                                                <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1122
 
                                                <separator orientation="vertical" />
1123
 
                                                <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
1124
 
                                                <separator orientation="vertical" />
1125
 
                                                <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
1126
 
                                                <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
1127
 
                                                <separator orientation="vertical" />
1128
 
                                                <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}" />
1129
 
                                        </group>
1130
 
                                </search>
1131
 
                        </field>
1132
 
                </record>
 
829
        <record id="view_packing_search" model="ir.ui.view">
 
830
            <field name="name">packing.search</field>
 
831
            <field name="model">stock.picking</field>
 
832
            <field name="type">search</field>
 
833
            <field name="arch" type="xml">
 
834
                <search string="Packing">
 
835
                    <group col="8" colspan="4">
 
836
                        <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
 
837
                        <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Delivery Orders"/>
 
838
                        <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
 
839
                        <separator orientation="vertical"/>
 
840
                        <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" groups="base.group_extended"/>
 
841
                        <separator orientation="vertical"/>
 
842
                        <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice"/>
 
843
                        <separator orientation="vertical"/>
 
844
                        <field name="name"/>
 
845
                        <field name="partner_id" />
 
846
                        <field name="origin"/>
 
847
                        <field name="reason_type_id" />
 
848
                        <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
 
849
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
 
850
                   </group>
 
851
                    <newline/>
 
852
                    <group expand="0" string="Group By..." colspan="4" col="8">
 
853
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
 
854
                        <separator orientation="vertical" />
 
855
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
 
856
                        <separator orientation="vertical" />
 
857
                        <filter string="Reason Type" icon="terp-purchase" domain="[]" context="{'group_by':'reason_type_id'}"/>
 
858
                        <separator orientation="vertical" />
 
859
                        <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
 
860
                        <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
 
861
                        <separator orientation="vertical" />
 
862
                        <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"  groups="base.group_extended"/>
 
863
                    </group>
 
864
                </search>
 
865
            </field>
 
866
        </record>
 
867
 
1133
868
                <!-- Added 'subtype' in domain -->
1134
 
                <record id="action_packing" model="ir.actions.act_window">
1135
 
                        <field name="name">Packing (debug)</field>
1136
 
                        <field name="res_model">stock.picking</field>
1137
 
                        <field name="type">ir.actions.act_window</field>
1138
 
                        <field name="view_type">form</field>
1139
 
                        <field name="view_mode">tree,form,calendar</field>
1140
 
                        <field name="domain">[('type','=','out'), ('subtype', '=', 'packing')]</field>
1141
 
                        <field name="context">{'contact_display': 'partner_address'}</field>
1142
 
                        <field name="search_view_id" ref="view_packing_search"/>
1143
 
                        <field name="help">This is the list of all packing that have been picked.</field>
1144
 
                </record>
1145
 
                <record id="action_packing_tree" model="ir.actions.act_window.view">
1146
 
                        <field eval="1" name="sequence"/>
1147
 
                        <field name="view_mode">tree</field>
1148
 
                        <field name="view_id" ref="view_packing_tree"/>
1149
 
                        <field name="act_window_id" ref="action_packing"/>
1150
 
                </record>
1151
 
                <record id="action_packing_form" model="ir.actions.act_window.view">
1152
 
                        <field eval="2" name="sequence"/>
1153
 
                        <field name="view_mode">form</field>
1154
 
                        <field name="view_id" ref="view_packing_form"/>
1155
 
                        <field name="act_window_id" ref="action_packing"/>
1156
 
                </record>
1157
 
                <record id="action_packing_cal" model="ir.actions.act_window.view">
1158
 
                        <field eval="3" name="sequence"/>
1159
 
                        <field name="view_mode">calendar</field>
1160
 
                        <field name="act_window_id" ref="action_packing"/>
1161
 
                </record>
1162
 
                <!--<menuitem action="action_packing" id="menu_action_packing" parent="stock.menu_stock_warehouse_mgmt" sequence="6"/>-->
1163
 
 
 
869
        <record id="action_packing" model="ir.actions.act_window">
 
870
            <field name="name">Packing (debug)</field>
 
871
            <field name="res_model">stock.picking</field>
 
872
            <field name="type">ir.actions.act_window</field>
 
873
            <field name="view_type">form</field>
 
874
            <field name="view_mode">tree,form,calendar</field>
 
875
            <field name="domain">[('type','=','out'), ('subtype', '=', 'packing')]</field>
 
876
            <field name="context">{'contact_display': 'partner_address'}</field>
 
877
            <field name="search_view_id" ref="view_packing_search"/>
 
878
            <field name="help">This is the list of all packing that have been picked.</field>
 
879
        </record>
 
880
        <record id="action_packing_tree" model="ir.actions.act_window.view">
 
881
            <field eval="1" name="sequence"/>
 
882
            <field name="view_mode">tree</field>
 
883
            <field name="view_id" ref="view_packing_tree"/>
 
884
            <field name="act_window_id" ref="action_packing"/>
 
885
        </record>
 
886
        <record id="action_packing_form" model="ir.actions.act_window.view">
 
887
            <field eval="2" name="sequence"/>
 
888
            <field name="view_mode">form</field>
 
889
            <field name="view_id" ref="view_packing_form"/>
 
890
            <field name="act_window_id" ref="action_packing"/>
 
891
        </record>
 
892
        <record id="action_packing_cal" model="ir.actions.act_window.view">
 
893
            <field eval="3" name="sequence"/>
 
894
            <field name="view_mode">calendar</field>
 
895
            <field name="act_window_id" ref="action_packing"/>
 
896
        </record>
 
897
        <!-- <menuitem action="action_packing" id="menu_action_packing" parent="stock.menu_stock_warehouse_mgmt" sequence="6"/> -->
 
898
        
 
899
        
1164
900
                <!-- Shipment -->
1165
901
                <record id="view_shipment_tree" model="ir.ui.view">
1166
 
                        <field name="name">shipment.tree</field>
1167
 
                        <field name="model">shipment</field>
1168
 
                        <field name="type">tree</field>
1169
 
                        <field name="arch" type="xml">
1170
 
                <tree string="Shipment" hide_new_button="1" hide_delete_button="1" colors="blue:state in ['draft'] and (shipment_expected_date &gt; current_date or shipment_expected_date == current_date);grey:state in ['cancel'];red:state not in ['cancel', 'done'] and shipment_expected_date &lt; current_date;black:state in ['done'];green: state in ['delivered']">
1171
 
                                        <field name="name"/>
1172
 
                                        <field name="partner_id2"/>
1173
 
                                        <field name="address_id"/>
1174
 
                                        <field name="num_of_packs" />
1175
 
                                        <field name="total_weight" />
1176
 
                                        <field name="total_volume" />
1177
 
                                        <field name="total_amount" />
1178
 
                                        <field name="currency_id" />
1179
 
                                        <field name="date" />
1180
 
                                        <field name="shipment_expected_date" />
1181
 
                                        <field name="state"/>
1182
 
                                        <button name="create_shipment" states="draft" string="Create Shipment..." type="object" icon="gtk-add"/>
1183
 
                                        <button name="ship" states="packed" string="Ship" type="object" icon="gtk-redo"/>
1184
 
                                        <button name="validate" states="shipped" string="Validate" type="object" icon="gtk-apply"/>
1185
 
                                </tree>
1186
 
                        </field>
1187
 
                </record>
1188
 
                <record id="view_shipment_form" model="ir.ui.view">
1189
 
                        <field name="name">shipment.form</field>
1190
 
                        <field name="model">shipment</field>
1191
 
                        <field name="type">form</field>
1192
 
                        <field name="arch" type="xml">
1193
 
                                <form string="Shipment" hide_new_button="1" hide_duplicate_button="1" hide_delete_button="1">
1194
 
                                        <group col="6" colspan="4">
1195
 
                                                <group colspan="4" col="4">
1196
 
                                                        <field name="name" readonly="1"/>
1197
 
                                                        <field name="date" readonly="True" />
1198
 
                                                        <field name="shipment_actual_date" />
1199
 
                                                        <field name="shipment_expected_date" attrs="{'readonly': [('state', 'not in', ('draft', 'packed'))]}" />
1200
 
                                                        <field name="transport_type" />
1201
 
                                                        <field name="backshipment_id" readonly="True" />
1202
 
                                                        <field name="partner_id2" on_change="on_change_partner(partner_id2, address_id)"
1203
 
                                                                required="1"
1204
 
                                                                attrs="{'readonly': [('state', 'not in', ['draft', 'waiting', 'confirmed', 'assigned'])]}" />
1205
 
                                                        <field name="address_id" context="{'contact_display':'partner'}" />
1206
 
                                                </group>
1207
 
                                        </group>
1208
 
                                        <notebook colspan="4">
1209
 
                                                <page string="Pack Families">
1210
 
                                                        <field colspan="4" name="pack_family_memory_ids" nolabel="1" widget="one2many_list" readonly="True">
1211
 
                                                                <tree string="Pack Families">
1212
 
                                                                        <field name="sale_order_id"/>
1213
 
                                                                        <field name="ppl_id" />
1214
 
                                    <field name="description_ppl" />
1215
 
                                                                        <field name="from_pack"/>
1216
 
                                                                        <field name="to_pack"/>
1217
 
                                                                        <field name="num_of_packs" />
1218
 
                                                                        <field name="pack_type"/>
1219
 
                                                                        <field name="total_volume" />
1220
 
                                                                        <field name="weight"/>
1221
 
                                                                        <field name="total_weight" />
1222
 
                                                                        <field name="amount" />
1223
 
                                                                        <field name="total_amount" />
1224
 
                                                                        <field name="currency_id" />
1225
 
                                                                        <field name="location_id" />
1226
 
                                                                        <field name="state" />
1227
 
                                                                </tree>
1228
 
                                                                <form>
1229
 
                                                                        <field name="sale_order_id"/>
1230
 
                                                                        <field name="ppl_id" />
1231
 
                                    <field name="description_ppl" /><newline />
1232
 
                                                                        <field name="from_pack"/>
1233
 
                                                                        <field name="to_pack"/>
1234
 
                                                                        <field name="num_of_packs" />
1235
 
                                                                        <field name="pack_type"/>
1236
 
                                                                        <field name="total_volume" />
1237
 
                                                                        <field name="weight"/>
1238
 
                                                                        <field name="total_weight" />
1239
 
                                                                        <field name="amount" />
1240
 
                                                                        <field name="total_amount" />
1241
 
                                                                        <field name="currency_id" />
1242
 
                                                                        <field name="location_id" />
1243
 
                                                                        <field name="location_dest_id" />
1244
 
                                                                        <field name="state" />
1245
 
                                                                        <field name="move_lines" nolabel="True" colspan="4" mode="tree" readonly="True">
1246
 
                                                                                <tree colors="red: inactive_product==True">
1247
 
                                                                                        <field name="name" />
1248
 
                                                                                        <field name="origin" />
1249
 
                                                                                        <field name="product_id" />
1250
 
                                                                                        <field name="prodlot_id" />
1251
 
                                                                                        <field name="expired_date" />
1252
 
                                                                                        <field name="product_qty" />
1253
 
                                                                                        <field name="product_uom" />
1254
 
                                                                                        <field name="location_id" />
1255
 
                                                                                        <field name="location_dest_id" />
1256
 
                                                                                        <field name="state" />
1257
 
                                                                                        <field name="inactive_product" invisible="1" />
1258
 
                                                                <field name="inactive_error" attrs="{'invisible': [('inactive_product', '=', False)]}" />
1259
 
                                                                                </tree>
1260
 
                                                                        </field>
1261
 
                                                                </form>
1262
 
                                                        </field>
1263
 
                                                        <group col="12" colspan="4">
1264
 
                                                                <field name="state" readonly="1"/>
1265
 
                                                                <button name="return_packs" states="draft" string="Return Packs to Stock..." type="object" icon="gtk-undo"/>
1266
 
                                                                <button name="create_shipment" states="draft" string="Create Shipment..." type="object" icon="gtk-add" />
1267
 
                                                                <button name="action_cancel" states="packed" string="Cancel Shipment" type="object" icon="gtk-cancel" />
1268
 
                                                                <button name="ship" states="packed" string="Ship" type="object" icon="gtk-redo" />
1269
 
                                                                <button name="return_packs_from_shipment" states="shipped" string="Return Packs from Shipment..." type="object" icon="gtk-undo"/>
1270
 
                                                                <button name="validate" states="shipped" string="Validate" type="object" icon="gtk-apply" />
1271
 
                                                                <button name="set_delivered" icon="gtk-apply" type="object" string="Validate Delivery" attrs="{'invisible': [('state', '!=', 'done')]}" 
1272
 
                                                                confirm="Synchronization engine should confirm the delivery at the project reception, are you sure?"/>
1273
 
                                                        </group>
1274
 
                                                </page>
1275
 
                                                <page string="Additional Items" invisible="1">
1276
 
                                                    <field colspan="4" name="additional_items_ids" nolabel="1" widget="one2many_list" >
1277
 
                                                    </field>
1278
 
                                                </page>
1279
 
                                                <page string="Document Information">
1280
 
                                                        <field name="cargo_manifest_reference" />
1281
 
                                                        <field name="date_of_departure" />
1282
 
                                                        <field name="planned_date_of_arrival" />
1283
 
                                                        <field name="transit_via" />
1284
 
                                                        <field name="registration" />
1285
 
                                                        <field name="driver_name" />
1286
 
                                                </page>
1287
 
                                                <page string="Transport Information">
1288
 
                                                        <group col="2" colspan="1">
1289
 
                                                                <separator string="Shipper" colspan="2" />
1290
 
                                                                <field name="shipper_name" />
1291
 
                                                                <field name="shipper_address" />
1292
 
                                                                <field name="shipper_phone" />
1293
 
                                                                <field name="shipper_email" />
1294
 
                                                                <field name="shipper_other" />
1295
 
                                                                <field name="shipper_date" />
1296
 
                                                        </group>
1297
 
                                                        <group col="2" colspan="1">
1298
 
                                                                <separator string="Carrier" colspan="2" />
1299
 
                                                                <field name="carrier_name" />
1300
 
                                                                <field name="carrier_address" />
1301
 
                                                                <field name="carrier_phone" />
1302
 
                                                                <field name="carrier_email" />
1303
 
                                                                <field name="carrier_other" />
1304
 
                                                                <field name="carrier_date" />
1305
 
                                                        </group>
1306
 
                                                        <group col="2" colspan="1">
1307
 
                                                                <separator string="Consignee" colspan="2" />
1308
 
                                                                <field name="consignee_name" />
1309
 
                                                                <field name="consignee_address" />
1310
 
                                                                <field name="consignee_phone" />
1311
 
                                                                <field name="consignee_email" />
1312
 
                                                                <field name="consignee_other" />
1313
 
                                                                <field name="consignee_date" />
1314
 
                                                        </group>
1315
 
                                                </page>
1316
 
                                        </notebook>
1317
 
                                </form>
1318
 
                        </field>
1319
 
                </record>
1320
 
 
1321
 
        <record id="shipment_additionalitems_tree" model="ir.ui.view">
1322
 
            <field name="name">shipment.additionalitems.tree</field>
1323
 
            <field name="model">shipment.additionalitems</field>
 
902
            <field name="name">shipment.tree</field>
 
903
            <field name="model">shipment</field>
1324
904
            <field name="type">tree</field>
1325
905
            <field name="arch" type="xml">
1326
 
                    <tree string="Additional Items" editable="bottom">
1327
 
                        <field name="name"/>
1328
 
                        <field name="quantity" />
1329
 
                        <field name="uom" />
1330
 
                        <field name="comment"/>
1331
 
                        <field name="volume"/>
1332
 
                        <field name="weight" />
1333
 
                        <field name="picking_id" />
1334
 
                    </tree>
 
906
                <tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date &lt; current_date" string="Shipment">
 
907
                    <field name="name"/>
 
908
                    <field name="partner_id"/>
 
909
                    <field name="address_id"/>
 
910
                    <field name="total_amount" />
 
911
                    <field name="currency_id" />
 
912
                    <field name="num_of_packs" />
 
913
                    <field name="total_weight" />
 
914
                    <field name="date" />
 
915
                    <field name="state"/>
 
916
                    <button name="create_shipment" states="draft" string="Create Shipment..." type="object" icon="gtk-add"/>
 
917
                    <button name="ship" states="packed" string="Ship" type="object" icon="gtk-redo"/>
 
918
                    <button name="validate" states="shipped" string="Validate" type="object" icon="gtk-apply"/>
 
919
                </tree>
 
920
            </field>
 
921
        </record>
 
922
        
 
923
        <record id="view_shipment_form" model="ir.ui.view">
 
924
            <field name="name">shipment.form</field>
 
925
            <field name="model">shipment</field>
 
926
            <field name="type">form</field>
 
927
            <field name="arch" type="xml">
 
928
                <form string="Shipment">
 
929
                    <group col="6" colspan="4">
 
930
                        <group colspan="4" col="4">
 
931
                            <field name="name" readonly="1"/>
 
932
                            <field name="date" readonly="True" />
 
933
                            <field name="transport_type" />
 
934
                            <field name="partner_id" readonly="1"/>
 
935
                            <field name="backshipment_id" readonly="True" />
 
936
                        </group>
 
937
                        <group colspan="6" col="2">
 
938
                            <field name="address_id" readonly="1"/>
 
939
                        </group>
 
940
                    </group>
 
941
                    <notebook colspan="4">
 
942
                        <page string="Pack Families">
 
943
                                <field colspan="4" name="pack_family_memory_ids" nolabel="1" widget="one2many_list" readonly="True">
 
944
                                <tree string="Pack Families">
 
945
                                    <field name="sale_order_id"/>
 
946
                                    <field name="ppl_id" />
 
947
                                    <field name="from_pack"/>
 
948
                                    <field name="to_pack"/>
 
949
                                    <field name="num_of_packs" />
 
950
                                    <field name="pack_type"/>
 
951
                                    <field name="weight"/>
 
952
                                    <field name="total_weight" />
 
953
                                    <field name="amount" />
 
954
                                    <field name="total_amount" />
 
955
                                    <field name="currency_id" />
 
956
                                    <field name="location_id" />
 
957
                                    <field name="location_dest_id" />
 
958
                                    <field name="state" />
 
959
                                </tree>
 
960
                                <form>
 
961
                                        <field name="sale_order_id"/>
 
962
                                    <field name="ppl_id" />
 
963
                                    <field name="from_pack"/>
 
964
                                    <field name="to_pack"/>
 
965
                                    <field name="num_of_packs" />
 
966
                                    <field name="pack_type"/>
 
967
                                    <field name="weight"/>
 
968
                                    <field name="total_weight" />
 
969
                                    <field name="amount" />
 
970
                                    <field name="total_amount" />
 
971
                                    <field name="currency_id" />
 
972
                                    <field name="location_id" />
 
973
                                    <field name="location_dest_id" />
 
974
                                    <field name="state" />
 
975
                                        <field name="move_lines" nolabel="True" colspan="4">
 
976
                                                <tree editable="bottom">
 
977
                                                        <field name="name" />
 
978
                                                        <field name="origin" />
 
979
                                                        <field name="product_id" />
 
980
                                                        <field name="prodlot_id" />
 
981
                                                        <field name="expired_date" />
 
982
                                                        <field name="product_qty" />
 
983
                                                        <field name="product_uom" />
 
984
                                                        <field name="location_id" />
 
985
                                                        <field name="location_dest_id" />
 
986
                                                        <field name="state" />
 
987
                                                </tree>
 
988
                                        </field>
 
989
                                </form>
 
990
                            </field>
 
991
                            <group col="12" colspan="4">
 
992
                                <field name="state" readonly="1"/>
 
993
                                <button name="return_packs" states="draft" string="Return Packs to Stock..." type="object" icon="gtk-undo"/>
 
994
                                <button name="create_shipment" states="draft" string="Create Shipment..." type="object" groups="base.group_extended" icon="gtk-add" />
 
995
                                <button name="action_cancel" states="packed" string="Cancel Shipment" type="object" groups="base.group_extended" icon="gtk-cancel" />
 
996
                                <button name="ship" states="packed" string="Ship" type="object" groups="base.group_extended" icon="gtk-redo" />
 
997
                                <button name="return_packs_from_shipment" states="shipped" string="Return Packs from Shipment..." type="object" icon="gtk-undo"/>
 
998
                                <button name="validate" states="shipped" string="Validate" type="object" groups="base.group_extended" icon="gtk-apply" />
 
999
                            </group>
 
1000
                        </page>
 
1001
                        <page string="Document Information">
 
1002
                                <field name="cargo_manifest_reference" />
 
1003
                                <field name="date_of_departure" />
 
1004
                                <field name="planned_date_of_arrival" />
 
1005
                                <field name="transit_via" />
 
1006
                                <field name="registration" />
 
1007
                                <field name="driver_name" />
 
1008
                        </page>
 
1009
                        <page string="Transport Information">
 
1010
                                <group col="2" colspan="1">
 
1011
                                        <separator string="Shipper" colspan="2" />
 
1012
                                        <field name="shipper_name" />
 
1013
                                        <field name="shipper_address" />
 
1014
                                        <field name="shipper_phone" />
 
1015
                                        <field name="shipper_email" />
 
1016
                                        <field name="shipper_other" />
 
1017
                                        <field name="shipper_date" />
 
1018
                                </group>
 
1019
                                <group col="2" colspan="1">
 
1020
                                        <separator string="Carrier" colspan="2" />
 
1021
                                        <field name="carrier_name" />
 
1022
                                        <field name="carrier_address" />
 
1023
                                        <field name="carrier_phone" />
 
1024
                                        <field name="carrier_email" />
 
1025
                                        <field name="carrier_other" />
 
1026
                                        <field name="carrier_date" />
 
1027
                                </group>
 
1028
                                <group col="2" colspan="1">
 
1029
                                        <separator string="Consignee" colspan="2" />
 
1030
                                        <field name="consignee_name" />
 
1031
                                        <field name="consignee_address" />
 
1032
                                        <field name="consignee_phone" />
 
1033
                                        <field name="consignee_email" />
 
1034
                                        <field name="consignee_other" />
 
1035
                                        <field name="consignee_date" />
 
1036
                                </group>
 
1037
                        </page>
 
1038
                    </notebook>
 
1039
                </form>
1335
1040
            </field>
1336
1041
        </record>
1337
1042
 
1338
1043
                <!-- Changed name to 'Shipment' -->
1339
 
                <record id="view_shipment_search" model="ir.ui.view">
1340
 
                        <field name="name">shipment.search</field>
1341
 
                        <field name="model">shipment</field>
1342
 
                        <field name="type">search</field>
1343
 
                        <field name="arch" type="xml">
1344
 
                                <search string="Shipment">
1345
 
                                        <group col="8" colspan="4">
1346
 
                                                <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" />
1347
 
                                                <filter icon="terp-check" name="shipped" string="Shipped" domain="[('state','=','shipped')]" />
1348
 
                                                <filter icon="terp-dialog-close" name="closed" string="Closed" domain="[('state','=','done')]" />
1349
 
                                                <filter icon="gtk-yes" name="delivered" string="Delivered" domain="[('state','=','delivered')]" />
1350
 
                                                <separator orientation="vertical"/>
1351
 
                                                <filter icon="terp-folder-orange" name="empty" string="Empty" domain="[('num_of_packs','=', 0)]" />
1352
 
                                                <filter icon="terp-folder-green" name="not_empty" string="Not Empty" domain="[('num_of_packs','!=', 0)]" />
1353
 
                                                <separator orientation="vertical"/>
1354
 
                                                <field name="name"/>
1355
 
                                                <field name="partner_id2" />
1356
 
                                        </group>
1357
 
                                        <newline/>
1358
 
                                        <group expand="0" string="Group By..." colspan="4" col="8">
1359
 
                                                <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id2'}"/>
1360
 
                                                <separator orientation="vertical" />
1361
 
                                                <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1362
 
                                        </group>
1363
 
                                </search>
1364
 
                        </field>
1365
 
                </record>
1366
 
                <!-- Added 'subtype' in domain -->
1367
 
                <record id="action_shipment" model="ir.actions.act_window">
1368
 
                        <field name="name">Shipment Lists</field>
1369
 
                        <field name="res_model">shipment</field>
1370
 
                        <field name="type">ir.actions.act_window</field>
1371
 
                        <field name="view_type">form</field>
1372
 
                        <field name="view_mode">tree,form,calendar</field>
1373
 
                        <field name="domain">[]</field>
1374
 
                        <field name="context">{'packing_screen': True, 'search_default_not_empty':1, 'search_default_partner': 1}</field>
1375
 
                        <field name="search_view_id" ref="view_shipment_search"/>
1376
 
                        <field name="help">This is the list of all shipment lists that have been picked. The shipment lists are regrouped by address.</field>
1377
 
                </record>
1378
 
 
1379
 
                <record id="action_shipment_tree" model="ir.actions.act_window.view">
1380
 
                        <field eval="1" name="sequence"/>
1381
 
                        <field name="view_mode">tree</field>
1382
 
                        <field name="view_id" ref="view_shipment_tree"/>
1383
 
                        <field name="act_window_id" ref="action_shipment"/>
1384
 
                </record>
1385
 
                <record id="action_shipment_form" model="ir.actions.act_window.view">
1386
 
                        <field eval="2" name="sequence"/>
1387
 
                        <field name="view_mode">form</field>
1388
 
                        <field name="view_id" ref="view_shipment_form"/>
1389
 
                        <field name="act_window_id" ref="action_shipment"/>
1390
 
                </record>
1391
 
                <record id="action_shipment_cal" model="ir.actions.act_window.view">
1392
 
                        <field eval="3" name="sequence"/>
1393
 
                        <field name="view_mode">calendar</field>
1394
 
                        <field name="act_window_id" ref="action_shipment"/>
1395
 
                </record>
1396
 
                <menuitem action="action_shipment" id="menu_action_shipment" parent="menu_warehouse_deliveries" sequence="6"/>
1397
 
 
1398
 
 
1399
 
                <!-- Closed Shipment lines -->
1400
 
 
1401
 
        <record id="view_shipped_closed_tree" model="ir.ui.view">
1402
 
            <field name="name">Closed Shipped Lines</field>
1403
 
            <field name="model">stock.move</field>
1404
 
            <field name="type">tree</field>
 
1044
        <record id="view_shipment_search" model="ir.ui.view">
 
1045
            <field name="name">shipment.search</field>
 
1046
            <field name="model">shipment</field>
 
1047
            <field name="type">search</field>
1405
1048
            <field name="arch" type="xml">
1406
 
                <tree string="Closed shipped lines" editable="top" noteditable="1" hide_delete_button="1" hide_new_button="1">
1407
 
                    <field name="origin"/>
1408
 
                    <field name="picking_id" string="Pack"/>
1409
 
                    <field name="line_number"/>
1410
 
                    <field name="product_id"/>
1411
 
                    <field name="product_qty" />
1412
 
                    <field name="product_uom" string="UoM"/>
1413
 
                    <field name="prodlot_id"/>
1414
 
                    <field name="expired_date"/>
1415
 
                    <field name="asset_id"/>
1416
 
                    <field name="partner_id"/>
1417
 
                    <field name="date"/>
1418
 
                </tree>
 
1049
                <search string="Shipment">
 
1050
                    <group col="8" colspan="4">
 
1051
                        <filter icon="terp-document-new" name="draft" string="Draft" domain="[('state','=','draft')]" help="Draft Delivery Orders"/>
 
1052
                        <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
 
1053
                        <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Delivery Orders"/>
 
1054
                        <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
 
1055
                        <separator orientation="vertical"/>
 
1056
                        <field name="name"/>
 
1057
                        <field name="partner_id" />
 
1058
                   </group>
 
1059
                    <newline/>
 
1060
                    <group expand="0" string="Group By..." colspan="4" col="8">
 
1061
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
 
1062
                        <separator orientation="vertical" />
 
1063
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
 
1064
                    </group>
 
1065
                </search>
1419
1066
            </field>
1420
1067
        </record>
1421
1068
 
1422
 
                <record id="view_closed_shipment_search" model="ir.ui.view">
1423
 
                        <field name="name">Closed Shipment Lists</field>
1424
 
                        <field name="model">stock.move</field>
1425
 
                        <field name="type">search</field>
1426
 
                        <field name="arch" type="xml">
1427
 
                                <search string="Shipment">
1428
 
                    <field name="name"/>
1429
 
                    <field name="picking_id" string="Pack" domain="[('already_shipped','=',True), ('shipment_id','!=',False)]"/>
1430
 
                    <field name="origin"/>
1431
 
                    <field name="prodlot_id"/>
1432
 
                    <field name="asset_id"/>
1433
 
                                </search>
1434
 
                        </field>
1435
 
                </record>
1436
 
 
1437
1069
                <!-- Added 'subtype' in domain -->
1438
 
                <record id="action_closed_shipment" model="ir.actions.act_window">
1439
 
                        <field name="name">Closed Shipment Lists</field>
1440
 
                        <field name="res_model">stock.move</field>
1441
 
                        <field name="type">ir.actions.act_window</field>
1442
 
                        <field name="view_type">form</field>
1443
 
                        <field name="search_view_id" ref="view_closed_shipment_search"/>
1444
 
                <field name="view_id" ref="view_shipped_closed_tree" />
1445
 
                <field name="domain">[('state', '=', 'done'), ('origin', '!=', False), ('picking_id', '!=', False),('picking_id.already_shipped','=',True), ('picking_id.shipment_id','!=',False), ('product_qty','>', 0), ('location_dest_id.name','!=','Dispatch')]</field>
1446
 
                        <field name="help">This is the list of all shipment lines with product information</field>
1447
 
                </record>
1448
 
 
1449
 
                <menuitem action="action_closed_shipment" id="menu_action_closed_shipment" parent="menu_warehouse_deliveries" sequence="7"/>
1450
 
 
1451
 
        </data>
 
1070
        <record id="action_shipment" model="ir.actions.act_window">
 
1071
            <field name="name">Packing Lists</field>
 
1072
            <field name="res_model">shipment</field>
 
1073
            <field name="type">ir.actions.act_window</field>
 
1074
            <field name="view_type">form</field>
 
1075
            <field name="view_mode">tree,form,calendar</field>
 
1076
            <field name="domain">[]</field>
 
1077
            <field name="context">{}</field>
 
1078
            <field name="search_view_id" ref="view_shipment_search"/>
 
1079
            <field name="help">This is the list of all packing lists that have been picked. The packing lists are regrouped by address.</field>
 
1080
        </record>
 
1081
        <record id="action_shipment_tree" model="ir.actions.act_window.view">
 
1082
            <field eval="1" name="sequence"/>
 
1083
            <field name="view_mode">tree</field>
 
1084
            <field name="view_id" ref="view_shipment_tree"/>
 
1085
            <field name="act_window_id" ref="action_shipment"/>
 
1086
        </record>
 
1087
        <record id="action_shipment_form" model="ir.actions.act_window.view">
 
1088
            <field eval="2" name="sequence"/>
 
1089
            <field name="view_mode">form</field>
 
1090
            <field name="view_id" ref="view_shipment_form"/>
 
1091
            <field name="act_window_id" ref="action_shipment"/>
 
1092
        </record>
 
1093
        <record id="action_shipment_cal" model="ir.actions.act_window.view">
 
1094
            <field eval="3" name="sequence"/>
 
1095
            <field name="view_mode">calendar</field>
 
1096
            <field name="act_window_id" ref="action_shipment"/>
 
1097
        </record>
 
1098
        <menuitem action="action_shipment" id="menu_action_shipment" parent="stock.menu_stock_warehouse_mgmt" sequence="6"/>
 
1099
        
 
1100
        <!-- 
 
1101
        <record id="action_create_shipment_wizard" model="ir.actions.act_window">
 
1102
            <field name="name">Create Packing List</field>
 
1103
            <field name="res_model">shipment.wizard</field>
 
1104
            <field name="view_type">form</field>
 
1105
            <field name="view_mode">form</field>
 
1106
            <field name="target">new</field>
 
1107
            <field name="context">{'step':'create',}</field>
 
1108
        </record>
 
1109
        
 
1110
        <menuitem action="action_create_shipment_wizard"
 
1111
                  id="menu_create_shipment"
 
1112
                  parent="stock.menu_stock_warehouse_mgmt" />
 
1113
         -->
 
1114
    
 
1115
    </data>
1452
1116
</openerp>