123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?xml version="1.0" encoding="utf-8"?>
- <odoo>
- <record id="lunch_alert_view_search" model="ir.ui.view">
- <field name="name">lunch.alert.search</field>
- <field name="model">lunch.alert</field>
- <field name="arch" type="xml">
- <search string="Search">
- <field name="message"/>
- <filter name="inactive_today" string="Currently inactive" domain="[('available_today', '=', False)]"/>
- <separator/>
- <filter name="active" string="Active" domain="[('active', '=', True)]"/>
- <filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
- </search>
- </field>
- </record>
- <record id="lunch_alert_view_tree" model="ir.ui.view">
- <field name="name">lunch.alert.tree</field>
- <field name="model">lunch.alert</field>
- <field name="arch" type="xml">
- <tree>
- <field name="name"/>
- <field name="mode"/>
- <field name="message" invisible="1"/>
- <field name="available_today"/>
- <field name="active" widget="boolean_toggle"/>
- </tree>
- </field>
- </record>
- <record id="lunch_alert_view_form" model="ir.ui.view">
- <field name="name">lunch.alert.form</field>
- <field name="model">lunch.alert</field>
- <field name="arch" type="xml">
- <form string="alert form">
- <sheet>
- <div class="oe_title" name="title">
- <label for="name"/>
- <h1>
- <field name="name" placeholder="e.g. Order before 11am"/>
- </h1>
- </div>
- <group>
- <group>
- <field name="mode" widget="radio"/>
- <field name="recipients" attrs="{'invisible': [['mode', '!=', 'chat']]}" widget="radio"/>
- <field name="location_ids" widget="many2many_tags" required="1"/>
- <field name="until"/>
- <field name="active" widget="boolean_toggle"/>
- </group>
- <group>
- <div class="o_td_label">
- <label for="notification_time" attrs="{'invisible': [['mode', '!=', 'chat']]}"/>
- </div>
- <div class="o_col">
- <widget name="week_days"/>
- <div class="o_row" attrs="{'invisible': [['mode', '!=', 'chat']]}">
- <field name="notification_time" attrs="{'required': [('mode', '=', 'chat')]}" widget="float_time"/>
- <field name="notification_moment"/>
- </div>
- </div>
- <field name="tz" groups="base.group_no_one"/>
- </group>
- <group>
- <field name="message"/>
- </group>
- </group>
- </sheet>
- </form>
- </field>
- </record>
- <record id="lunch_alert_view_kanban" model="ir.ui.view">
- <field name="name">lunch.alert.kanban</field>
- <field name="model">lunch.alert</field>
- <field name="arch" type="xml">
- <kanban class="o_kanban_mobile">
- <templates>
- <t t-name="kanban-box">
- <div class="oe_kanban_card oe_kanban_global_click">
- <div class="oe_kanban_content">
- <div class="o_kanban_record_top">
- <div class="o_kanban_record_headings">
- <strong class="o_kanban_record_title"><field name="name"/></strong>
- <span><br/><field name="mode"/></span>
- <span attrs="{'invisible':[['mode', '!=', 'chat']]}">
- to <field name="recipients"/>
- on <field name="notification_time"/>
- <field name="notification_moment"/>
- </span>
- </div>
- </div>
- <div class="o_kanban_record_body">
- <field name="location_ids" widget="many2many_tags"/>
- </div>
- </div>
- </div>
- </t>
- </templates>
- </kanban>
- </field>
- </record>
- <record id="lunch_alert_action" model="ir.actions.act_window">
- <field name="name">Lunch Alerts</field>
- <field name="res_model">lunch.alert</field>
- <field name="search_view_id" ref="lunch_alert_view_search"/>
- <field name="view_mode">tree,form,kanban</field>
- <field name="domain">['|', ('active', '=', True), ('active', '=', False)]</field>
- <field name="context">{}</field>
- <field name="view_id" ref="lunch_alert_view_tree"/>
- <field name="help" type="html">
- <p class="o_view_nocontent_smiling_face">
- Create new lunch alerts
- </p>
- </field>
- </record>
- </odoo>
|