3
<record model="ir.ui.view" id="sandwich_product_type_view_form">
4
<field name="name">sandwich.product.type</field>
5
<field name="model">sandwich.product.type</field>
6
<field name="type">form</field>
7
<field name="arch" type="xml">
8
<form string="Product type definition">
9
<field name="name" select="1"/>
10
<field name="description" select="1" />
14
<record model="ir.ui.view" id="sandwich_product_type_view_tree">
15
<field name="name">sandwich.product.type</field>
16
<field name="model">sandwich.product.type</field>
17
<field name="type">tree</field>
18
<field name="arch" type="xml">
19
<tree string="Product type definition">
21
<field name="description"/>
26
<record model="ir.actions.act_window" id="action_sandwich_product_type">
27
<field name="name">sandwich.product.type</field>
28
<field name="res_model">sandwich.product.type</field>
29
<field name="view_type">form</field>
30
<field name="view_mode">form,tree</field>
31
<field name="domain">[]</field>
33
<menuitem name="Sandwich/Configuration/Type of product" id="menu_action_sandwich_product_type" action="action_sandwich_product_type"/>
36
<record model="ir.ui.view" id="sandwich_product_view_tree">
37
<field name="name">sandwich.product</field>
38
<field name="model">sandwich.product</field>
39
<field name="type">tree</field>
40
<field name="arch" type="xml">
41
<tree string="Product definition">
44
<field name="product_type_id"/>
48
<record model="ir.ui.view" id="sandwich_product_view_form">
49
<field name="name">sandwich.product</field>
50
<field name="model">sandwich.product</field>
51
<field name="type">form</field>
52
<field name="arch" type="xml">
53
<form string="Product definition">
54
<field name="name" select="1"/>
55
<field name="price" select="1" />
56
<field name="product_type_id" select="1"/>
61
<record model="ir.actions.act_window" id="action_sandwich_product">
62
<field name="name">sandwich.product</field>
63
<field name="res_model">sandwich.product</field>
64
<field name="view_type">form</field>
65
<field name="view_mode">tree,form</field>
66
<field name="domain">[]</field>
68
<menuitem name="Sandwich/Configuration/Product" id="menu_action_sandwich_product" action="action_sandwich_product"/>
71
<record model="ir.ui.view" id="sandwich_order_line_view_tree">
72
<field name="name">sandwich.order.line.tree</field>
73
<field name="model">sandwich.order.line</field>
74
<field name="type">tree</field>
75
<field name="arch" type="xml">
76
<tree string="Product order lines">
78
<field name="product_id"/>
79
<field name="quantity"/>
80
<field name="user_id" />
85
<record model="ir.ui.view" id="sandwich_order_line_view_form">
86
<field name="name">sandwich.order.line.form</field>
87
<field name="model">sandwich.order.line</field>
88
<field name="type">form</field>
89
<field name="arch" type="xml">
90
<form string="Product order lines">
91
<field name="product_type_id" select="1" on_change="onchange_user_id(user_id,product_type_id)"/>
92
<field name="user_id" select="1" on_change="onchange_user_id(user_id,product_type_id)"/>
93
<field name="product_id" select="1" onchange="onchange_product_id(product_id)" domain="[('product_type_id','=',product_type_id)]"/>
94
<field name="quantity" select="1"/>
95
<field name="name" select="1"/>
96
<field name="date" select="1"/>
101
<record model="ir.actions.act_window" id="action_sandwich_order_line">
102
<field name="name">sandwich.order.line</field>
103
<field name="res_model">sandwich.order.line</field>
104
<field name="view_type">form</field>
105
<field name="domain">[]</field>
106
<field name="view_id" ref="sandwich_order_line_view_form"/>
108
<menuitem name="Sandwich/Order lines" id="menu_action_sandwich_order_line" action="action_sandwich_order_line"/>
111
<record model="ir.actions.act_window" id="action_sandwich_my_order_line">
112
<field name="name">sandwich.order.line</field>
113
<field name="res_model">sandwich.order.line</field>
114
<field name="view_type">form</field>
115
<field name="view_mode">tree,form</field>
116
<field name="domain">[('user_id','=',uid)]</field>
118
<menuitem name="Sandwich/Order lines/My order lines" id="menu_action_sandwich_my_order_line" action="action_sandwich_my_order_line"/>
121
<record model="ir.actions.act_window" id="action_sandwich_my_order_line_of_the_day">
122
<field name="name">sandwich.order.line</field>
123
<field name="res_model">sandwich.order.line</field>
124
<field name="view_type">form</field>
125
<field name="view_mode">tree,form</field>
126
<field name="domain">[('user_id','=',uid),('date','=',time.strftime('%Y-%m-%d'))]</field>
128
<menuitem name="Sandwich/Order lines/My order lines/My order lines of the day" id="menu_action_sandwich_my_order_line_of_the_day" action="action_sandwich_my_order_line_of_the_day"/>
131
<record model="ir.actions.act_window" id="action_sandwich_order_line_of_the_day">
132
<field name="name">sandwich.order.line</field>
133
<field name="res_model">sandwich.order.line</field>
134
<field name="view_type">form</field>
135
<field name="view_mode">tree,form</field>
136
<field name="domain">[('date','=',time.strftime('%Y-%m-%d'))]</field>
138
<menuitem name="Sandwich/Order lines/Order lines of the day" id="menu_action_sandwich_order_line_of_the_day" action="action_sandwich_order_line_of_the_day"/>
141
<record model="ir.ui.view" id="sandwich_order_view_tree">
142
<field name="name">sandwich.order.tree</field>
143
<field name="model">sandwich.order</field>
144
<field name="type">tree</field>
145
<field name="arch" type="xml">
146
<tree string="Ordering of this day sandwich">
147
<field name="order_lines"/>
150
<field name="partner"/>
154
<record model="ir.ui.view" id="sandwich_order_view_form">
155
<field name="name">sandwich.order.form</field>
156
<field name="model">sandwich.order</field>
157
<field name="type">form</field>
158
<field name="arch" type="xml">
159
<form string="Ordering of this day sandwich">
161
<page string="Order of the day">
162
<separator string="Informations" colspan="4"/>
163
<field name="name" colspan="3" select="1"/>
164
<field name="partner" select="1"/>
165
<field name="date" select="1"/>
166
<separator string="Order lines" colspan="4"/>
167
<field name="order_lines" colspan="3" select="1"/>
169
<page string="notes">
170
<field name="note" colspan="3" select="1"/>
176
<record model="ir.actions.act_window" id="action_sandwich_order">
177
<field name="name">sandwich.order</field>
178
<field name="res_model">sandwich.order</field>
179
<field name="view_type">form</field>
180
<field name="view_mode">tree,form</field>
181
<field name="domain">[]</field>
182
<field name="view_id" eval="False"/>
184
<menuitem name="Sandwich/Today's orders" id="menu_action_sandwich_order" action="action_sandwich_order"/>