summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorPragya Ladda <pla@odoo.com>2019-07-23 11:44:30 +0000
committerPierre Masereel <pim@odoo.com>2019-08-08 09:24:38 +0000
commitf337496eba58841d9fe2e94367f0450eaf0fa240 (patch)
tree7555ad8d126d8c36369853aaab3b725a8793d156 /addons
parent0eb0bede2014ae1fc24b99a1d1ae541a9d17bdb9 (diff)
[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>
Diffstat (limited to 'addons')
-rw-r--r--addons/point_of_sale/models/pos_config.py7
-rw-r--r--addons/point_of_sale/static/src/css/customer_facing_display_editor_thumb.css3
-rw-r--r--addons/point_of_sale/views/point_of_sale.xml13
-rw-r--r--addons/point_of_sale/views/pos_config_view.xml9
-rw-r--r--addons/point_of_sale/views/pos_templates.xml37
5 files changed, 7 insertions, 62 deletions
diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py
index 8fd60d0f662..bb550afe547 100644
--- a/addons/point_of_sale/models/pos_config.py
+++ b/addons/point_of_sale/models/pos_config.py
@@ -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")
diff --git a/addons/point_of_sale/static/src/css/customer_facing_display_editor_thumb.css b/addons/point_of_sale/static/src/css/customer_facing_display_editor_thumb.css
deleted file mode 100644
index 0c43de63759..00000000000
--- a/addons/point_of_sale/static/src/css/customer_facing_display_editor_thumb.css
+++ /dev/null
@@ -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")
-}
diff --git a/addons/point_of_sale/views/point_of_sale.xml b/addons/point_of_sale/views/point_of_sale.xml
index f3d509cc57e..272d592e3a6 100644
--- a/addons/point_of_sale/views/point_of_sale.xml
+++ b/addons/point_of_sale/views/point_of_sale.xml
@@ -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>
diff --git a/addons/point_of_sale/views/pos_config_view.xml b/addons/point_of_sale/views/pos_config_view.xml
index 68ee9c842c1..23809c269ff 100644
--- a/addons/point_of_sale/views/pos_config_view.xml
+++ b/addons/point_of_sale/views/pos_config_view.xml
@@ -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>
diff --git a/addons/point_of_sale/views/pos_templates.xml b/addons/point_of_sale/views/pos_templates.xml
index a4050ebd3dc..bc555a2ab6d 100644
--- a/addons/point_of_sale/views/pos_templates.xml
+++ b/addons/point_of_sale/views/pos_templates.xml
@@ -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>