5 <menuitem id='menu_lunch' name='Lunch' />
6 <menuitem name="Lunch Menu" parent="menu_lunch" id="menu_lunch_title" sequence="50" />
7 <menuitem name="Administrate Orders" parent="menu_lunch" id="menu_lunch_admin" sequence="51" groups="group_lunch_manager"/>
8 <menuitem name="Administrate Cash Moves" parent="menu_lunch" id="menu_lunch_cash" sequence="52" groups="group_lunch_manager"/>
9 <menuitem name="Configuration" parent="menu_lunch" id="menu_lunch_config" sequence="53" groups="group_lunch_manager"/>
11 <!--View Search to group by Supplier and time-->
12 <record model="ir.ui.view" id="supplier_group_by_month_search_view">
13 <field name="name">Search</field>
14 <field name="model">lunch.order.line</field>
15 <field name="type">search</field>
16 <field name="arch" type="xml">
17 <search string="Search">
18 <filter name="group_by_supplier" string="By Supplier" context="{'group_by':'supplier'}"/>
19 <filter name="not_confirmed" string="Not Confirmed" domain="[('state','!=',('confirmed'))]"/>
20 <filter name="comfirmed" string="Confirmed" domain="[('state','=','confirmed')]"/>
21 <filter name="cancelled" string="Cancelled" domain="[('state','=','cancelled')]"/>
22 <filter name="group_by_date" string="By Date" context="{'group_by':'date'}"/>
27 <record id="view_lunch_order_filter" model="ir.ui.view">
28 <field name="name">lunch order list</field>
29 <field name="model">lunch.order.line</field>
30 <field name="arch" type="xml">
31 <search string="Search Lunch Order">
32 <filter name="group_by_supplier" string="By Supplier" context="{'group_by':'supplier'}"/>
33 <filter name="not_confirmed" string="Not Confirmed" domain="[('state','!=',('confirmed'))]"/>
34 <filter name="comfirmed" string="Confirmed" domain="[('state','=','confirmed')]"/>
35 <filter name="cancelled" string="Cancelled" domain="[('state','=','cancelled')]"/>
36 <filter name="today" string="Today" domain="[('date','=',time.strftime('%%m-%%d-%%Y'))]"/>
41 <!--View Search to group by employee and input/output (cashmoves)-->
42 <record id="view_lunch_employee_payment_filter" model="ir.ui.view">
43 <field name='name'>lunch employee payment</field>
44 <field name='model'>lunch.cashmove</field>
45 <field name='type'>search</field>
46 <field name='arch' type='xml'>
47 <search string="lunch employee payment">
48 <filter name='is_payment' string="Payment" domain="[('state','=','payment')]"/>
49 <filter name='is_mine' string="My Account" domain="[('user_id','=',uid)]"/>
54 <record id="view_lunch_cashmove_filter" model="ir.ui.view">
55 <field name='name'>lunch cashmove</field>
56 <field name='model'>lunch.cashmove</field>
57 <field name='type'>search</field>
58 <field name='arch' type='xml'>
59 <search string="lunch cashmove">
60 <filter name='group_by_user' string="By Employee" context="{'group_by':'user_id'}"/>
65 <!--View search for order-->
66 <record id="view_search_my_order" model="ir.ui.view">
67 <field name='name'>lunch orders</field>
68 <field name='model'>lunch.order</field>
69 <field name='type'>search</field>
70 <field name='arch' type='xml'>
71 <search string="lunch orders">
72 <filter name='is_mine' string="My Orders" domain="[('user_id','=',uid)]"/>
77 <!--Action for Your Orders-->
78 <record model="ir.actions.act_window" id="action_lunch_order_form">
79 <field name="name">Your Orders</field>
80 <field name="res_model">lunch.order</field>
81 <field name="view_mode">form</field>
83 <menuitem name="Your Orders" parent="menu_lunch_title" id="menu_lunch_order_form" action="action_lunch_order_form" sequence="1"/>
85 <record model="ir.actions.act_window" id="action_lunch_order_tree">
86 <field name="name">Your Orders</field>
87 <field name="res_model">lunch.order</field>
88 <field name="view_mode">tree,form</field>
89 <field name="search_view_id" ref="view_search_my_order"/>
90 <field name="context">{"search_default_is_mine":1}</field>
91 <field name="help" type="html">
92 <p class="oe_view_nocontent_create">
93 Click to create a lunch order.
96 Use lunch order if you need to order any food for your lunch.
100 <menuitem name="Previous Orders" parent="menu_lunch_title" id="menu_lunch_order_tree" action="action_lunch_order_tree" sequence="2"/>
102 <!--Action for Lunch cashmoves-->
103 <record model="ir.actions.act_window" id="action_lunch_cashmove_form">
104 <field name="name">Your Account</field>
105 <field name="res_model">lunch.cashmove</field>
106 <field name="view_mode">tree</field>
107 <field name="search_view_id" ref="view_lunch_employee_payment_filter"/>
108 <field name="context">{"search_default_is_mine":1}</field>
109 <field name="help" type="html">
111 Here you can see your cash moves. There are your orders and refund.
115 <menuitem name="Your Lunch Account" parent="menu_lunch_title" id="menu_lunch_cashmove_form" action="action_lunch_cashmove_form" sequence="3"/>
117 <!--Action for Administrate Orders group by supplier-->
118 <record model="ir.actions.act_window" id="action_lunch_order_by_supplier_form">
119 <field name="name">Orders by Supplier</field>
120 <field name="res_model">lunch.order.line</field>
121 <field name="view_mode">tree</field>
122 <field name="search_view_id" ref="view_lunch_order_filter"/>
123 <field name="context">{"search_default_group_by_supplier":1, "search_default_today":1}</field>
124 <field name="help" type="html">
126 Here you can see the orders of the day grouped by suppliers.
130 <menuitem name="Today's Orders by Supplier" parent="menu_lunch_admin" id="menu_lunch_order_by_supplier_form" action="action_lunch_order_by_supplier_form" />
132 <!--Action for control Supplier-->
133 <record model="ir.actions.act_window" id="action_lunch_control_suppliers">
134 <field name="name">Control Suppliers</field>
135 <field name="res_model">lunch.order.line</field>
136 <field name="view_mode">tree</field>
137 <field name="search_view_id" ref="supplier_group_by_month_search_view"/>
138 <field name="context">{"search_default_group_by_date":1, "search_default_group_by_supplier":1}</field>
139 <field name="help" type="html">
141 Here you can see the orders of the month grouped by suppliers.
145 <menuitem name="Orders by Supplier" parent="menu_lunch_admin" id="menu_lunch_control_suppliers" action="action_lunch_control_suppliers" />
147 <!--Action for Control Accounts-->
148 <record model="ir.actions.act_window" id="action_lunch_control_accounts">
149 <field name="name">Control Accounts</field>
150 <field name="res_model">lunch.cashmove</field>
151 <field name="view_mode">tree,form</field>
152 <field name="search_view_id" ref="view_lunch_cashmove_filter"/>
153 <field name="context">{"search_default_group_by_user":1}</field>
154 <field name="help" type="html">
155 <p class="oe_view_nocontent_create">
156 Click to create a transaction.
159 The different cash moves are used to see the orders but also the
164 <menuitem name="Control Accounts" parent="menu_lunch_cash" id="menu_lunch_control_accounts" action="action_lunch_control_accounts" />
167 <!--Action for Payment cashmove-->
168 <record model="ir.actions.act_window" id="action_lunch_cashmove">
169 <field name="name">Register Cash Moves</field>
170 <field name="res_model">lunch.cashmove</field>
171 <field name="view_mode">tree,form</field>
172 <field name="search_view_id" ref="view_lunch_employee_payment_filter"/>
173 <field name="context">{"search_default_is_payment":1}</field>
174 <field name="help" type="html">
175 <p class="oe_view_nocontent_create">
176 Click to create a payment.
179 Here you can see the employees' refund.
183 <menuitem name="Employee's Payment" parent="menu_lunch_cash" id="menu_lunch_cashmove" action="action_lunch_cashmove" />
185 <!--Action for Products-->
186 <record model="ir.actions.act_window" id="action_lunch_products">
187 <field name="name">Products</field>
188 <field name="res_model">lunch.product</field>
189 <field name="view_mode">tree,form</field>
190 <field name="help" type="html">
191 <p class="oe_view_nocontent_create">
192 Click to create a product for lunch.
195 A product is defined by its name, category, price and supplier.
199 <menuitem name="Products" parent="menu_lunch_config" id="menu_lunch_products" action="action_lunch_products" />
201 <!--Action for Product categories-->
202 <record model="ir.actions.act_window" id="action_lunch_product_categories">
203 <field name="name">Product Categories</field>
204 <field name="res_model">lunch.product.category</field>
205 <field name="view_mode">tree,form</field>
206 <field name="help" type="html">
207 <p class="oe_view_nocontent_create">
208 Click to create a lunch category.
211 Here you can find every lunch categories for products.
216 <record model="ir.ui.view" id="product_category_form_view">
217 <field name="name">Product category Form</field>
218 <field name="model">lunch.product.category</field>
219 <field name="type">form</field>
220 <field name="arch" type="xml">
221 <form string="Products Form" version="7.0">
226 <field name='name' string="Product Category: "/>
233 <menuitem name="Product Categories" parent="menu_lunch_config" id="menu_lunch_product_categories" action="action_lunch_product_categories" />
235 <!--Action for Alert-->
236 <record model="ir.actions.act_window" id="action_lunch_alert">
237 <field name="name">Alerts</field>
238 <field name="res_model">lunch.alert</field>
239 <field name="view_mode">tree,form</field>
240 <field name="help" type="html">
241 <p class="oe_view_nocontent_create">
242 Click to create a lunch alert.
245 Alerts are used to warn employee and user from possible issues about the lunch.
249 <menuitem name="Alerts" parent="menu_lunch_config" id="menu_lunch_alert" action="action_lunch_alert" />
251 <!--View for Order lines-->
252 <record model="ir.ui.view" id="orders_order_lines_tree_view">
253 <field name="name">Order lines Tree</field>
254 <field name="model">lunch.order.line</field>
255 <field name="type">tree</field>
256 <field name="arch" type="xml">
257 <tree string="Order lines Tree">
259 <field name='user_id'/>
260 <field name='supplier' invisible='1'/>
261 <field name='product_id'/>
263 <field name='state'/>
264 <field name='price' sum="Total"/>
265 <button name="confirm" string="Confirm" type="object" icon="gtk-apply" attrs="{'invisible': [('state','=','confirmed')]}"/>
266 <button name="cancel" string="Cancel" type="object" icon="gtk-cancel" attrs="{'invisible': [('state','=','cancelled')]}"/>
271 <!--View for Your orders-->
272 <record model="ir.ui.view" id="orders_tree_view">
273 <field name="name">Orders Tree</field>
274 <field name="model">lunch.order</field>
275 <field name="arch" type="xml">
276 <tree string="Orders Tree">
278 <field name="order_line_ids"/>
279 <field name="state" />
280 <field name="total" sum="Total"/>
281 <field name="preferences" invisible="1"/>
282 <field name="company_id" invisible="1"/>
287 <record model="ir.ui.view" id="orders_form_view">
288 <field name="name">Orders Form</field>
289 <field name="model">lunch.order</field>
290 <field name="arch" type="xml">
291 <form string='Orders Form' version='7.0'>
293 <field name='state' widget='statusbar' statusbar_visible='new,confirmed'/>
298 <field name='user_id'/>
299 <field name="company_id" invisible="1"/>
300 <field name='currency_id' invisible='1'/>
306 <field name='alerts' class='oe_small_textarea' attrs="{'invisible': [('state','!=','new')]}"/>
307 <separator name='pref' string='Favorites'/>
308 <div name="preferences">
310 <separator string='Your order'/>
311 <field name='order_line_ids' nolabel='1' on_change='onchange_price(order_line_ids)'>
312 <tree string='List' editable='bottom'>
313 <field name='product_id' on_change='onchange_price(product_id)'/>
314 <field name='note' />
315 <field name='price' />
316 <field name='supplier' invisible="1"/>
317 <field name="state" invisible="1"/>
320 <group class='oe_subtotal_footer oe_right'>
321 <field name='total' widget='monetary' options="{'currency_field': 'currency_id'}"/>
329 <!--View for Products-->
330 <record model="ir.ui.view" id="products_tree_view">
331 <field name="name">Products Tree</field>
332 <field name="model">lunch.product</field>
333 <field name="type">tree</field>
334 <field name="arch" type="xml">
335 <tree string="Products Tree">
337 <field name="category_id"/>
338 <field name="supplier"/>
339 <field name="description"/>
340 <field name="price"/>
341 <field name="active"/>
346 <record model="ir.ui.view" id="products_form_view">
347 <field name="name">Products Form</field>
348 <field name="model">lunch.product</field>
349 <field name="type">form</field>
350 <field name="arch" type="xml">
351 <form string="Products Form" version="7.0">
355 <group colspan="2" col="2">
357 <field name='category_id'/>
358 <field name='supplier'/>
359 <field name='price'/>
360 <field name='active'/>
362 <group colspan="2" col="2">
365 <field name='description'/>
372 <!--view for cashmove-->
373 <record model="ir.ui.view" id="casmove_tree_view">
374 <field name="name">cashmove tree</field>
375 <field name="model">lunch.cashmove</field>
376 <field name="type">tree</field>
377 <field name="arch" type="xml">
378 <tree string="cashmove tree">
380 <field name="user_id"/>
381 <field name="description"/>
382 <field name="amount" sum="Total"/>
387 <record model="ir.ui.view" id="casmove_form_view">
388 <field name="name">cashmove form</field>
389 <field name="model">lunch.cashmove</field>
390 <field name="type">form</field>
391 <field name="arch" type="xml">
392 <form string="cashmove form" version="7.0">
396 <group colspan="2" col="2">
397 <field name="user_id"/>
399 <field name="amount"/>
401 <group colspan="2" col="2">
404 <field name="description"/>
411 <!--view for alerts-->
412 <record model="ir.ui.view" id="alert_tree_view">
413 <field name="name">alert tree</field>
414 <field name="model">lunch.alert</field>
415 <field name="type">tree</field>
416 <field name="arch" type="xml">
417 <tree string="alert tree">
418 <field name="message"/>
420 <field name='active_from' widget='float_time'/>
421 <field name='active_to' widget='float_time'/>
422 <field name="lunch_active"/>
427 <record model="ir.ui.view" id="alert_form_view">
428 <field name="name">alert tree</field>
429 <field name="model">lunch.alert</field>
430 <field name="type">form</field>
431 <field name="arch" type="xml">
432 <form string="alert tree" version="7.0">
436 <separator string="Schedule Date" colspan="4"/>
437 <group col="2" colspan="2">
439 <field name="specific" attrs="{'invisible': [('day','!=','specific')]}"/>
441 <group col="2" colspan="2">
443 <group col="2" attrs="{'invisible': [('day','!=','week')]}">
444 <field name="monday"/>
445 <field name="tuesday"/>
446 <field name="wednesday"/>
447 <field name="thursday"/>
449 <group col="2" attrs="{'invisible': [('day','!=','week')]}">
450 <field name="friday"/>
451 <field name="saturday"/>
452 <field name="sunday"/>
454 <separator string="Schedule Hour" colspan="4"/>
455 <group col="2" colspan="2">
456 <field name='active_from' widget='float_time'/>
457 <field name='active_to' widget='float_time'/>
459 <group col="2" colspan="2">
461 <separator string="Alert Informations" colspan="4"/>
462 <group col="2" colspan="2">
463 <field name='lunch_active'/>
464 <field name='message' placeholder="Write the message you want to display during the defined period..."/>
466 <group col="2" colspan="2">
473 <record model='ir.ui.view' id='partner_instructor_form_view'>
474 <field name='name'>partner.supplier.name.form</field>
475 <field name='model'>res.partner</field>
476 <field name='type'>form</field>
477 <field name='inherit_id' ref='base.view_partner_form' />
478 <field name='arch' type='xml'>
479 <field name='title' position='after'>
480 <field name='supplier_lunch'/>