/
stock_location_views.xml
314 lines (295 loc) · 15.4 KB
/
stock_location_views.xml
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<act_window
context="{'location': active_id, 'search_default_real_stock_available': 1, 'search_default_virtual_stock_available': 1,
'search_default_virtual_stock_negative': 1, 'search_default_real_stock_negative': 1}"
id="act_product_location_open"
name="Products"
res_model="product.product"
src_model="stock.location"/>
<record id="view_location_form" model="ir.ui.view">
<field name="name">stock.location.form</field>
<field name="model">stock.location</field>
<field name="arch" type="xml">
<form string="Stock Location" create="false">
<div class="oe_button_box" name="button_box">
<button string="Current Stock"
class="oe_stat_button"
icon="fa-building-o" name="%(location_open_quants)d" type="action"
context="{'search_default_internal_loc': 1}"/>
<button string="Products"
class="oe_stat_button"
icon="fa-filter" name="%(act_product_location_open)d" type="action"
context="{'location_id': active_id}"
/>
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
</div>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="location_id" class="oe_edit_only"/>
<h2><field name="location_id" options="{'no_create': True}"/></h2>
<group>
<group string="Additional Information">
<field name="usage"/>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="scrap_location"/>
<field name="return_location"/>
</group>
<group string="Localization" name="localization">
<field name="posx"/>
<field name="posy"/>
<field name="posz"/>
<field name="barcode"/>
</group>
<group string="Logistics" groups="stock.group_adv_location">
<field name="removal_strategy_id" options="{'no_create': True}"/>
<field name="putaway_strategy_id"/>
</group>
</group>
<field name="comment" placeholder="External note..."/>
</form>
</field>
</record>
<record id="stock_location_view_form_editable" model="ir.ui.view">
<field name="name">stock.location.form.editable</field>
<field name="model">stock.location</field>
<field name="inherit_id" ref="stock.view_location_form"/>
<field name="groups_id" eval="[(4, ref('stock.group_stock_multi_locations'))]"/>
<field name="arch" type="xml">
<xpath expr="//form" position="attributes">
<attribute name="create">true</attribute>
</xpath>
</field>
</record>
<record id="view_location_search" model="ir.ui.view">
<field name="name">stock.location.search</field>
<field name="model">stock.location</field>
<field name="arch" type="xml">
<search string="Stock Locations">
<field name="name" string="Stock Locations"/>
<filter name="in_location" string="Internal" domain="[('usage', '=', 'internal')]" help="Internal Locations"/>
<filter name="customer" string="Customer" domain="[('usage', '=', 'customer')]" help="Customer Locations"/>
<filter name="supplier" string="Vendor" domain="[('usage', '=', 'supplier')]" help="Vendor Locations"/>
<field name="location_id" string="Parent Location"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<record id="view_location_tree2" model="ir.ui.view">
<field name="name">stock.location.tree</field>
<field name="model">stock.location</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<tree string="Stock Location" decoration-info="usage=='view'" decoration-danger="usage=='internal'" create="false">
<field name="active" invisible="1"/>
<field name="display_name"/>
<field name="usage"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="stock_location_view_tree2_editable" model="ir.ui.view">
<field name="name">stock.location.tree2.editable</field>
<field name="model">stock.location</field>
<field name="inherit_id" ref="stock.view_location_tree2"/>
<field name="groups_id" eval="[(4, ref('stock.group_stock_multi_locations'))]"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="create">true</attribute>
</xpath>
</field>
</record>
<record id="action_location_form" model="ir.actions.act_window">
<field name="name">Locations</field>
<field name="res_model">stock.location</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_location_tree2"/>
<field name="search_view_id" ref="view_location_search"/>
<field name="context">{'search_default_in_location':1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a location.
</p><p>
Define your locations to reflect your warehouse structure and
organization. Odoo is able to manage physical locations
(warehouses, shelves, bin, etc), partner locations (customers,
vendors) and virtual locations which are the counterpart of
the stock operations like the manufacturing orders
consumptions, inventories, etc.
</p><p>
Every stock operation in Odoo moves the products from one
location to another one. For instance, if you receive products
from a vendor, Odoo will move products from the Vendor
location to the Stock location. Each report can be performed on
physical, partner or virtual locations.
</p>
</field>
</record>
<menuitem action="action_location_form" id="menu_action_location_form"
parent="menu_warehouse_config" sequence="2"/>
<record id="stock_location_path_filter" model="ir.ui.view">
<field name="name">stock.location.path.select</field>
<field name="model">stock.location.path</field>
<field name="arch" type="xml">
<search string="Search Stock Location Paths">
<filter string="Global" name="route_false" domain="[('route_id','=',False)]" help="If the route is global"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<record id="stock_location_path_tree" model="ir.ui.view">
<field name="name">stock.location.path.tree</field>
<field name="model">stock.location.path</field>
<field name="arch" type="xml">
<tree string="Location Paths">
<field name="sequence" widget="handle"/>
<field name="location_from_id" />
<field name="location_dest_id" />
<field name="name" />
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<record id="stock_location_path_form" model="ir.ui.view">
<field name="name">stock.location.path.form</field>
<field name="model">stock.location.path</field>
<field name="arch" type="xml">
<form string="Location Paths">
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive" groups="stock.group_adv_location">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="sequence" groups="base.group_no_one"/>
</group>
</group>
<group>
<group string="Locations">
<field name="location_from_id"/>
<field name="location_dest_id"/>
</group>
<group string="Details">
<field name="auto"/>
<field name="picking_type_id"/>
<field name="company_id" groups="base.group_multi_company" />
<label for="delay" string="Delay"/>
<div>
<field name="delay" class="oe_inline"/>days
</div>
</group>
</group>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="stolocpath">
<field name="context">{'search_default_route_false':1}</field>
<field name="name">Push Rules</field>
<field name="res_model">stock.location.path</field>
</record>
<menuitem id="menu_stock_location_path" name="Global Push Rules" parent="stock.menu_routes_config" action="stolocpath" groups="base.group_no_one" sequence="4"/>
<!--Routes-->
<record id="stock_location_route_tree" model="ir.ui.view">
<field name="name">stock.location.route.tree</field>
<field name="model">stock.location.route</field>
<field name="arch" type="xml">
<tree string="Routes">
<field name="sequence" widget="handle" />
<field name="name"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<record id="stock_location_route_form_view" model="ir.ui.view">
<field name="name">stock.location.route.form</field>
<field name="model">stock.location.route</field>
<field eval="7" name="priority" />
<field name="arch" type="xml">
<form string="Route">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive" groups="stock.group_adv_location">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</group>
<group>
<field name="sequence" string="Sequence" groups="base.group_no_one"/>
</group>
</group>
<separator string="Applicable On"/>
<p class="oe_grey">Select the places where this route can be selected</p>
<group>
<group>
<button name="view_categ_ids" for="product_categ_selectable" type="object" string="Product Categories" class="oe_link"/>
<div>
<field name="product_categ_selectable" class="oe_inline"/>
</div>
<button name="view_product_ids" for="product_selectable" type="object" string="Products" class="oe_link"/>
<div>
<field name="product_selectable" class="oe_inline"/>
</div>
</group>
<group>
<field name="warehouse_selectable" string="Warehouses"/>
<field name="warehouse_ids" widget="many2many_tags" nolabel="1"
attrs="{'readonly': [('warehouse_selectable', '=', False)]}"/>
</group>
</group>
<group string="Push Rules" colspan="4" >
<field name="push_ids" colspan="4" nolabel="1"/>
</group>
<group string="Procurement Rules" colspan="4" >
<field name="pull_ids" colspan="4" nolabel="1"/>
</group>
</sheet>
</form>
</field>
</record>
<record id="stock_location_route_view_search" model="ir.ui.view">
<field name="name">stock.location.route.search</field>
<field name="model">stock.location.route</field>
<field name="arch" type="xml">
<search string="Route">
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<record id="action_routes_form" model="ir.actions.act_window">
<field name="name">Routes</field>
<field name="res_model">stock.location.route</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="stock_location_route_tree" />
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to add a route.
</p>
<p>You can define here the main routes that run through
your warehouses and that define the flows of your products. These
routes can be assigned to a product, a product category or be fixed
on procurement or sales order. </p>
</field>
</record>
<menuitem action="action_routes_form" id="menu_stock_routes"
parent="stock.menu_routes_config" sequence="1" />
</odoo>