[IMP] account: Merge the opening_control and closing_control flags in cash_control
[odoo/odoo.git] / addons / point_of_sale / wizard / pos_session_opening.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <openerp>
3     <data>
4         <record model="ir.ui.view" id="pos_session_opening_form_view">
5             <field name="name">pos.session.opening.form.view</field>
6             <field name="model">pos.session.opening</field>
7             <field name="arch" type="xml">
8                 <form string="PoS Session Opening" version="7.0">
9                     <field name="show_config" invisible="1" />
10                     <separator string="Select your Point of Sale" colspan="4" attrs="{'invisible' : [('show_config', '=', False)]}" />
11                     <group attrs="{'invisible' : [('show_config', '=', False)]}">
12                         <field name="pos_config_id" on_change="on_change_config(pos_config_id)"
13                             widget="selection" domain="[('state','=','active')]"
14                             class="oe_inline"/>
15                         <field name="pos_state" class="oe_inline" attrs="{'invisible' : [('pos_state', '=', False)]}" />
16                     </group>
17                     <field name="pos_session_id" invisible="1"/>
18                     <button name="open_ui" type="object" string="Start Selling" 
19                         attrs="{'invisible' : [('pos_state', 'not in', ('opened',))]}" 
20                         class="oe_highlight"
21                     />
22                     <button name="open_existing_session_cb" type="object" string="Open Session" 
23                         attrs="{'invisible' : [('pos_state', 'not in', ('opening_control',))]}" 
24                         class="oe_highlight"
25                     />
26                     <button name="open_existing_session_cb_close" type="object" string="Close Session" 
27                         attrs="{'invisible' : [('pos_state', 'not in', ('opened',))]}" 
28                     />
29                     <button name="open_existing_session_cb" type="object" string="Close Session" 
30                         attrs="{'invisible' : [('pos_state', 'not in', ('closing_control',))]}" 
31                         class="oe_highlight"
32                     />
33                     <button name="open_session_cb" type="object" string="New Session" 
34                         attrs="{'invisible' : ['|', ('pos_state', '!=', False),('pos_config_id','=',False)]}"
35                         class="oe_highlight"
36                     />
37
38                     <div attrs="{'invisible' : ['|', ('pos_state', '!=', False),('pos_config_id','=',False)]}" class="oe_view_nocontent">
39                         <p class="oe_view_nocontent_create">
40                           Click to start a session.
41                         </p><p>
42                           You will first have to control your cash amount in your cash register.
43                           Then you will be able to open the session and start selling with the touchscreen
44                           interface.
45                         </p>
46                     </div>
47
48                 </form>
49             </field>
50         </record>
51
52         <record id="action_pos_session_opening" model="ir.actions.act_window">
53             <field name="name">Your Session</field>
54             <field name="type">ir.actions.act_window</field>
55             <field name="res_model">pos.session.opening</field>
56             <field name="view_type">form</field>
57             <field name="view_mode">form</field>
58             <field name="target">inline</field>
59         </record>
60     </data>
61 </openerp>