[REM] point_of_sale: Remove customised customer display feature

Purpose of this task is to remove the customization in the backend of the customer
display because feature allowing the customize the customer display is not
understandable as it is now and often broken.
Task-1944247
Closed- #34944

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Pragya Ladda
2019-08-08 09:24:38 +00:00
committed by Pierre Masereel
parent 0eb0bede20
commit f337496eba
5 changed files with 7 additions and 62 deletions
+4 -3
View File
@@ -94,8 +94,9 @@ class PosConfig(models.Model):
def _get_group_pos_user(self):
return self.env.ref('point_of_sale.group_pos_user')
def _compute_default_customer_html(self):
return self.env['ir.qweb'].render('point_of_sale.customer_facing_display_html')
def _compute_customer_html(self):
for config in self:
config.customer_facing_display_html = self.env['ir.qweb'].render('point_of_sale.customer_facing_display_html')
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",
@@ -188,7 +189,7 @@ class PosConfig(models.Model):
fiscal_position_ids = fields.Many2many('account.fiscal.position', string='Fiscal Positions', help='This is useful for restaurants with onsite and take-away services that imply specific tax rates.')
default_fiscal_position_id = fields.Many2one('account.fiscal.position', string='Default Fiscal Position')
default_cashbox_id = fields.Many2one('account.bank.statement.cashbox', string='Default Balance')
customer_facing_display_html = fields.Html(string='Customer facing display content', translate=True, default=_compute_default_customer_html)
customer_facing_display_html = fields.Html(string='Customer facing display content', translate=True, compute=_compute_customer_html)
use_pricelist = fields.Boolean("Use a pricelist.")
tax_regime = fields.Boolean("Tax Regime")
tax_regime_selection = fields.Boolean("Tax Regime Selection value")
@@ -1,3 +0,0 @@
.oe_snippet.o_user_facing_display_snippet .oe_snippet_thumbnail_img{
background-image: url("/point_of_sale/static/src/img/blocks/block_simple_text.png")
}
+3 -10
View File
@@ -23,12 +23,6 @@
<script type="text/javascript" src="/point_of_sale/static/src/js/screens.js"></script>
</template>
<template id="wysiwyg_iframe_css_assets" name="CSS assets for wysiwyg iframe content">
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_backend" t-js="false"/>
<link rel="stylesheet" href="/point_of_sale/static/src/css/customer_facing_display_editor_thumb.css" type="text/css"/>
</template>
<template id="customer_facing_display_html" >
<t name="point_of_sale.customer_facing_display_html" >
<div class="pos-customer_facing_display pos-palette_01">
@@ -68,11 +62,10 @@
</div>
</div>
</div>
<div class="pos-payment_info">
<div class="pos-adv" style="background-image:url(http://placehold.it/300x350?text=ADV);"></div>
<div class="pos-company_logo"/>
<div class="pos-payment_info_details">
<div class="pos-total">
<div>
@@ -102,7 +95,7 @@
</div>
</div>
</div>
</t>
</t>
</template>
</odoo>
@@ -176,15 +176,6 @@
<field name="iface_customer_facing_display"/>
</div>
<field name="customer_facing_display_html" invisible="1"/>
<div class="text-muted" attrs="{'invisible' : ['|', ('iface_customer_facing_display', '=', False), '&amp;', ('id', '!=', False), ('customer_facing_display_html', '!=', '')]}">Save this configuration to see and edit the customer display</div>
<div class="row mt16 o_settings_container" attrs="{'invisible' : ['|', '|',('iface_customer_facing_display', '=', False), ('id', '=', False), ('customer_facing_display_html', '=', '')]}">
<div class="col-12 col-lg-6 o_setting_box">
<field name="customer_facing_display_html" widget="html" nolabel="1" options="{
'snippets': 'point_of_sale.customer_facing_display_snippets',
'cssEdit': 'point_of_sale.wysiwyg_iframe_css_assets'
}"/>
</div>
</div>
</div>
</div>
</div>
@@ -81,41 +81,4 @@
</xpath>
</template>
<template id="customer_facing_display_snippets">
<!-- web_editor needs a ul (normally contains the header, body, extra buttons)-->
<ul/>
<div id="o_scroll" class="d-none"/>
<div id="snippet_options" class="d-none">
<t t-call="web_editor.snippet_options"/>
<div data-js='pos_no_remove' data-selector=".pos-company_logo, .pos-adv, .pos-customer_facing_display"/>
<div data-js='pos_no_parent' data-selector=".pos-company_logo, .pos-adv"/>
<div data-js='pos_company_logo' data-selector=".pos-company_logo"/>
<div data-js='pos_palette' data-selector=".pos-customer_facing_display">
<a href="#" class="pos-palette_01 dropdown-item" data-select-class="pos-palette_01"></a>
<a href="#" class="pos-palette_02 dropdown-item" data-select-class="pos-palette_02"></a>
<a href="#" class="pos-palette_03 dropdown-item" data-select-class="pos-palette_03"></a>
<a href="#" class="pos-palette_04 dropdown-item" data-select-class="pos-palette_04"></a>
<a href="#" class="pos-palette_05 dropdown-item" data-select-class="pos-palette_05"></a>
<a href="#" class="pos-palette_06 dropdown-item" data-select-class="pos-palette_06"></a>
<a href="#" class="pos-palette_07 dropdown-item" data-select-class="pos-palette_07"></a>
<a href="#" class="pos-palette_08 dropdown-item" data-select-class="pos-palette_08"></a>
<a href="#" class="pos-palette_09 dropdown-item" data-select-class="pos-palette_09"></a>
<a href="#" class="pos-palette_10 dropdown-item" data-select-class="pos-palette_10"></a>
<a href="#" class="pos-palette_11 dropdown-item" data-select-class="pos-palette_11"></a>
<a href="#" class="pos-palette_12 dropdown-item" data-select-class="pos-palette_12"></a>
<a href="#" class="pos-palette_13 dropdown-item" data-select-class="pos-palette_13"></a>
</div>
<div data-js='pos_background' data-selector=".pos-company_logo, .pos-adv">
<a href="#" class="dropdown-item font-weight-bold" data-choose-image="true" data-no-preview="true">Set Custom Image...</a>
<a href="#" class="dropdown-item d-none pos-use_default_logo" data-background="">Default company logo</a>
<div class="dropdown-divider"/>
<a href="#" class="dropdown-item" data-toggle-class="pos-hidden"><i class="fa fa-eye-slash"/>Hide</a>
</div>
</div>
</template>
</odoo>