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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
    
    	<!-- delete outgoing delivery menuitem -->
    	<delete model="ir.ui.menu" id="stock.menu_action_picking_tree"/>
    	
    	<!-- Changed name to 'Picking Tickets' -->
		<record id="view_picking_ticket_tree" model="ir.ui.view">
            <field name="name">picking.ticket.tree</field>
            <field name="model">stock.picking</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="blue:state in ('draft');grey:state in ('cancel');red:state not in ('cancel', 'done') and date &lt; current_date" string="Picking Tickets">
                    <field name="name"/>
                    <field name="partner_id"/>
                    <field name="origin"/>
                    <field name="date"/>
                    <field name="min_date"/>
                    <field name="backorder_id" groups="base.group_extended"/>
                    <field name="invoice_state"/>
                    <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                    <field name="state"/>
                    <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
                </tree>
            </field>
        </record>
        
        <!-- Remove 'Process Later' (draft_force_assign) and 'Process Now' (draft_validate) buttons -->
        <!-- 'Check Availability' button available for 'draft' state -->
        <!-- Add 'Create Picking...' button -->
        <!-- Changed name to 'Picking Ticket' -->
        <!-- Add 'Flow Type' drop down list -->
        <!-- TREE -->
        <!-- Remove 'Scrap Products' button -->
        <!-- Remove 'Scrapped' -->
        <!-- Remove 'Split in production lots' -->
        <!-- Remove 'Put in current pack' -->
        <!-- Remove 'Put in a new pack' -->
        <!-- Remove 'Process' at stock.move level -->
        <!-- FORM -->
        <!-- Remove 'Scrap' button -->
        <!-- Remove 'New Pack' -->
        <!-- Remove 'tracking_id' -->
        <!-- Remove 'Split' -->
        <record id="view_picking_ticket_form" model="ir.ui.view">
            <field name="name">picking.ticket.form</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <!-- without priority 'view_picking_form' from stock is used -->
            <!-- but then other form view also use it... -->
            <!-- <field eval="11" name="priority"/> -->
            <field name="arch" type="xml">
                <form string="Picking Ticket">
                    <group col="6" colspan="4">
                        <group colspan="4" col="4">
                            <field name="name" readonly="1"/>
                            <field name="origin" readonly="1"/>
                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
                            <field name="invoice_state"/>
                            <field name="backorder_id" readonly="1" groups="base.group_extended"/>
                        </group>
                        <group colspan="2" col="2">
                            <field name="date"/>
                            <field name="min_date" readonly="1"/>
                            <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                        </group>
                    </group>
                    <notebook colspan="4">
                        <page string="Products">
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_out_id': address_id}">
                                <tree colors="grey:scrapped==True" string="Stock Moves">
                                    <field name="product_id"/>
                                    <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
                                    <field name="product_uom" string="UoM"/>
                                    <field name="product_uos" groups="product.group_uos"/>
                                    <field name="prodlot_id" groups="base.group_extended"/>
                                    <field name="tracking_id" groups="base.group_extended"/>
                                    <field name="location_id"/>
                                    <field name="virtual_available" />
                                    <field name="date"/>
                                    <field name="state"/>
                                </tree>
                                <form string="Stock Moves">
                                    <group colspan="2" col="4">
                                        <separator colspan="4" string="Move Information"/>
                                        <field name="name" invisible="1" colspan="4" />
                                        <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id, parent.address_id)" colspan="4" />
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" />
                                        <field name="product_uom" string="Unit Of Measure" colspan="4" />
                                        <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" />
                                        <field groups="product.group_uos" name="product_uos" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="4" />
                                        <field groups="base.group_extended" name="product_packaging"  domain="[('product_id','=',product_id)]" colspan="4" />
                                    </group>

                                    <group colspan="2" col="2">
                                        <separator string="Locations" colspan="2" />
                                        <field name="location_id" domain="[('usage','=','internal')]" />
                                        <field name="location_dest_id" domain="[('usage','&lt;&gt;','view')]" />
                                    </group>

                                    <group colspan="2" col="2">
                                        <separator string="Dates" colspan="2" />
                                        <field name="create_date" invisible="1"/>
                                        <field name="date"/>
                                        <field name="date_expected"/>
                                    </group>

                                    <group colspan="2" col="4" groups="base.group_extended">
                                        <separator string="Traceability" colspan="4" groups="base.group_extended"/>
                                        <field name="prodlot_id" groups="base.group_extended"
                                            context="{'location_id':location_id, 'product_id':product_id}"
                                            domain="[('product_id','=?',product_id)]"
                                            on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"/>
                                    </group>
                                    <label string="" colspan="4"/>
                                    <field name="state"/>
                                    <group col="4" colspan="2">
                                        <button name="action_cancel" states="assigned" string="Cancel Move" type="object" icon="gtk-cancel"/>
                                        <button name="action_confirm" states="draft" string="Confirm" type="object" icon="gtk-apply"/>
                                        <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
                                        <button name="cancel_assign" states="assigned" string="Cancel Availability" type="object" icon="gtk-find"/>
                                    </group>
                                </form>
                            </field>
                            <group col="12" colspan="4">
                                <field name="state" readonly="1"/>
                                <field name="flow_type" />
                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel Picking" icon="gtk-cancel"/>
                                <button name="action_assign" states="draft,confirmed" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
                                <button name="create_picking" states="draft" string="Create Picking..." type="object" groups="base.group_extended" icon="gtk-add" />
                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
                                <button name="%(stock.act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
                                <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"/>
                            </group>
                        </page>
                        <page string="Additional info" groups="base.group_extended,base.group_multi_company">
                            <field name="auto_picking" groups="base.group_extended"/>
                            <field name="date_done" groups="base.group_extended"/>
                            <field name="move_type" groups="base.group_extended"/>
                            <field name="type" groups="base.group_extended"/>
                            <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                        </page>
                        <page string="Notes">
                            <field colspan="4" name="note" nolabel="1"/>
                        </page>
                    </notebook>
                </form>
            </field>
        </record>

		<!-- Changed name to 'Picking Tickets' -->
        <record id="view_picking_ticket_search" model="ir.ui.view">
            <field name="name">picking.ticket.search</field>
            <field name="model">stock.picking</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Picking Tickets">
                    <group col="8" colspan="4">
                        <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Assigned Delivery Orders"/>
                        <filter icon="terp-camera_test" name="confirmed" string="Confirmed" domain="[('state','=','confirmed')]" help="Confirmed Delivery Orders"/>
                        <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Delivery orders already processed"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-accessories-archiver-minus" string="Back Orders" domain="[('backorder_id', '!=', False)]" help="Is a Back Order" groups="base.group_extended"/>
                        <separator orientation="vertical"/>
                        <filter icon="terp-dolar" name="to_invoice" string="To Invoice" domain="[('invoice_state','=','2binvoiced')]" help="Delivery orders to invoice"/>
                        <separator orientation="vertical"/>
                        <field name="name"/>
                        <field name="partner_id" />
                        <field name="origin"/>
                        <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                   </group>
                    <newline/>
                    <group expand="0" string="Group By..." colspan="4" col="8">
                        <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
                        <separator orientation="vertical" />
                        <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                        <separator orientation="vertical" />
                        <filter string="Order Date" icon="terp-go-month" domain="[]"  context="{'group_by':'date'}"/>
                        <filter string="Expected Date" icon="terp-go-month" domain="[]"  context="{'group_by':'min_date'}"/>
                        <separator orientation="vertical" />
                        <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'stock_journal_id'}"  groups="base.group_extended"/>
                    </group>
                </search>
            </field>
        </record>

		<!-- Added 'subtype' in domain -->
        <record id="action_picking_ticket" model="ir.actions.act_window">
            <field name="name">Picking Ticket</field>
            <field name="res_model">stock.picking</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar</field>
            <field name="domain">[('type','=','out'), ('subtype', '=', 'picking')]</field>
            <field name="context">{'contact_display': 'partner_address'}</field>
            <field name="search_view_id" ref="view_picking_ticket_search"/>
            <field name="help">This is the list of all picking tickets (draft and confirmed) that have to be prepared from sales orders.</field>
        </record>
        <record id="action_picking_ticket_tree" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_picking_ticket_tree"/>
            <field name="act_window_id" ref="action_picking_ticket"/>
        </record>
        <record id="action_picking_ticket_form" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_picking_ticket_form"/>
            <field name="act_window_id" ref="action_picking_ticket"/>
        </record>
        <record id="action_picking_ticket_cal" model="ir.actions.act_window.view">
            <field eval="3" name="sequence"/>
            <field name="view_mode">calendar</field>
            <field name="act_window_id" ref="action_picking_ticket"/>
        </record>
        <menuitem action="action_picking_ticket" id="menu_action_picking_ticket" parent="stock.menu_stock_warehouse_mgmt" sequence="4"/>

       	
    
    
    </data>
</openerp>