Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REM] point_of_sale: Remove customised customer display feature #34944

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions addons/point_of_sale/models/pos_config.py
Expand Up @@ -94,8 +94,9 @@ def _get_group_pos_manager(self):
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",
Expand Down Expand Up @@ -188,7 +189,7 @@ def _compute_default_customer_html(self):
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")
Expand Down

This file was deleted.

13 changes: 3 additions & 10 deletions addons/point_of_sale/views/point_of_sale.xml
Expand Up @@ -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">
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -102,7 +95,7 @@
</div>
</div>
</div>
</t>
</t>
</template>

</odoo>
9 changes: 0 additions & 9 deletions addons/point_of_sale/views/pos_config_view.xml
Expand Up @@ -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>
Expand Down
37 changes: 0 additions & 37 deletions addons/point_of_sale/views/pos_templates.xml
Expand Up @@ -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>