From f337496eba58841d9fe2e94367f0450eaf0fa240 Mon Sep 17 00:00:00 2001 From: Pragya Ladda Date: Tue, 23 Jul 2019 11:44:30 +0000 Subject: [PATCH] [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 --- addons/point_of_sale/models/pos_config.py | 7 ++-- .../customer_facing_display_editor_thumb.css | 3 -- addons/point_of_sale/views/point_of_sale.xml | 13 ++----- .../point_of_sale/views/pos_config_view.xml | 9 ----- addons/point_of_sale/views/pos_templates.xml | 37 ------------------- 5 files changed, 7 insertions(+), 62 deletions(-) delete mode 100644 addons/point_of_sale/static/src/css/customer_facing_display_editor_thumb.css 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 @@ - - 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 @@ -
Save this configuration to see and edit the customer display
-
-
- -
-
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 @@ - -