summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
Diffstat (limited to 'addons')
-rw-r--r--addons/lunch/views/lunch_alert_views.xml33
-rw-r--r--addons/lunch/views/lunch_location_views.xml28
-rw-r--r--addons/lunch/views/lunch_product_views.xml38
3 files changed, 96 insertions, 3 deletions
diff --git a/addons/lunch/views/lunch_alert_views.xml b/addons/lunch/views/lunch_alert_views.xml
index ea8b838aca0..27fa6d939da 100644
--- a/addons/lunch/views/lunch_alert_views.xml
+++ b/addons/lunch/views/lunch_alert_views.xml
@@ -72,11 +72,42 @@
</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</field>
+ <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"/>
diff --git a/addons/lunch/views/lunch_location_views.xml b/addons/lunch/views/lunch_location_views.xml
index 7eb13fb98cf..1a921732f66 100644
--- a/addons/lunch/views/lunch_location_views.xml
+++ b/addons/lunch/views/lunch_location_views.xml
@@ -41,10 +41,36 @@
</field>
</record>
+ <record id="lunch_location_kanban_view" model="ir.ui.view">
+ <field name="name">lunch.location.view.kanban</field>
+ <field name="model">lunch.location</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>
+ </div>
+ </div>
+ <div class="o_kanban_record_body">
+ <field name="company_id" groups="base.group_multi_company"/><br/>
+ <field name="address"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
<record id="lunch_location_action" model="ir.actions.act_window">
<field name="name">Lunch Locations</field>
<field name="res_model">lunch.location</field>
- <field name="view_mode">tree,form</field>
+ <field name="view_mode">tree,form,kanban</field>
<field name="search_view_id" ref="lunch_location_view_search"/>
<field name="help" type="html">
<!-- TODO: better help message -->
diff --git a/addons/lunch/views/lunch_product_views.xml b/addons/lunch/views/lunch_product_views.xml
index 2b7312baf4e..0c5fb5d0319 100644
--- a/addons/lunch/views/lunch_product_views.xml
+++ b/addons/lunch/views/lunch_product_views.xml
@@ -278,6 +278,42 @@
</field>
</record>
+ <record id="lunch_product_category_view_kanban" model="ir.ui.view">
+ <field name="name">Product category Kanban</field>
+ <field name="model">lunch.product.category</field>
+ <field name="arch" type="xml">
+ <kanban class="o_kanban_mobile">
+ <field name="id"/>
+ <templates>
+ <t t-name="kanban-box">
+ <div class="oe_kanban_global_click o_kanban_record_has_image_fill o_kanban_record">
+ <div class="o_kanban_image_fill_left d-none d-md-block"
+ t-attf-style="background-image:url('#{kanban_image('lunch.product.category', 'image_128', record.id.raw_value)}')"/>
+ <div class="oe_kanban_details">
+ <div class="o_kanban_record_top">
+ <div class="o_kanban_record_headings">
+ <div class="float-right">
+ <button class="badge badge-primary" type="action"
+ name="%(lunch.lunch_product_action_statbutton)d"
+ context="{'search_default_category_id': active_id,'default_category_id': active_id}"
+ attrs="{'invisible': [('product_count', '=', 0)]}">
+ <field string="Products" name="product_count" widget="statinfo"/>
+ </button>
+ </div>
+ </div>
+ </div>
+ <div class="o_kanban_record_body">
+ <strong><field name="name"/></strong><br/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
<record id="lunch_product_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="res_model">lunch.product</field>
@@ -310,7 +346,7 @@
<record id="lunch_product_category_action" model="ir.actions.act_window">
<field name="name">Product Categories</field>
<field name="res_model">lunch.product.category</field>
- <field name="view_mode">tree,form</field>
+ <field name="view_mode">tree,form,kanban</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product category