[IMP] point_of_sale: various pos backend views and pos ui improvements
TASK-ID: 2230195
This commit is contained in:
@@ -194,8 +194,8 @@ class PosConfig(models.Model):
|
||||
use_pricelist = fields.Boolean("Use a pricelist.")
|
||||
tax_regime = fields.Boolean("Tax Regime")
|
||||
tax_regime_selection = fields.Boolean("Tax Regime Selection value")
|
||||
start_category = fields.Boolean("Set Start Category", default=False)
|
||||
limit_categories = fields.Boolean("Restrict Available Product Categories")
|
||||
start_category = fields.Boolean("Start Category", default=False)
|
||||
limit_categories = fields.Boolean("Restrict Product Categories")
|
||||
module_account = fields.Boolean(string='Invoicing', help='Enables invoice generation from the Point of Sale.')
|
||||
module_pos_restaurant = fields.Boolean("Is a Bar/Restaurant")
|
||||
module_pos_discount = fields.Boolean("Global Discounts")
|
||||
|
||||
@@ -32,7 +32,7 @@ class PosSession(models.Model):
|
||||
index=True)
|
||||
name = fields.Char(string='Session ID', required=True, readonly=True, default='/')
|
||||
user_id = fields.Many2one(
|
||||
'res.users', string='Responsible',
|
||||
'res.users', string='Opened By',
|
||||
required=True,
|
||||
index=True,
|
||||
readonly=True,
|
||||
|
||||
@@ -1489,6 +1489,9 @@ td {
|
||||
padding-left: 0;
|
||||
flex-grow: 5;
|
||||
}
|
||||
.payment-screen .customer-button {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.payment-screen .payment-buttons .button {
|
||||
background: #e2e2e2;
|
||||
line-height: 73px;
|
||||
@@ -1618,6 +1621,11 @@ td {
|
||||
.payment-screen .payment-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
.payment-screen .payment-controls {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.payment-screen .payment-buttons .button {
|
||||
flex-basis: 30%;
|
||||
|
||||
@@ -49,35 +49,39 @@
|
||||
</section>
|
||||
|
||||
<div class="payment-buttons">
|
||||
<div class="button" t-on-click="selectClient">
|
||||
<i class="fa fa-user" role="img" aria-label="Customer"
|
||||
title="Customer" />
|
||||
<span class="js_customer_name">
|
||||
<t t-if="env.pos.get_client()">
|
||||
<t t-esc="env.pos.get_client().name" />
|
||||
</t>
|
||||
<t t-if="!env.pos.get_client()">
|
||||
Customer
|
||||
</t>
|
||||
</span>
|
||||
<div class="customer-button">
|
||||
<div class="button" t-on-click="selectClient">
|
||||
<i class="fa fa-user" role="img" aria-label="Customer"
|
||||
title="Customer" />
|
||||
<span class="js_customer_name">
|
||||
<t t-if="env.pos.get_client()">
|
||||
<t t-esc="env.pos.get_client().name" />
|
||||
</t>
|
||||
<t t-if="!env.pos.get_client()">
|
||||
Customer
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div t-if="env.pos.config.module_account" class="button js_invoice"
|
||||
t-att-class="{ highlight: currentOrder.is_to_invoice() }"
|
||||
t-on-click="toggleIsToInvoice">
|
||||
<i class="fa fa-file-text-o" /> Invoice
|
||||
</div>
|
||||
<div class="button js_email"
|
||||
t-att-class="{ highlight: currentOrder.is_to_email() }"
|
||||
t-on-click="toggleIsToEmail">
|
||||
<i class="fa fa-inbox" /> Email
|
||||
</div>
|
||||
<div t-if="env.pos.config.tip_product_id" class="button js_tip"
|
||||
t-on-click="addTip">
|
||||
<i class="fa fa-heart" /> Tip
|
||||
</div>
|
||||
<div t-if="env.pos.config.iface_cashdrawer" class="button js_cashdrawer"
|
||||
t-on-click="openCashbox">
|
||||
<i class="fa fa-archive" /> Open Cashbox
|
||||
<div class="payment-controls">
|
||||
<div t-if="env.pos.config.module_account" class="button js_invoice"
|
||||
t-att-class="{ highlight: currentOrder.is_to_invoice() }"
|
||||
t-on-click="toggleIsToInvoice">
|
||||
<i class="fa fa-file-text-o" /> Invoice
|
||||
</div>
|
||||
<div class="button js_email"
|
||||
t-att-class="{ highlight: currentOrder.is_to_email() }"
|
||||
t-on-click="toggleIsToEmail">
|
||||
<i class="fa fa-inbox" /> Email
|
||||
</div>
|
||||
<div t-if="env.pos.config.tip_product_id" class="button js_tip"
|
||||
t-on-click="addTip">
|
||||
<i class="fa fa-heart" /> Tip
|
||||
</div>
|
||||
<div t-if="env.pos.config.iface_cashdrawer" class="button js_cashdrawer"
|
||||
t-on-click="openCashbox">
|
||||
<i class="fa fa-archive" /> Open Cashbox
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class='order-empty'>
|
||||
<i class='fa fa-shopping-cart' role="img" aria-label="Shopping cart"
|
||||
title="Shopping cart"/>
|
||||
<h1>Your shopping cart is empty</h1>
|
||||
<h1>This order is empty</h1>
|
||||
</div>
|
||||
</t>
|
||||
<t t-else="">
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<field name="module_pos_hr" attrs="{'readonly': [('has_active_session','=', True)]}"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane" id="login_with_employees">
|
||||
<span class="o_form_label">Login with Employees</span>
|
||||
<span class="o_form_label">Authorized Employees</span>
|
||||
<div class="text-muted">
|
||||
Use employee credentials to log in to the PoS session and switch cashier
|
||||
</div>
|
||||
@@ -102,7 +102,7 @@
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="limit_categories"/>
|
||||
<div class="text-muted">
|
||||
Available Product Categories
|
||||
Pick which product categories are available
|
||||
</div>
|
||||
<div class="content-group mt16" attrs="{'invisible': [('limit_categories', '=', False)]}">
|
||||
<field name="iface_available_categ_ids" widget="many2many_tags" attrs="{'readonly': [('has_active_session','=', True)]}"/>
|
||||
@@ -156,9 +156,9 @@
|
||||
<field name="is_posbox"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="is_posbox" string="IoT Box Devices"/>
|
||||
<label for="is_posbox" string="IoT Box"/>
|
||||
<div class="text-muted mb16">
|
||||
Connect devices to your PoS through an IoT Box
|
||||
Connect devices using an IoT Box
|
||||
</div>
|
||||
<div class="content-group pos_iot_config" attrs="{'invisible' : [('is_posbox', '=', False)]}">
|
||||
<div class="row">
|
||||
@@ -204,9 +204,9 @@
|
||||
<div class="o_setting_left_pane">
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Barcode Scanner</span>
|
||||
<span class="o_form_label">Barcodes</span>
|
||||
<div class="text-muted">
|
||||
Set barcodes to scan products, customer cards, etc.
|
||||
Use barcodes to scan products, customer cards, etc.
|
||||
</div>
|
||||
<div class="content-group mt16 row">
|
||||
<label for="barcode_nomenclature_id" string="Barcode Nomenclature" class="col-lg-3 o_light_label"/>
|
||||
@@ -535,7 +535,6 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Point of Sale Configuration">
|
||||
<field name="name" />
|
||||
<field name="picking_type_id"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -134,24 +134,28 @@
|
||||
<field name="arch" type="xml">
|
||||
<kanban class="o_kanban_mobile" create="0" sample="1">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="amount_total"/>
|
||||
<field name="date_order"/>
|
||||
<field name="state"/>
|
||||
<field name="pos_reference"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="currency_id"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
<div class="o_kanban_record_top">
|
||||
<div class="o_kanban_record_headings">
|
||||
<strong class="o_kanban_record_title">
|
||||
<span>
|
||||
<t t-esc="record.user_id"/>
|
||||
<span t-if="record.partner_id.value">
|
||||
<t t-esc="record.partner_id.value"/>
|
||||
</span>
|
||||
<span t-else="">
|
||||
<t t-esc="record.name.value"/>
|
||||
</span>
|
||||
</strong>
|
||||
</div>
|
||||
<strong><span class="badge badge-pill"><i class="fa fa-money" role="img" aria-label="Amount" title="Amount"/> <field name="amount_total"/></span></strong>
|
||||
<strong><field name="amount_total" widget="monetary"/></strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -221,8 +225,8 @@
|
||||
<field name="date_order"/>
|
||||
<field name="pos_reference"/>
|
||||
<field name="partner_id"/>
|
||||
<field string="Cashier" name="user_id"/>
|
||||
<field name="amount_total" sum="Amount total" widget="monetary"/>
|
||||
<field string="Cashier" name="user_id" widget="many2one_avatar_user"/>
|
||||
<field name="amount_total" sum="Amount total" widget="monetary" decoration-bf="1"/>
|
||||
<field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state not in ('draft','cancel')"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -11,15 +11,14 @@
|
||||
context="{'balance': 'start'}"/>
|
||||
<button name="action_pos_session_open" type="object" string="Start Session"
|
||||
attrs="{'invisible' : ['|', ('cash_control', '=', False), ('state', '!=', 'opening_control')]}" class="oe_highlight"/>
|
||||
<button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"
|
||||
class="oe_highlight"/>
|
||||
<button name="open_frontend_cb" type="object" string="Continue Selling" states="opened"/>
|
||||
<button id="end_session_opened" name="action_pos_session_closing_control" type="object" string="End of Session"
|
||||
attrs="{'invisible' : ['|', ('cash_control', '=', False),('state', '!=', 'opened')]}"
|
||||
class="oe_highlight"/>
|
||||
<button id="validate_opened" name="action_pos_session_closing_control" type="object" string="Validate Closing & Post Entries"
|
||||
<button id="validate_opened" name="action_pos_session_closing_control" type="object" string="Close Session & Post Entries"
|
||||
attrs="{'invisible' : ['|', ('cash_control', '=', True),('state', '!=', 'opened')]}"
|
||||
class="oe_highlight"/>
|
||||
<button id="validate_closing_control" name="action_pos_session_validate" type="object" string="Validate Closing & Post Entries" states="closing_control"
|
||||
<button id="validate_closing_control" name="action_pos_session_validate" type="object" string="Close Session & Post Entries" states="closing_control"
|
||||
class="oe_highlight"/>
|
||||
|
||||
<field name="state" widget="statusbar" statusbar_visible="new_session,opening_control,opened,closing_control,closed" nolabel="1" />
|
||||
@@ -136,12 +135,12 @@
|
||||
<field name="model">pos.session</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Point of Sale Session" create="0" sample="1">
|
||||
<field name="name" decoration-bf="1"/>
|
||||
<field name="config_id" />
|
||||
<field name="name" />
|
||||
<field name="user_id" />
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
<field name="start_at" />
|
||||
<field name="stop_at" />
|
||||
<field name="state" />
|
||||
<field name="state" widget="badge" decoration-info="state in ('new_session', 'opening_control')" decoration-success="state in ('opened', 'closed')" decoration-warning="state == 'closing_control'" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -198,8 +197,11 @@
|
||||
<separator/>
|
||||
<filter string="Opening Date" name="start_date" date="start_at" />
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Responsible" name="user" domain="[]" context="{'group_by' : 'user_id'}"/>
|
||||
<filter string="Opened By" name="user" domain="[]" context="{'group_by' : 'user_id'}"/>
|
||||
<filter string="Point of Sale" name="point_of_sale" domain="[]" context="{'group_by': 'config_id'}"/>
|
||||
<filter string="Status" name="status" domain="[]" context="{'group_by': 'state'}"/>
|
||||
<filter string="Opening Date" name="opening_date" domain="[]" context="{'group_by': 'start_at'}"/>
|
||||
<filter string="Closing Date" name="closing_date" domain="[]" context="{'group_by': 'stop_at'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<field name="inherit_id" ref="point_of_sale.view_pos_order_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='user_id']" position="replace">
|
||||
<field name="cashier"/>
|
||||
<field name="employee_id" widget="many2one_avatar_employee"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -9,10 +9,10 @@ class PosConfig(models.Model):
|
||||
|
||||
iface_splitbill = fields.Boolean(string='Bill Splitting', help='Enables Bill Splitting in the Point of Sale.')
|
||||
iface_printbill = fields.Boolean(string='Bill Printing', help='Allows to print the Bill before payment.')
|
||||
iface_orderline_notes = fields.Boolean(string='Orderline Notes', help='Allow custom notes on Orderlines.')
|
||||
iface_orderline_notes = fields.Boolean(string='Notes', help='Allow custom notes on Orderlines.')
|
||||
floor_ids = fields.One2many('restaurant.floor', 'pos_config_id', string='Restaurant Floors', help='The restaurant floors served by this point of sale.')
|
||||
printer_ids = fields.Many2many('restaurant.printer', 'pos_config_printer_rel', 'config_id', 'printer_id', string='Order Printers')
|
||||
is_table_management = fields.Boolean('Table Management')
|
||||
is_table_management = fields.Boolean('Floors & Tables')
|
||||
is_order_printer = fields.Boolean('Order Printer')
|
||||
module_pos_restaurant = fields.Boolean(default=True)
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<label for="is_table_management"/>
|
||||
<span class="fa fa-lg fa-cutlery" title="For bars and restaurants" role="img" aria-label="For bars and restaurants"/>
|
||||
<div class="text-muted">
|
||||
Manage table orders
|
||||
Design floors and assign orders to tables
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('is_table_management','=',False)]}">
|
||||
<div class="mt16">
|
||||
@@ -96,7 +96,7 @@
|
||||
<label for="iface_orderline_notes"/>
|
||||
<span class="fa fa-lg fa-cutlery" title="For bars and restaurants" role="img" aria-label="For bars and restaurants"/>
|
||||
<div class="text-muted">
|
||||
Add notes to orderlines
|
||||
Add notes on order lines
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user