188 lines
7.2 KiB
XML
188 lines
7.2 KiB
XML
<terp>
|
|
<data>
|
|
<record model="ir.ui.view" id="sandwich_product_type_view_form">
|
|
<field name="name">sandwich.product.type</field>
|
|
<field name="model">sandwich.product.type</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Product type definition">
|
|
<field name="name" select="1"/>
|
|
<field name="description" select="1" />
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="sandwich_product_type_view_tree">
|
|
<field name="name">sandwich.product.type</field>
|
|
<field name="model">sandwich.product.type</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Product type definition">
|
|
<field name="name"/>
|
|
<field name="description"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_sandwich_product_type">
|
|
<field name="name">sandwich.product.type</field>
|
|
<field name="res_model">sandwich.product.type</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">form,tree</field>
|
|
<field name="domain">[]</field>
|
|
</record>
|
|
<menuitem name="Sandwich/Configuration/Type of product" id="menu_action_sandwich_product_type" action="action_sandwich_product_type"/>
|
|
|
|
|
|
<record model="ir.ui.view" id="sandwich_product_view_tree">
|
|
<field name="name">sandwich.product</field>
|
|
<field name="model">sandwich.product</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Product definition">
|
|
<field name="name"/>
|
|
<field name="price"/>
|
|
<field name="product_type_id"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="sandwich_product_view_form">
|
|
<field name="name">sandwich.product</field>
|
|
<field name="model">sandwich.product</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Product definition">
|
|
<field name="name" select="1"/>
|
|
<field name="price" select="1" />
|
|
<field name="product_type_id" select="1"/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_sandwich_product">
|
|
<field name="name">sandwich.product</field>
|
|
<field name="res_model">sandwich.product</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[]</field>
|
|
</record>
|
|
<menuitem name="Sandwich/Configuration/Product" id="menu_action_sandwich_product" action="action_sandwich_product"/>
|
|
|
|
|
|
<record model="ir.ui.view" id="sandwich_order_line_view_tree">
|
|
<field name="name">sandwich.order.line.tree</field>
|
|
<field name="model">sandwich.order.line</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Product order lines">
|
|
<field name="date"/>
|
|
<field name="product_id"/>
|
|
<field name="quantity"/>
|
|
<field name="user_id" />
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="sandwich_order_line_view_form">
|
|
<field name="name">sandwich.order.line.form</field>
|
|
<field name="model">sandwich.order.line</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Product order lines">
|
|
<field name="product_type_id" select="1" on_change="onchange_user_id(user_id,product_type_id)"/>
|
|
<field name="user_id" select="1" on_change="onchange_user_id(user_id,product_type_id)"/>
|
|
<field name="product_id" select="1" onchange="onchange_product_id(product_id)" domain="[('product_type_id','=',product_type_id)]"/>
|
|
<field name="quantity" select="1"/>
|
|
<field name="name" select="1"/>
|
|
<field name="date" select="1"/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record model="ir.actions.act_window" id="action_sandwich_order_line">
|
|
<field name="name">sandwich.order.line</field>
|
|
<field name="res_model">sandwich.order.line</field>
|
|
<field name="view_type">form</field>
|
|
<field name="domain">[]</field>
|
|
<field name="view_id" ref="sandwich_order_line_view_form"/>
|
|
</record>
|
|
<menuitem name="Sandwich/Order lines" id="menu_action_sandwich_order_line" action="action_sandwich_order_line"/>
|
|
|
|
|
|
<record model="ir.actions.act_window" id="action_sandwich_my_order_line">
|
|
<field name="name">sandwich.order.line</field>
|
|
<field name="res_model">sandwich.order.line</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('user_id','=',uid)]</field>
|
|
</record>
|
|
<menuitem name="Sandwich/Order lines/My order lines" id="menu_action_sandwich_my_order_line" action="action_sandwich_my_order_line"/>
|
|
|
|
|
|
<record model="ir.actions.act_window" id="action_sandwich_my_order_line_of_the_day">
|
|
<field name="name">sandwich.order.line</field>
|
|
<field name="res_model">sandwich.order.line</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('user_id','=',uid),('date','=',time.strftime('%Y-%m-%d'))]</field>
|
|
</record>
|
|
<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"/>
|
|
|
|
|
|
<record model="ir.actions.act_window" id="action_sandwich_order_line_of_the_day">
|
|
<field name="name">sandwich.order.line</field>
|
|
<field name="res_model">sandwich.order.line</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[('date','=',time.strftime('%Y-%m-%d'))]</field>
|
|
</record>
|
|
<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"/>
|
|
|
|
|
|
<record model="ir.ui.view" id="sandwich_order_view_tree">
|
|
<field name="name">sandwich.order.tree</field>
|
|
<field name="model">sandwich.order</field>
|
|
<field name="type">tree</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Ordering of this day sandwich">
|
|
<field name="order_lines"/>
|
|
<field name="name"/>
|
|
<field name="note"/>
|
|
<field name="partner"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record model="ir.ui.view" id="sandwich_order_view_form">
|
|
<field name="name">sandwich.order.form</field>
|
|
<field name="model">sandwich.order</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Ordering of this day sandwich">
|
|
<notebook>
|
|
<page string="Sandwich Order">
|
|
<separator string="Informations" colspan="4"/>
|
|
<field name="name" colspan="3" select="1"/>
|
|
<field name="partner" select="1"/>
|
|
<field name="date" select="1"/>
|
|
<separator string="Order lines" colspan="4"/>
|
|
<field name="order_lines" colspan="3"/>
|
|
</page>
|
|
<page string="notes">
|
|
<field name="note" colspan="4" nolabel="1" select="1"/>
|
|
</page>
|
|
</notebook>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record model="ir.actions.act_window" id="action_sandwich_order">
|
|
<field name="name">sandwich.order</field>
|
|
<field name="res_model">sandwich.order</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="domain">[]</field>
|
|
<field name="view_id" eval="False"/>
|
|
</record>
|
|
<menuitem name="Sandwich/Today's orders" id="menu_action_sandwich_order" action="action_sandwich_order"/>
|
|
</data>
|
|
</terp>
|
|
|