Files
odoo_source/addons/lunch/data/lunch_data.xml
T
Nicolas Martinelli 3d63c15a56 [MIGR] lunch: migration to the new API, cleaning and new
widget for displaying previous orders.

Detailed changes :
- previous order is not a computed field, with its own custom widget that has been designed
according the new spec for widgets;
- useless wizards have been removed, and replaced by some server actions that perform the
same action with less code and views;
- removed deprecated or incomplete reporting;
- some renaming to follow the new specifications of module coding
2015-04-23 10:27:08 +02:00

61 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="lunch_order_line_action_order" model="ir.actions.server">
<field name="name">Order meals</field>
<field name="model_id" ref="model_lunch_order_line"/>
<field name="state">code</field>
<field name="code">
if context.get('active_ids'):
self.order(cr, uid, context['active_ids'], context=context)
</field>
</record>
<record id="ir_lunch_order_line_action_order" model="ir.values">
<field name="model_id" ref="model_lunch_order_line" />
<field name="name">Order meals</field>
<field name="key2">client_action_multi</field>
<field eval="'ir.actions.server,%d'%lunch_order_line_action_order" name="value"/>
<field name="key">action</field>
<field name="model">lunch.order.line</field>
</record>
<record id="lunch_order_line_action_confirm" model="ir.actions.server">
<field name="name">Receive meals</field>
<field name="model_id" ref="model_lunch_order_line"/>
<field name="state">code</field>
<field name="code">
if context.get('active_ids'):
self.confirm(cr, uid, context['active_ids'], context=context)
</field>
</record>
<record id="ir_lunch_order_line_action_confirm" model="ir.values">
<field name="model_id" ref="model_lunch_order_line" />
<field name="name">Receive meals</field>
<field name="key2">client_action_multi</field>
<field eval="'ir.actions.server,%d'%lunch_order_line_action_confirm" name="value"/>
<field name="key">action</field>
<field name="model">lunch.order.line</field>
</record>
<record id="lunch_order_line_action_cancel" model="ir.actions.server">
<field name="name">Cancel meals</field>
<field name="model_id" ref="model_lunch_order_line"/>
<field name="state">code</field>
<field name="code">
if context.get('active_ids'):
self.cancel(cr, uid, context['active_ids'], context=context)
</field>
</record>
<record id="ir_lunch_order_line_action_cancel" model="ir.values">
<field name="model_id" ref="model_lunch_order_line" />
<field name="name">Cancel meals</field>
<field name="key2">client_action_multi</field>
<field eval="'ir.actions.server,%d'%lunch_order_line_action_cancel" name="value"/>
<field name="key">action</field>
<field name="model">lunch.order.line</field>
</record>
</odoo>