mirror of
https://github.com/bringout/oca-ocb-vertical-industry.git
synced 2026-04-23 19:52:03 +02:00
19.0 vanilla
This commit is contained in:
parent
4607ccbd2e
commit
825ff6514e
487 changed files with 184979 additions and 195262 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue