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">Lunch Order</field>
289 <field name="model">lunch.order</field>
290 <field name="arch" type="xml">
291 <form string='Orders Form' version='7.0' class="oe_lunch">
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' attrs="{'invisible': [('state','!=','new')]}" class="oe_inline oe_lunch_alert"/>
307 <div name="preferences">
309 <separator string='Your order'/>
310 <field name='order_line_ids' nolabel='1' on_change='onchange_price(order_line_ids)'>
311 <tree string='List' editable='bottom'>
312 <field name='product_id' on_change='onchange_price(product_id)'/>
313 <field name='note' />
314 <field name='price' />
315 <field name='supplier' invisible="1"/>
316 <field name="state" invisible="1"/>
319 <group class='oe_subtotal_footer oe_right'>
320 <field name='total'/> <!-- widget='monetary' options="{'currency_field': 'currency_id'}"/>-->
328 <!--View for Products-->
329 <record model="ir.ui.view" id="products_tree_view">
330 <field name="name">Products Tree</field>
331 <field name="model">lunch.product</field>
332 <field name="type">tree</field>
333 <field name="arch" type="xml">
334 <tree string="Products Tree">
336 <field name="category_id"/>
337 <field name="supplier"/>
338 <field name="description"/>
339 <field name="price"/>
340 <field name="active"/>
345 <record model="ir.ui.view" id="products_form_view">
346 <field name="name">Products Form</field>
347 <field name="model">lunch.product</field>
348 <field name="type">form</field>
349 <field name="arch" type="xml">
350 <form string="Products Form" version="7.0">
354 <group colspan="2" col="2">
356 <field name='category_id'/>
357 <field name='supplier'/>
358 <field name='price'/>
359 <field name='active'/>
361 <group colspan="2" col="2">
364 <field name='description'/>
371 <!--view for cashmove-->
372 <record model="ir.ui.view" id="casmove_tree_view">
373 <field name="name">cashmove tree</field>
374 <field name="model">lunch.cashmove</field>
375 <field name="type">tree</field>
376 <field name="arch" type="xml">
377 <tree string="cashmove tree">
379 <field name="user_id"/>
380 <field name="description"/>
381 <field name="amount" sum="Total"/>
386 <record model="ir.ui.view" id="casmove_form_view">
387 <field name="name">cashmove form</field>
388 <field name="model">lunch.cashmove</field>
389 <field name="type">form</field>
390 <field name="arch" type="xml">
391 <form string="cashmove form" version="7.0">
395 <group colspan="2" col="2">
396 <field name="user_id"/>
398 <field name="amount"/>
400 <group colspan="2" col="2">
403 <field name="description"/>
410 <!--view for alerts-->
411 <record model="ir.ui.view" id="alert_tree_view">
412 <field name="name">alert tree</field>
413 <field name="model">lunch.alert</field>
414 <field name="type">tree</field>
415 <field name="arch" type="xml">
416 <tree string="alert tree">
417 <field name="message"/>
419 <field name='active_from' widget='float_time'/>
420 <field name='active_to' widget='float_time'/>
421 <field name="lunch_active"/>
426 <record model="ir.ui.view" id="alert_form_view">
427 <field name="name">alert tree</field>
428 <field name="model">lunch.alert</field>
429 <field name="type">form</field>
430 <field name="arch" type="xml">
431 <form string="alert tree" version="7.0">
435 <separator string="Schedule Date" colspan="4"/>
436 <group col="2" colspan="2">
438 <field name="specific" attrs="{'invisible': [('day','!=','specific')]}"/>
440 <group col="2" colspan="2">
442 <group col="2" attrs="{'invisible': [('day','!=','week')]}">
443 <field name="monday"/>
444 <field name="tuesday"/>
445 <field name="wednesday"/>
446 <field name="thursday"/>
448 <group col="2" attrs="{'invisible': [('day','!=','week')]}">
449 <field name="friday"/>
450 <field name="saturday"/>
451 <field name="sunday"/>
453 <separator string="Schedule Hour" colspan="4"/>
454 <group col="2" colspan="2">
455 <field name='active_from' widget='float_time'/>
456 <field name='active_to' widget='float_time'/>
458 <group col="2" colspan="2">
460 <separator string="Alert Informations" colspan="4"/>
461 <group col="2" colspan="2">
462 <field name='lunch_active'/>
463 <field name='message' placeholder="Write the message you want to display during the defined period..."/>
465 <group col="2" colspan="2">
472 <record model='ir.ui.view' id='partner_instructor_form_view'>
473 <field name='name'>partner.supplier.name.form</field>
474 <field name='model'>res.partner</field>
475 <field name='type'>form</field>
476 <field name='inherit_id' ref='base.view_partner_form' />
477 <field name='arch' type='xml'>
478 <field name='title' position='after'>
479 <field name='supplier_lunch'/>