~pexego/openobject-addons/6.1-pexego-sale_commission

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
226
227
228
229
230
<?xml version="1.0" ?>
<openerp>
    <data>

        #
        # Returns Orders
        #

        <record id="view_picking_returns_tree" model="ir.ui.view">
            <field name="name">stock.picking.returns.tree</field>
            <field name="model">stock.picking</field>
            <field name="type">tree</field>
            <field name="priority" eval="50"/>
            <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="Returns list">
                    <field name="name"/>
                    <field name="partner_id" />
                    <field name="backorder_id" groups="base.group_extended"/>
                    <field name="origin"/>
                    <field name="date"/>
                    <field name="min_date"/>
                    <field name="invoice_state"/>
                    <field name="stock_journal_id" groups="base.group_extended" widget="selection"/>
                    <field name="state"/>
                    <button name="action_process" states="confirmed,assigned" groups="stock.group_stock_user" string="Process" type="object" icon="gtk-go-forward"/>
                    <button name="button_cancel" states="assigned,confirmed,draft" string="Cancel" icon="gtk-cancel" confirm="This operation will cancel the shipment. Do you want to continue?" />
                </tree>
            </field>
        </record>

        <record id="view_picking_returns_form" model="ir.ui.view">
            <field name="name">stock.picking.returns.form</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="priority" eval="50"/>
            <field name="arch" type="xml">
                <form string="Returns list">
                    <group colspan="4" col="6">
                        <group colspan="4" col="4">
                            <field name="name" readonly="1"/>
                            <field name="origin"/>
                            <field name="address_id" on_change="onchange_partner_in(address_id)" context="{'contact_display':'partner'}" colspan="4"/>
                            <field name="invoice_state" string="Invoice Control"/>
                            <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="General Information">
                            <field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_return_id': address_id, 'customer_address_id': address_id}" >
                                <tree colors="grey:scrapped==True" string="Stock Moves">
                                    <field name="product_id" />
                                    <field name="product_qty" />
                                    <field name="product_uom" string="UoM" />
                                    <button name="%(stock.move_scrap)d"
                                        string="Scrap Products" type="action"
                                        icon="gtk-convert" context="{'scrap': True}"
                                        states="draft,waiting,confirmed,assigned"
                                        groups="base.group_extended"/>
                                    <field name="scrapped" invisible="1"/>
                                    <field name="prodlot_id" groups="base.group_extended"/>
                                    <button
                                           name="%(stock.track_line)d"
                                           string="Split in production lots"
                                           groups="base.group_extended"
                                           type="action" icon="terp-stock_effects-object-colorize"
                                           states="draft,waiting,confirmed,assigned" />
                                    <field name="tracking_id" groups="base.group_extended"/>
                                    <button name="setlast_tracking" string="Put in current pack" type="object"
                                        groups="base.group_extended"
                                        icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
                                        states="draft,assigned,confirmed"/>
                                    <button name="%(stock.split_into)d" string="Put in a new pack" type="action"
                                        groups="base.group_extended"
                                        icon="terp-stock_effects-object-colorize"
                                        states="draft,assigned,confirmed"/>
                                    <field name="location_dest_id"/>
                                    <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 colspan="4" name="product_id" context="{'location': location_id}" on_change="onchange_product_id(product_id,location_id,location_dest_id,address_id,product_qty,prodlot_id)"/>
                                        <field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)" colspan="3"/>
                                        <button name="%(stock.move_scrap)d"
                                                string="Scrap" type="action" groups="base.group_extended"
                                                icon="gtk-convert" context="{'scrap': True}"
                                                states="draft,waiting,confirmed,assigned" colspan="1"/>
                                        <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" on_change="onchange_location_id(product_id,location_id,prodlot_id,product_qty,product_uom)" domain="[('usage','=','customer')]"/>
                                        <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="tracking_id" groups="base.group_extended" colspan="3" />
                                        <button name="%(stock.split_into)d" string="New pack" type="action"
                                              groups="base.group_extended"
                                              icon="terp-stock_effects-object-colorize"
                                              states="draft,assigned,confirmed" colspan="1"/>
                                        <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"/>
                                        <button name="%(stock.track_line)d"
                                              groups="base.group_extended"
                                              states="draft,waiting,confirmed,assigned"
                                              string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1" />
                                    </group>
                                    <label string="" colspan="4"/>
                                    <field name="state"/>
                                    <group col="4" colspan="2">
                                        <button name="action_cancel" states="assigned" string="_Cancel" 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="10" colspan="4">
                                <field name="state" readonly="1"/>
                                <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
                                <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
                                <button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-media-play"/>
                                <button name="action_assign" states="confirmed" string="Check Availability" type="object" icon="gtk-find"/>
                                <button name="force_assign" states="confirmed" string="Force Availability" type="object" groups="base.group_extended" icon="gtk-jump-to"/>
                                <button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
                                <group colspan="1" states="done">
                                    <button name="%(stock.act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
                                </group>
                                    <button states="done" 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="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>

        <record id="view_picking_returns_search" model="ir.ui.view">
            <field name="name">stock.picking.returns.search</field>
            <field name="model">stock.picking</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Returns list">
                    <group col="8" colspan="4">
                        <filter icon="terp-check" name="available" string="Available" domain="[('state','=','assigned')]" help="Returns Available" />
                        <filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Returns 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"/>
                        <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="Extended Filters..." colspan="4" col="8">
                        <filter string="To invoice" name="to_invoice" icon="terp-dolar" domain="[('invoice_state', '=', '2binvoiced')]" />
                    </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 icon="terp-stock_effects-object-colorize" name="state" string="State" 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>

        <record id="action_picking_return_tree" model="ir.actions.act_window">
            <field name="name">Returning Products</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','=','return')]</field>
        </record>
        <record id="action_picking_return_tree_return_view1_waiting" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_picking_returns_tree"/>
            <field name="act_window_id" ref="action_picking_return_tree"/>
        </record>
        <record id="action_picking_return_tree_out_view2_waiting" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_picking_returns_form"/>
            <field name="act_window_id" ref="action_picking_return_tree"/>
        </record>
        <record id="action_picking_return_tree_out_view2_waiting_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_return_tree"/>
        </record>
        <menuitem action="action_picking_return_tree" id="menu_action_return_picking_tree" parent="stock.menu_stock_warehouse_mgmt" sequence="25"/>

    </data>
</openerp>