Files
odoo_source/addons/lunch/data/lunch_data.xml
T
William Braeckman e8dc76ee0b [IMP] lunch: add possibility to notify users on lunch arrival
There was no way for the lunch manager to notify users that their meal
had arrived prior to this commit besides manually sending a message to
the concerned users.
There now is a dedicated button after the order has been confirmed by
the lunch manager to send notifications.

TaskId-2587476

closes odoo/odoo#78649

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-26 14:11:00 +00:00

68 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="lunch_location_main" model="lunch.location" forcecreate="0">
<field name="name">HQ Office</field>
</record>
<record model="lunch.product.category" id="categ_sandwich" forcecreate="0">
<field name="name">Sandwich</field>
</record>
<record id="categ_pizza" model="lunch.product.category" forcecreate="0">
<field name="name">Pizza</field>
<field name="image_1920" type="base64" file="lunch/static/img/pizza.png"/>
</record>
<record id="categ_burger" model="lunch.product.category" forcecreate="0">
<field name="name">Burger</field>
<field name="image_1920" type="base64" file="lunch/static/img/burger.png"/>
</record>
<record id="categ_drinks" model="lunch.product.category" forcecreate="0">
<field name="name">Drinks</field>
<field name="image_1920" type="base64" file="lunch/static/img/drink.png"/>
</record>
<record id="partner_hungry_dog" model="res.partner" forcecreate="0">
<field name="name">Lunch Supplier</field>
</record>
<record id="supplier_hungry_dog" model="lunch.supplier" forcecreate="0">
<field name="partner_id" ref="partner_hungry_dog"/>
<field name="available_location_ids" eval="[
(6, 0, [ref('lunch_location_main')]),
]"/>
</record>
</data>
<data>
<record id="lunch_order_action_confirm" model="ir.actions.server">
<field name="name">Lunch: Receive meals</field>
<field name="model_id" ref="model_lunch_order"/>
<field name="binding_model_id" ref="model_lunch_order"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">records.action_confirm()</field>
</record>
<record id="lunch_order_action_cancel" model="ir.actions.server">
<field name="name">Lunch: Cancel meals</field>
<field name="model_id" ref="model_lunch_order"/>
<field name="binding_model_id" ref="model_lunch_order"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">records.action_cancel()</field>
</record>
<record id="lunch_order_action_notify" model="ir.actions.server">
<field name="name">Lunch: Send notifications</field>
<field name="model_id" ref="model_lunch_order"/>
<field name="binding_model_id" ref="model_lunch_order"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">records.action_notify()</field>
</record>
</data>
</odoo>