mirror of
https://github.com/bringout/oca-ocb-vertical-industry.git
synced 2026-04-22 20:12:00 +02:00
19.0 vanilla
This commit is contained in:
parent
4607ccbd2e
commit
825ff6514e
487 changed files with 184979 additions and 195262 deletions
|
|
@ -15,16 +15,16 @@
|
|||
</record>
|
||||
|
||||
<record id="lunch_alert_view_tree" model="ir.ui.view">
|
||||
<field name="name">lunch.alert.tree</field>
|
||||
<field name="name">lunch.alert.list</field>
|
||||
<field name="model">lunch.alert</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="mode"/>
|
||||
<field name="message" invisible="1"/>
|
||||
<field name="message" column_invisible="True"/>
|
||||
<field name="available_today"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -43,19 +43,19 @@
|
|||
<group>
|
||||
<group>
|
||||
<field name="mode" widget="radio"/>
|
||||
<field name="recipients" attrs="{'invisible': [['mode', '!=', 'chat']]}" widget="radio"/>
|
||||
<field name="recipients" 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']]}"/>
|
||||
<label for="notification_time" 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"/>
|
||||
<div class="o_row" invisible="mode != 'chat'">
|
||||
<field name="notification_time" required="mode == 'chat'" widget="float_time"/>
|
||||
<field name="notification_moment"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -76,25 +76,17 @@
|
|||
<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>
|
||||
<t t-name="card">
|
||||
<field class="fw-bold fs-5" name="name"/>
|
||||
<div>
|
||||
<field name="mode"/>
|
||||
<span invisible="mode != 'chat'">
|
||||
to <field name="recipients"/>
|
||||
on <field name="notification_time"/>
|
||||
<field name="notification_moment"/>
|
||||
</span>
|
||||
</div>
|
||||
<field name="location_ids" widget="many2many_tags"/>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -105,7 +97,7 @@
|
|||
<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="view_mode">list,form,kanban</field>
|
||||
<field name="domain">['|', ('active', '=', True), ('active', '=', False)]</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="view_id" ref="lunch_alert_view_tree"/>
|
||||
|
|
|
|||
|
|
@ -14,16 +14,16 @@
|
|||
</record>
|
||||
|
||||
<record id="lunch_cashmove_view_tree" model="ir.ui.view">
|
||||
<field name="name">lunch.cashmove.tree</field>
|
||||
<field name="name">lunch.cashmove.list</field>
|
||||
<field name="model">lunch.cashmove</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="cashmove tree">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<list string="cashmove list">
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="description"/>
|
||||
<field name="amount" sum="Total" widget="monetary"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -51,36 +51,23 @@
|
|||
<field name="model">lunch.cashmove</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile">
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
<field name="description"/>
|
||||
<field name="amount"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div class="row mb4">
|
||||
<div class="col-8">
|
||||
<span>
|
||||
<strong class="o_kanban_record_title"><t t-esc="record.description.value"/></strong>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-4 text-end">
|
||||
<span class="badge rounded-pill">
|
||||
<strong><i class="fa fa-money" role="img" aria-label="Amount" title="Amount"/> <field name="amount" widget="monetary"/></strong>
|
||||
</span>
|
||||
</div>
|
||||
<t t-name="card">
|
||||
<div class="row mb4">
|
||||
<div class="col-8 fw-bold fs-5">
|
||||
<field name="description" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/>
|
||||
<t t-esc="record.date.value"/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="float-end">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-end badge rounded-pill fw-bolder pe-3 pt-1">
|
||||
<i class="fa fa-money" role="img" aria-label="Amount" title="Amount"/> <field name="amount" widget="monetary"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/> <field name="date" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<field name="user_id" widget="many2one_avatar_user" class="float-end"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
|
@ -92,7 +79,7 @@
|
|||
<record id="lunch_cashmove_action_payment" model="ir.actions.act_window">
|
||||
<field name="name">Cash Moves</field>
|
||||
<field name="res_model">lunch.cashmove</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="search_view_id" ref="lunch_cashmove_view_search"/>
|
||||
<field name="view_id" ref="lunch_cashmove_view_tree"/>
|
||||
<field name="help" type="html">
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<group>
|
||||
<field name="name"/>
|
||||
<field name="address"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company" placeholder="Visible to all"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
|
|
@ -33,11 +33,11 @@
|
|||
<field name="name">lunch.location.view.form</field>
|
||||
<field name="model">lunch.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<list editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="address"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -47,20 +47,10 @@
|
|||
<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 t-name="card">
|
||||
<field name="name" class="fw-bold fs-5"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="address"/>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -70,7 +60,7 @@
|
|||
<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,kanban</field>
|
||||
<field name="view_mode">list,form,kanban</field>
|
||||
<field name="search_view_id" ref="lunch_location_view_search"/>
|
||||
<field name="help" type="html">
|
||||
<!-- TODO: better help message -->
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@
|
|||
<filter name="confirmed" string="Received" domain="[('state', '=', 'confirmed')]"/>
|
||||
<filter name="cancelled" string="Cancelled" domain="[('state', '=', 'cancelled')]"/>
|
||||
<separator/>
|
||||
<filter name="date_filter" string="Today" domain="[('date', '=', context_today().strftime('%Y-%m-%d'))]" />
|
||||
<filter name="date_filter" string="Today" domain="[('date', '=', 'today')]" />
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<group>
|
||||
<filter name="group_by_user" string="User" context="{'group_by': 'user_id'}"/>
|
||||
<filter name="group_by_supplier" string="Vendor" context="{'group_by': 'supplier_id'}"/>
|
||||
<filter name="group_by_date" string="Order Date" context="{'group_by': 'date:day'}" help="Vendor Orders by Date"/>
|
||||
|
|
@ -27,38 +27,38 @@
|
|||
</record>
|
||||
|
||||
<record id="lunch_order_view_tree" model="ir.ui.view">
|
||||
<field name="name">lunch.order.tree</field>
|
||||
<field name="name">lunch.order.list</field>
|
||||
<field name="model">lunch.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Order lines Tree" create="false" edit="false" decoration-muted="state == 'cancelled'" class="o_lunch_list" expand="1">
|
||||
<list string="Order lines List" create="false" edit="false" decoration-muted="state == 'cancelled'" expand="1">
|
||||
<header>
|
||||
<button name="action_confirm" type="object" string="Receive"/>
|
||||
</header>
|
||||
<field name='date'/>
|
||||
<field name='date' readonly="state != 'new'"/>
|
||||
<field name='supplier_id'/>
|
||||
<field name='product_id'/>
|
||||
<field name="display_toppings" class="o_text_overflow"/>
|
||||
<field name='note' class="o_text_overflow"/>
|
||||
<field name='user_id'/>
|
||||
<field name='user_id' widget='many2one_avatar_user' readonly="state != 'new'"/>
|
||||
<field name="lunch_location_id"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name='price' sum="Total" string="Price" widget="monetary"/>
|
||||
<field name='state' widget="badge" decoration-warning="state == 'new'" decoration-success="state == 'confirmed'" decoration-info="state == 'sent'" decoration-danger="state == 'ordered'"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_reorder_button" invisible="1"/>
|
||||
<field name="notified" invisible="1"/>
|
||||
<button name="action_reorder" string="Re-order" type="object" icon="fa-history" attrs="{'invisible': [('display_reorder_button', '=', False)]}" groups="lunch.group_lunch_user"/>
|
||||
<button name="action_confirm" string="Confirm" type="object" icon="fa-check" attrs="{'invisible': [('state', '!=', 'sent')]}" groups="lunch.group_lunch_manager"/>
|
||||
<button name="action_cancel" string="Cancel" type="object" icon="fa-times" attrs="{'invisible': [('state', 'in', ['cancelled', 'confirmed'])]}" groups="lunch.group_lunch_manager"/>
|
||||
<button name="action_reset" string="Reset" type="object" icon="fa-undo" attrs="{'invisible': [('state', '!=', 'cancelled')]}" groups="lunch.group_lunch_manager"/>
|
||||
<button name="action_notify" string="Send Notification" type="object" icon="fa-envelope" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('notified', '=', True)]}" groups="lunch.group_lunch_manager"/>
|
||||
<field name="display_reorder_button" column_invisible="True"/>
|
||||
<field name="notified" column_invisible="True"/>
|
||||
<button name="action_reorder" string="Re-order" type="object" icon="fa-history" invisible="not display_reorder_button or not display_add_button" groups="lunch.group_lunch_user"/>
|
||||
<button name="action_confirm" string="Confirm" type="object" icon="fa-check" invisible="state != 'sent'" groups="lunch.group_lunch_manager"/>
|
||||
<button name="action_cancel" string="Cancel" type="object" icon="fa-times" invisible="state in ['cancelled', 'confirmed']" groups="lunch.group_lunch_manager"/>
|
||||
<button name="action_reset" string="Reset" type="object" icon="fa-undo" invisible="state != 'cancelled'" groups="lunch.group_lunch_manager"/>
|
||||
<button name="action_notify" string="Send Notification" type="object" icon="fa-envelope" invisible="state != 'confirmed' or notified" groups="lunch.group_lunch_manager"/>
|
||||
<groupby name="supplier_id">
|
||||
<field name="show_order_button" invisible="1" />
|
||||
<field name="show_confirm_button" invisible="1" />
|
||||
<button string="Send Orders" type="object" name="action_send_orders" attrs="{'invisible': [('show_order_button', '=', False)]}"/>
|
||||
<button string="Confirm Orders" type="object" name="action_confirm_orders" attrs="{'invisible': [('show_confirm_button', '=', False)]}"/>
|
||||
<button string="Send Orders" type="object" name="action_send_orders" invisible="not show_order_button"/>
|
||||
<button string="Confirm Orders" type="object" name="action_confirm_orders" invisible="not show_confirm_button"/>
|
||||
</groupby>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -67,57 +67,43 @@
|
|||
<field name="model">lunch.order</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban create="false" edit="false">
|
||||
<field name="product_id"/>
|
||||
<field name="note"/>
|
||||
<field name="state"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date"/>
|
||||
<field name="company_id"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="notified"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<div class="o_kanban_record_top">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title"><field name="product_id"/></strong>
|
||||
</div>
|
||||
<field name="state" widget="label_selection" options="{'classes': {'new': 'default', 'confirmed': 'success', 'cancelled':'danger'}}"/>
|
||||
<t t-name="card">
|
||||
<div class="d-flex">
|
||||
<field name="product_id" class="fw-bold fs-5"/>
|
||||
<field name="state" widget="label_selection" options="{'classes': {'new': 'default', 'confirmed': 'success', 'cancelled':'danger'}}" class="ms-auto"/>
|
||||
</div>
|
||||
<field name="note"/>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<i class="fa fa-money" role="img" aria-label="Money" title="Money"/> <field name="price"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="note"/>
|
||||
<div class="col-6 text-end">
|
||||
<i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/> <field name="date" readonly="state != 'new'"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<i class="fa fa-money" role="img" aria-label="Money" title="Money"/> <field name="price"/>
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
<i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/> <field name="date"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt4">
|
||||
<div class="col-6">
|
||||
<a class="btn btn-sm btn-success" role="button" name="action_order" string="Order" type="object" invisible="state in ['sent', 'ordered', 'confirmed']" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-phone" role="img" aria-label="Order button" title="Order button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-primary" role="button" name="action_send" string="Send" type="object" invisible="state != 'ordered'" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-paper-plane" role="img" aria-label="Send button" title="Send button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-info" role="button" name="action_confirm" string="Receive" type="object" invisible="state != 'sent'" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-check" role="img" aria-label="Receive button" title="Receive button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-danger" role="button" name="action_cancel" string="Cancel" type="object" invisible="state in ['cancelled', 'confirmed']" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-times" role="img" aria-label="Cancel button" title="Cancel button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-info" role="button" name="action_notify" string="Send Notification" type="object" invisible="state != 'confirmed' or notified" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-envelope" role="img" aria-label="Send notification" title="Send notification"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="row mt4">
|
||||
<div class="col-6">
|
||||
<a class="btn btn-sm btn-success" role="button" name="action_order" string="Order" type="object" attrs="{'invisible': [('state', 'in', ['sent', 'ordered', 'confirmed'])]}" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-phone" role="img" aria-label="Order button" title="Order button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-primary" role="button" name="action_send" string="Send" type="object" attrs="{'invisible': [('state', '!=', 'ordered')]}" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-paper-plane" role="img" aria-label="Send button" title="Send button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-info" role="button" name="action_confirm" string="Receive" type="object" attrs="{'invisible': [('state','!=','sent')]}" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-check" role="img" aria-label="Receive button" title="Receive button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-danger" role="button" name="action_cancel" string="Cancel" type="object" attrs="{'invisible': [('state','in', ['cancelled', 'confirmed'])]}" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-times" role="img" aria-label="Cancel button" title="Cancel button"/>
|
||||
</a>
|
||||
<a class="btn btn-sm btn-info" role="button" name="action_notify" string="Send Notification" type="object" attrs="{'invisible': ['|', ('state', '!=', 'confirmed'), ('notified', '=', True)]}" groups="lunch.group_lunch_manager">
|
||||
<i class="fa fa-envelope" role="img" aria-label="Send notification" title="Send notification"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<span class="float-end">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<field name="user_id" widget="many2one_avatar_user" readonly="state != 'new'" class="float-end"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
|
@ -150,7 +136,7 @@
|
|||
<record id="lunch_order_action" model="ir.actions.act_window">
|
||||
<field name="name">My Orders</field>
|
||||
<field name="res_model">lunch.order</field>
|
||||
<field name="view_mode">tree,kanban,pivot</field>
|
||||
<field name="view_mode">list,kanban,pivot</field>
|
||||
<field name="search_view_id" ref="lunch_order_view_search"/>
|
||||
<field name="context">{"search_default_is_mine":1, "search_default_group_by_date": 1, 'show_reorder_button': True}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -165,7 +151,7 @@
|
|||
<record id="lunch_order_action_by_supplier" model="ir.actions.act_window">
|
||||
<field name="name">Today's Orders</field>
|
||||
<field name="res_model">lunch.order</field>
|
||||
<field name="view_mode">tree,kanban</field>
|
||||
<field name="view_mode">list,kanban</field>
|
||||
<field name="search_view_id" ref="lunch_order_view_search"/>
|
||||
<field name="context">{"search_default_group_by_supplier":1, "search_default_date_filter":1}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -180,7 +166,7 @@
|
|||
<record id="lunch_order_action_control_suppliers" model="ir.actions.act_window">
|
||||
<field name="name">Control Vendors</field>
|
||||
<field name="res_model">lunch.order</field>
|
||||
<field name="view_mode">tree,kanban,pivot</field>
|
||||
<field name="view_mode">list,kanban,pivot</field>
|
||||
<field name="search_view_id" ref="lunch_order_view_search"/>
|
||||
<field name="context">{"search_default_group_by_supplier":1}</field>
|
||||
<field name="help" type="html">
|
||||
|
|
@ -202,7 +188,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form class="flex-column">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="date" invisible="1" readonly="state != 'new'"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="quantity" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
|
|
@ -226,29 +212,29 @@
|
|||
<div class="o_lunch_wizard">
|
||||
<div class="row py-3 py-md-0">
|
||||
<div class="o_td_label col-3 col-md-2">
|
||||
<field name="topping_label_1" nolabel="1" attrs="{'invisible': [('available_toppings_1', '=', False)]}" class="o_form_label"/>
|
||||
<field name="topping_label_1" nolabel="1" invisible="not available_toppings_1" class="o_form_label"/>
|
||||
</div>
|
||||
<div class="col-9 col-md-10">
|
||||
<field name="topping_ids_1" attrs="{'invisible': [('available_toppings_1', '=', False)]}" widget="many2many_checkboxes" nolabel="1" domain="[('topping_category', '=', 1), ('supplier_id', '=', supplier_id)]" class="o_field_widget o_quick_editable"/>
|
||||
<field name="topping_ids_1" invisible="not available_toppings_1" widget="many2many_checkboxes" nolabel="1" domain="[('topping_category', '=', 1), ('supplier_id', '=', supplier_id)]" class="o_field_widget o_quick_editable"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="o_td_label col-3 col-md-2">
|
||||
<field name="topping_label_2" nolabel="1" attrs="{'invisible': [('available_toppings_2', '=', False)]}" class="o_form_label"/>
|
||||
<field name="topping_label_2" nolabel="1" invisible="not available_toppings_2" class="o_form_label"/>
|
||||
</div>
|
||||
<div class="col-9 col-md-10">
|
||||
<field name="topping_ids_2" attrs="{'invisible': [('available_toppings_2', '=', False)]}" widget="many2many_checkboxes" nolabel="1" domain="[('topping_category', '=', 2), ('supplier_id', '=', supplier_id)]" class="o_field_widget o_quick_editable"/>
|
||||
<field name="topping_ids_2" invisible="not available_toppings_2" widget="many2many_checkboxes" nolabel="1" domain="[('topping_category', '=', 2), ('supplier_id', '=', supplier_id)]" class="o_field_widget o_quick_editable"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="o_td_label col-3 col-md-2">
|
||||
<field name="topping_label_3" nolabel="1" attrs="{'invisible': [('available_toppings_3', '=', False)]}" class="o_form_label"/>
|
||||
<field name="topping_label_3" nolabel="1" invisible="not available_toppings_3" class="o_form_label"/>
|
||||
</div>
|
||||
<div class="col-9 col-md-10">
|
||||
<field name="topping_ids_3" attrs="{'invisible': [('available_toppings_3', '=', False)]}" widget="many2many_checkboxes" nolabel="1" domain="[('topping_category', '=', 3), ('supplier_id', '=', supplier_id)]" class="o_field_widget o_quick_editable"/>
|
||||
<field name="topping_ids_3" invisible="not available_toppings_3" widget="many2many_checkboxes" nolabel="1" domain="[('topping_category', '=', 3), ('supplier_id', '=', supplier_id)]" class="o_field_widget o_quick_editable"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row pb-2">
|
||||
<div class="o_td_label col-3 col-md-2">
|
||||
<label for="product_description" class="o_form_label"/>
|
||||
</div>
|
||||
|
|
@ -265,18 +251,24 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" attrs="{'invisible': [('order_deadline_passed', '=', False)]}">
|
||||
<div class="row" invisible="not order_deadline_passed">
|
||||
<div class="col-12">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
The orders for this vendor have already been sent.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" invisible="display_add_button">
|
||||
<div class="col-12">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Your wallet does not contain enough money to order that. To add some money to your wallet, please contact your lunch manager.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<button string="Save" special="save" data-hotkey="v" class="oe_highlight" invisible="not context.get('active_id', False)"/>
|
||||
<button string="Add To Cart" name="add_to_cart" type="object" class="oe_highlight" invisible="context.get('active_id', False)" attrs="{'invisible': [('order_deadline_passed', '=', True)]}" data-hotkey="w"/>
|
||||
<button string="Discard" special="cancel" data-hotkey="z"/>
|
||||
<button string="Add To Cart" name="add_to_cart" type="object" class="oe_highlight" invisible="order_deadline_passed or not display_add_button" data-hotkey="w"/>
|
||||
<button string="Discard" special="cancel" data-hotkey="x"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<filter name="available_on_sun" string="Sunday" domain="[('supplier_id.sun', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<group>
|
||||
<filter name="group_by_supplier" string="Vendor" context="{'group_by': 'supplier_id'}"/>
|
||||
<filter name="group_by_category" string="Category" context="{'group_by': 'category_id'}"/>
|
||||
</group>
|
||||
|
|
@ -34,28 +34,28 @@
|
|||
</record>
|
||||
|
||||
<record id="lunch_product_view_tree" model="ir.ui.view">
|
||||
<field name="name">lunch.product.tree</field>
|
||||
<field name="name">lunch.product.list</field>
|
||||
<field name="model">lunch.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Products Tree">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<list string="Products List">
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="name"/>
|
||||
<field name="category_id"/>
|
||||
<field name="supplier_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="description"/>
|
||||
<field name="price" widget="monetary"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="lunch_product_view_tree_order" model="ir.ui.view">
|
||||
<field name="name">lunch.product.tree.order</field>
|
||||
<field name="name">lunch.product.list.order</field>
|
||||
<field name="inherit_id" ref="lunch_product_view_tree"/>
|
||||
<field name="model">lunch.product</field>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="js_class">lunch_list</attribute>
|
||||
<attribute name="create">0</attribute>
|
||||
</xpath>
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<field name="company_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe-edit-only"/>
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
</group>
|
||||
<group>
|
||||
<field name="new_until"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company" placeholder="Visible to all"/>
|
||||
</group>
|
||||
<label for="description"/>
|
||||
<field name='description'/>
|
||||
|
|
@ -103,45 +103,31 @@
|
|||
<field name="priority">999</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban js_class="lunch_kanban" create="0" edit="0" group_create="0" class="o_kanban_mobile">
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<field name="category_id"/>
|
||||
<field name="supplier_id"/>
|
||||
<field name="description"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="company_id"/>
|
||||
<field name="is_new"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click o_kanban_record_has_image_fill">
|
||||
<field name="image_128" class="o_lunch_image o_kanban_image_fill_left" options="{'placeholder': '/lunch/static/img/lunch.png', 'size': [94, 94]}" widget="image"/>
|
||||
<div class="oe_kanban_details ml8">
|
||||
<div class="o_kanban_record_top">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<field class="pe-1" name="is_favorite" widget="boolean_favorite" nolabel="1"/>
|
||||
<strong><span t-esc="record.name.value"/></strong>
|
||||
</div>
|
||||
<div class="text-odoo">
|
||||
<div t-if="record.is_new.raw_value" class="o_lunch_new_product me-1 py-1 fs-6 badge rounded-pill text-bg-success">
|
||||
New
|
||||
</div>
|
||||
<field name="price" widget="monetary"/>
|
||||
</div>
|
||||
</div>
|
||||
</strong>
|
||||
<span class="o_kanban_record_subtitle"><span t-esc="record.supplier_id.value"/></span>
|
||||
</div>
|
||||
<t t-name="card" class="row g-0">
|
||||
<aside class="col-4">
|
||||
<field name="image_128" options="{'placeholder': '/lunch/static/img/lunch.png', 'size': [94, 94], 'img_class': 'w-100 h-100'}" widget="image"/>
|
||||
</aside>
|
||||
<main class="col">
|
||||
<div class="d-flex">
|
||||
<div class="d-flex">
|
||||
<field class="pe-1 pt-1" name="is_favorite" widget="lunch_is_favorite" nolabel="1"/>
|
||||
<field name="name" class="fw-bolder fs-5" />
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<ul>
|
||||
<li t-out="record.description.value" class="text-muted"/>
|
||||
</ul>
|
||||
<div class="text-primary ms-auto">
|
||||
<div t-if="record.is_new.raw_value" class="o_lunch_new_product me-1 py-1 fs-6 badge rounded-pill text-bg-success">
|
||||
New
|
||||
</div>
|
||||
<field name="price" widget="monetary" class="fw-bold "/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<field name="supplier_id" />
|
||||
<footer class="pt-0 mt-0">
|
||||
<field name="description" class="text-muted"/>
|
||||
</footer>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -161,31 +147,20 @@
|
|||
<field name="description"/>
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click o_kanban_record_has_image_fill">
|
||||
<div class="o_kanban_image_fill_left d-none d-md-block"
|
||||
t-attf-style="background-image:url('#{kanban_image('lunch.product', 'image_128', record.id.raw_value)}')"/>
|
||||
<div class="oe_kanban_details">
|
||||
<div class="o_kanban_record_top">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<div>
|
||||
<div class="float-end">
|
||||
<field name="price" widget="monetary"/>
|
||||
</div>
|
||||
<strong><span t-esc="record.name.value"/></strong>
|
||||
</div>
|
||||
</strong>
|
||||
<span class="o_kanban_record_subtitle"><span t-esc="record.supplier_id.value"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_kanban_record_bottom">
|
||||
<ul>
|
||||
<li t-out="record.description.value" class="text-muted"/>
|
||||
</ul>
|
||||
</div>
|
||||
<t t-name="card" class="flex-row">
|
||||
<aside class="o_kanban_aside_full d-none d-md-block">
|
||||
<field name="image_128" widget="image" alt="Product Image"/>
|
||||
</aside>
|
||||
<main>
|
||||
<div class="d-flex">
|
||||
<field name="name" class="fw-bold fs-5"/>
|
||||
<field name="price" widget="monetary" class="fw-bold ms-auto"/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="supplier_id" />
|
||||
<footer class="pt-0 mt-0">
|
||||
<field name="description" class="text-muted"/>
|
||||
</footer>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -195,7 +170,7 @@
|
|||
<record id="lunch_product_action_statbutton" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="res_model">lunch.product</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="context">{'search_default_group_by_supplier': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
@ -207,13 +182,13 @@
|
|||
</record>
|
||||
|
||||
<record id="lunch_product_category_view_tree" model="ir.ui.view">
|
||||
<field name="name">Product category Tree</field>
|
||||
<field name="name">Product category List</field>
|
||||
<field name="model">lunch.product.category</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Products List">
|
||||
<list string="Products List">
|
||||
<field name='name' string="Product Category"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -225,8 +200,8 @@
|
|||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" 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)]}"
|
||||
context="{'search_default_category_id': id,'default_category_id': id}"
|
||||
invisible="product_count == 0"
|
||||
icon="fa-cutlery">
|
||||
<field string="Products" name="product_count" widget="statinfo"/>
|
||||
</button>
|
||||
|
|
@ -239,7 +214,7 @@
|
|||
</h1>
|
||||
</div>
|
||||
<label for="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_id" groups="base.group_multi_company" placeholder="Visible to all"/>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
|
@ -250,31 +225,21 @@
|
|||
<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-end">
|
||||
<button class="badge text-bg-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 t-name="card">
|
||||
<aside class="d-none d-md-block">
|
||||
<field name="image_128" widget="image"/>
|
||||
</aside>
|
||||
<main>
|
||||
<button class="badge text-bg-primary ms-auto" type="action"
|
||||
name="%(lunch.lunch_product_action_statbutton)d"
|
||||
context="{'search_default_category_id': id,'default_category_id': id}"
|
||||
invisible="product_count == 0">
|
||||
<field string="Products" name="product_count" widget="statinfo"/>
|
||||
</button>
|
||||
<field name="name" class="fw-bold"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -295,7 +260,7 @@
|
|||
<record id="lunch_product_action" model="ir.actions.act_window">
|
||||
<field name="name">Products</field>
|
||||
<field name="res_model">lunch.product</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_mode">list,kanban,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a new product for lunch
|
||||
|
|
@ -307,15 +272,15 @@
|
|||
|
||||
<record id="lunch_product_action_order" model="ir.actions.act_window">
|
||||
<field name="name">Order Your Lunch</field>
|
||||
<field name="path">lunch</field>
|
||||
<field name="res_model">lunch.product</field>
|
||||
<field name="view_mode">kanban,tree</field>
|
||||
<field name="view_mode">kanban,list</field>
|
||||
<field name="view_ids" eval="[
|
||||
(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('view_lunch_product_kanban_order')}),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('lunch_product_view_tree_order')})
|
||||
(0, 0, {'view_mode': 'list', 'view_id': ref('lunch_product_view_tree_order')})
|
||||
]"/>
|
||||
<field name="search_view_id" ref="lunch_product_view_search"/>
|
||||
<field name="context">{'search_default_available_today': 1}</field>
|
||||
<field name="domain">[]</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
@ -329,7 +294,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,kanban</field>
|
||||
<field name="view_mode">list,form,kanban</field>
|
||||
<field name="search_view_id" ref="lunch_product_category_view_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="lunch_supplier_view_tree" model="ir.ui.view">
|
||||
<field name="name">lunch.supplier.view.tree</field>
|
||||
<field name="name">lunch.supplier.view.list</field>
|
||||
<field name="model">lunch.supplier</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="phone" class="o_force_ltr"/>
|
||||
<field name="email"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" string="Vendor"/>
|
||||
<h1><field name="name" required="1" placeholder="e.g. The Pizzeria Inn"/></h1>
|
||||
|
|
@ -38,10 +38,10 @@
|
|||
</group>
|
||||
<group>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="email" attrs="{'required': [('send_by', '=', 'mail')]}"/>
|
||||
<field name="phone" class="o_force_ltr" attrs="{'required': [('send_by', '=', 'phone')]}"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="responsible_id" attrs="{'required': [('send_by', '=', 'mail')]}" groups="base.group_no_one" domain="[('share', '=', False)]"/>
|
||||
<field name="email" required="send_by == 'mail'"/>
|
||||
<field name="phone" class="o_force_ltr" required="send_by == 'phone'"/>
|
||||
<field name="company_id" groups="base.group_multi_company" placeholder="Visible to all"/>
|
||||
<field name="responsible_id" required="send_by == 'mail'" groups="base.group_no_one" domain="[('share', '=', False)]"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
|
@ -56,8 +56,8 @@
|
|||
<field name="delivery"/>
|
||||
<field name="available_location_ids" widget="many2many_tags"/>
|
||||
<field name="send_by" widget="radio"/>
|
||||
<label for="automatic_email_time" attrs="{'invisible': [('send_by', '!=', 'mail')]}"/>
|
||||
<div class="o_row" attrs="{'invisible': [('send_by', '!=', 'mail')]}"><field name="automatic_email_time" widget="float_time"/> <field name="moment"/></div>
|
||||
<label for="automatic_email_time" invisible="send_by != 'mail'"/>
|
||||
<div class="o_row" invisible="send_by != 'mail'"><field name="automatic_email_time" widget="float_time"/> <field name="moment"/></div>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
|
@ -68,12 +68,12 @@
|
|||
</group>
|
||||
<div>
|
||||
<field name="topping_ids_1" nolabel="1">
|
||||
<tree editable="bottom">
|
||||
<list editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="price" widget="monetary"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</div>
|
||||
<group>
|
||||
|
|
@ -82,12 +82,12 @@
|
|||
</group>
|
||||
<div>
|
||||
<field name="topping_ids_2" nolabel="1">
|
||||
<tree editable="bottom">
|
||||
<list editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="price" widget="monetary"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</div>
|
||||
<group>
|
||||
|
|
@ -96,21 +96,17 @@
|
|||
</group>
|
||||
<div>
|
||||
<field name="topping_ids_3" nolabel="1">
|
||||
<tree editable="bottom">
|
||||
<list editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" column_invisible="True"/>
|
||||
<field name="currency_id" column_invisible="True"/>
|
||||
<field name="price" widget="monetary"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</div>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" groups="base.group_user"/>
|
||||
<field name="activity_ids"/>
|
||||
<field name="message_ids"/>
|
||||
</div>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
@ -120,23 +116,17 @@
|
|||
<field name="model">lunch.supplier</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<field name="partner_id"/>
|
||||
<field name="city"/>
|
||||
<field name="country_id"/>
|
||||
<field name="email"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban">
|
||||
<div class="oe_kanban_details">
|
||||
<strong class="o_kanban_record_title oe_partner_heading"><field name="display_name"/></strong>
|
||||
<ul>
|
||||
<li t-if="record.city.raw_value and !record.country_id.raw_value"><field name="city"/></li>
|
||||
<li t-if="!record.city.raw_value and record.country_id.raw_value"><field name="country_id"/></li>
|
||||
<li t-if="record.city.raw_value and record.country_id.raw_value"><field name="city"/>, <field name="country_id"/></li>
|
||||
<li t-if="record.email.raw_value" class="o_text_overflow"><field name="email"/></li>
|
||||
</ul>
|
||||
<t t-name="card">
|
||||
<main>
|
||||
<field name="display_name" class="fw-bold fs-5"/>
|
||||
<field t-if="record.city.raw_value and !record.country_id.raw_value" name="city"/>
|
||||
<field t-if="!record.city.raw_value and record.country_id.raw_value" name="country_id"/>
|
||||
<div t-if="record.city.raw_value and record.country_id.raw_value">
|
||||
<field name="city"/>, <field name="country_id"/>
|
||||
</div>
|
||||
</div>
|
||||
<field t-if="record.email.raw_value" class="text-truncate" name="email"/>
|
||||
</main>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
|
|
@ -158,7 +148,7 @@
|
|||
<record id="lunch_vendors_action" model="ir.actions.act_window">
|
||||
<field name="name">Vendors</field>
|
||||
<field name="res_model">lunch.supplier</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="lunch_supplier_view_search"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Top menu item -->
|
||||
<menuitem id='menu_lunch' name='Lunch' sequence="235" groups="group_lunch_user" web_icon="lunch,static/description/icon.svg">
|
||||
<menuitem id='menu_lunch' name='Lunch' sequence="235" groups="group_lunch_user" web_icon="lunch,static/description/icon.png">
|
||||
<menuitem name="My Lunch" id="menu_lunch_title" sequence="50">
|
||||
<menuitem name="New Order" id="lunch_order_menu_form" action="lunch.lunch_product_action_order" sequence="1"/>
|
||||
<menuitem name="My Order History" id="lunch_order_menu_tree" action="lunch_order_action" sequence="2"/>
|
||||
|
|
|
|||
|
|
@ -6,56 +6,34 @@
|
|||
<field name="priority" eval="90"/>
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||
<div class="app_settings_block" data-string="Lunch" string="Lunch" data-key="lunch" groups="lunch.group_lunch_manager">
|
||||
<xpath expr="//form" position="inside">
|
||||
<app data-string="Lunch" string="Lunch" name="lunch" groups="lunch.group_lunch_manager">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<h2>Lunch</h2>
|
||||
<div class="row mt16 o_settings_container" name="lunch_overdraft_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="lunch_minimum_threshold"
|
||||
title="None">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Lunch Overdraft</span>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
<div class="text-muted">
|
||||
Maximum overdraft that your employees can reach
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16 row">
|
||||
<label for="company_lunch_minimum_threshold" string="Overdraft" class="col-3 col-lg-3 o_light_label"/>
|
||||
<field name="company_lunch_minimum_threshold" widget="monetary"/>
|
||||
</div>
|
||||
<block title="Lunch" name="lunch_overdraft_setting_container">
|
||||
<setting id="lunch_minimum_threshold" string="Lunch Overdraft" help="Maximum overdraft that your employees can reach" company_dependent="1">
|
||||
<div class="content-group">
|
||||
<div class="mt16 row">
|
||||
<label for="company_lunch_minimum_threshold" string="Overdraft" class="col-3 col-lg-3 o_light_label"/>
|
||||
<field name="company_lunch_minimum_threshold" widget="monetary"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt16 o_settings_container" name="lunch_notification_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="lunch_notification">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Reception notification</span>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
<div class="text-mutex">
|
||||
Send this message to your users when their order has been delivered.
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16 row">
|
||||
<field name="company_lunch_notify_message" widget="html" class="col col-lg w-100"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
<block name="lunch_notification_setting_container">
|
||||
<setting string="Reception notification" company_dependent="1" help="Send this message to your users when their order has been delivered." id="lunch_notification">
|
||||
<field name="company_lunch_notify_message" widget="html" class="col col-lg w-100"/>
|
||||
</setting>
|
||||
</block>
|
||||
</app>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="lunch_config_settings_action" model="ir.actions.act_window">
|
||||
<field name="name">Settings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.config.settings</field>
|
||||
<field name="view_id" ref="res_config_settings_view_form"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">inline</field>
|
||||
<field name="context">{'module' : 'lunch', 'bin_size': False}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue