Skip to content
Permalink
Browse files

[IMP] point_of_sale: point of sale onboarding improvement.

1) Improve description of point of sale application
3) Remove status from card like 'In Progress' and 'Unused'
4) Improve Multi-Currencies wording same as invoicing
6) Remove Advanced Currencies Setup from settings
7) Improve list view label on Point of Sale and PoS Categories
9) Add PoS Categories feature in Restrict Available Product Categories

-review-changes(filter and display issue) are done

-'set start category' will be only visible if 'restrict available product categories' is selected

- string 'PoS Product category' is put instead of 'PoS Category', as it seems meaningful.

- 'Restrict Available Product Category' is ticked but any category is not selected (it means it is kept blank), then all categories are shown at POS screen.

- Allow to set default category from the available category

 This commit is related to task id: 1925458
  • Loading branch information...
dat-odoo authored and sht-odoo committed Jan 18, 2019
1 parent 9ea4fef commit 973d1c8e5fd85a63975b591f7175b19b1eeef240
@@ -6,7 +6,7 @@
'version': '1.0.1',
'category': 'Sales/Point Of Sale',
'sequence': 20,
'summary': 'Tablet POS: shops and restaurants',
'summary': 'User-friendly PoS interface for shops and restaurants',
'description': "",
'depends': ['stock_account', 'barcodes', 'web_editor', 'digest'],
'data': [
@@ -70,7 +70,7 @@ def _compute_iface_start_categ_domain_ids(self):
else:
self.iface_start_categ_domain_ids = self.env['pos.category'].search([])

name = fields.Char(string='Point of Sale Name', index=True, required=True, help="An internal identification of the point of sale.")
name = fields.Char(string='Point of Sale', index=True, required=True, help="An internal identification of the point of sale.")
is_installed_account_accountant = fields.Boolean(string="Is the Full Accounting Installed",
compute="_compute_is_installed_account_accountant")
journal_ids = fields.Many2many(
@@ -110,7 +110,7 @@ def _compute_iface_start_categ_domain_ids(self):
iface_tax_included = fields.Selection([('subtotal', 'Tax-Excluded Price'), ('total', 'Tax-Included Price')], string="Tax Display", default='subtotal', required=True)
iface_start_categ_id = fields.Many2one('pos.category', string='Initial Category',
help='The point of sale will display this product category by default. If no category is specified, all available products will be shown.')
iface_available_categ_ids = fields.Many2many('pos.category', string='Available Category Tree',
iface_available_categ_ids = fields.Many2many('pos.category', string='Available PoS Product Category',
help='The point of sale will only display products which are within one of the selected category trees. If no category is specified, all available products will be shown')
iface_start_categ_domain_ids = fields.Many2many('pos.category', compute='_compute_iface_start_categ_domain_ids', store=False,
help='Technical field used as a domain for iface_start_categ_id.')
@@ -164,7 +164,7 @@ def _compute_iface_start_categ_domain_ids(self):
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")
start_category = fields.Boolean("Set Start Category", default=False)
limit_categories = fields.Boolean("Restrict Available 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")
@@ -322,10 +322,14 @@ def _onchange_start_category(self):

@api.onchange('limit_categories', 'iface_available_categ_ids', 'iface_start_categ_id')
def _onchange_limit_categories(self):
res = {}
if not self.limit_categories:
self.iface_available_categ_ids = False
elif self.iface_start_categ_id not in self.iface_available_categ_ids:
self.iface_start_categ_id = False
if self.iface_available_categ_ids:
res = {'domain': {'iface_start_categ_id': [('id', 'in', self.iface_available_categ_ids.ids)]}}
return res

@api.onchange('is_header_or_footer')
def _onchange_header_footer(self):
@@ -333,7 +333,7 @@ exports.PosModel = Backbone.Model.extend({
model: 'pos.category',
fields: ['id', 'name', 'parent_id', 'child_id'],
domain: function(self) {
return self.config.limit_categories ? [['id', 'in', self.config.iface_available_categ_ids]] : [];
return self.config.limit_categories && self.config.iface_available_categ_ids.length ? [['id', 'in', self.config.iface_available_categ_ids]] : [];
},
loaded: function(self, categories){
self.db.add_categories(categories);
@@ -346,7 +346,7 @@ exports.PosModel = Backbone.Model.extend({
order: _.map(['sequence','default_code','name'], function (name) { return {name: name}; }),
domain: function(self){
var domain = [['sale_ok','=',true],['available_in_pos','=',true]];
if (self.config.limit_categories) {
if (self.config.limit_categories && self.config.iface_available_categ_ids.length) {
domain.push(['pos_categ_id', 'in', self.config.iface_available_categ_ids]);
}
return domain;
@@ -532,6 +532,7 @@ exports.PosModel = Backbone.Model.extend({
var order = typeof model.order === 'function' ? model.order(self,tmp): model.order;
progress += progress_step;


if( model.model ){
var params = {
model: model.model,
@@ -66,9 +66,6 @@
<t t-if="record.pos_session_state.raw_value == 'opening_control'">
<div class="badge badge-info o_kanban_inline_block">Opening Control</div>
</t>
<t t-if="record.pos_session_state.raw_value == 'opened'">
<div class="badge badge-success o_kanban_inline_block">In Progress</div>
</t>
<t t-if="record.pos_session_state.raw_value == 'closing_control'">
<div class="badge badge-info o_kanban_inline_block">Closing Control</div>
</t>
@@ -78,8 +75,6 @@
To Close
</div>
</t>
<t t-set="unused_message">Unused</t>
<div class="o_secondary mt16"><t t-esc="record.pos_session_username.value || unused_message"/></div>
</div>
<div class="o_kanban_manage_button_section">
<a class="o_kanban_manage_toggle_button" href="#"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a>
@@ -125,10 +120,10 @@
<span>View</span>
</div>
<div role="menuitem">
<a name="%(action_pos_session_filtered)d" type="action">Sessions</a>
<a name="%(action_pos_order_filtered)d" type="action">Orders</a>
</div>
<div role="menuitem">
<a name="%(action_pos_order_filtered)d" type="action">Sales Orders</a>
<a name="%(action_pos_session_filtered)d" type="action">Sessions</a>
</div>
</div>
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
@@ -4,16 +4,21 @@
<field name="name">pos.category.form</field>
<field name="model">pos.category</field>
<field name="arch" type="xml">
<form string="Pos Categories">
<form string="Pos Product Categories">
<sheet>
<field name="image" widget='image' class="oe_avatar"/>
<div class="oe_left">
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" placeholder="POS Category Name" required="True"/>
</h1>
</div>
<group>
<group>
<field name="name"/>
<field name="parent_id"/>
<field name="sequence"/>
</group>
</div>
</group>
</sheet>
</form>
</field>
@@ -25,7 +30,7 @@
<field name="arch" type="xml">
<tree string="Product Product Categories">
<field name="sequence" widget="handle"/>
<field name="display_name"/>
<field name="display_name" string="PoS Product Category"/>
</tree>
</field>
</record>
@@ -57,7 +62,7 @@
</record>

<record id="product_pos_category_action" model="ir.actions.act_window">
<field name="name">PoS Categories</field>
<field name="name">PoS Product Categories</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">pos.category</field>
<field name="view_type">form</field>
@@ -73,7 +73,7 @@
</div>
</div>
</div>
<h2 name="order">Order Interface</h2>
<h2 name="order">PoS Interface</h2>
<div class="row mt16 o_settings_container">
<div id="category_reference" class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
@@ -85,22 +85,7 @@
Display pictures of product categories
</div>
<div class="content-group mt16" attrs="{'invisible': [('iface_display_categ_images', '=', False)]}">
<button name="%(product_pos_category_action)d" icon="fa-arrow-right" type="action" string="Categories" class="btn-link"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" >
<field name="iface_start_categ_domain_ids" invisible="1"/>
<div class="o_setting_left_pane">
<field name="start_category"/>
</div>
<div class="o_setting_right_pane">
<label for="start_category"/>
<div class="text-muted">
Start selling from a default product category
</div>
<div class="content-group mt16" attrs="{'invisible': [('start_category', '=', False)]}">
<field name="iface_start_categ_id" domain="[('id', 'in', iface_start_categ_domain_ids)]"/>
<button name="%(product_pos_category_action)d" icon="fa-arrow-right" type="action" string="PoS Product Categories" class="btn-link"/>
</div>
</div>
</div>
@@ -116,6 +101,9 @@
<div class="content-group mt16" attrs="{'invisible': [('limit_categories', '=', False)]}">
<field name="iface_available_categ_ids" widget="many2many_tags"/>
</div>
<div class="content-group mt16" attrs="{'invisible': [('limit_categories', '=', False)]}">
<button name="%(product_pos_category_action)d" icon="fa-arrow-right" type="action" string="PoS Product Categories" class="btn-link"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" title="Don't turn this option on if you take orders on smartphones or tablets. Such devices already benefit from a native keyboard.">
@@ -129,6 +117,21 @@
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" attrs="{'invisible': [('limit_categories', '=', False)]}">
<field name="iface_start_categ_domain_ids" invisible="1"/>
<div class="o_setting_left_pane">
<field name="start_category"/>
</div>
<div class="o_setting_right_pane">
<label for="start_category"/>
<div class="text-muted">
Start selling from a default product category
</div>
<div class="content-group mt16" attrs="{'invisible': [('start_category', '=', False)]}">
<field name="iface_start_categ_id"/>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" >
<div class="o_setting_left_pane">
<field name="iface_big_scrollbars"/>
@@ -57,15 +57,12 @@
<div class="o_setting_right_pane">
<label for="group_multi_currency"/>
<div class="text-muted">
Sell in several currencies
Record transactions in foreign currencies
</div>
<div class="content-group" attrs="{'invisible': [('group_multi_currency', '=', False)]}">
<div class="mt16">
<button type="action" name="%(base.action_currency_form)d" string="Currencies" class="btn-link" icon="fa-arrow-right"/>
</div>
<div>
<button name="%(base.action_currency_all_form)d" icon="fa-arrow-right" type="action" string="Advanced Currencies Setup" class="btn-link"/>
</div>
</div>
</div>
</div>
@@ -60,7 +60,6 @@
<field name="arch" type="xml">
<search string="Currencies">
<field name="name" string="Currency"/>
<field name="active"/>
<filter name="active" string="Active" domain="[('active','=',True)]" help="Show active currencies"/>
<filter name="inactive" string="Inactive" domain="[('active','=',False)]" help="Show inactive currencies"/>
</search>

0 comments on commit 973d1c8

Please sign in to comment.
You can’t perform that action at this time.