[REF] point_of_sale: remove dead code

Commit https://github.com/odoo/odoo/commit/f337496eba58841d9fe2e94367f0450eaf0fa240
left lots of dead code behind. See also https://github.com/odoo/odoo/pull/36133
which this PR depends on (had to wait forward-port before merging this).

Discovered while working on task-1942370

closes odoo/odoo#36136

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2019-09-16 15:03:40 +00:00
parent 0350a93c2d
commit 4de72155c3
5 changed files with 6 additions and 365 deletions
@@ -442,34 +442,6 @@ body .pos-customer_facing_display .pos-payment_info .pos-payment_info_details .p
body .pos-hidden {
opacity: 0;
}
body.editor_enable .pos-hidden {
opacity: 0.1;
background: repeating-linear-gradient(45deg, #f6f6f6, #f6f6f6 5px, #3E3E3E 5px, #3E3E3E 10px) !important;
}
@media all and (orientation: portrait) {
body.editor_enable .pos-customer_facing_display .pos-payment_info .pos-adv {
top: 35px;
}
}
body.editor_enable #oe_manipulators .oe_overlay > .oe_overlay_options > .btn-group > .dropdown.oe_options.btn-group.snippet-option-pos_palette > .dropdown-menu {
min-width: 100px;
max-width: 100px;
}
body.editor_enable #oe_manipulators .oe_overlay > .oe_overlay_options > .btn-group > .dropdown.oe_options.btn-group.snippet-option-pos_palette > .dropdown-menu > .o_main_header {
display: none;
}
body.editor_enable #oe_manipulators .oe_overlay > .oe_overlay_options > .btn-group > .dropdown.oe_options.btn-group.snippet-option-pos_palette > .dropdown-menu > a {
position: relative;
padding: 14px 0 !important;
margin-bottom: 1px;
}
body.editor_enable #oe_manipulators .oe_overlay > .oe_overlay_options > .btn-group > .dropdown.oe_options.btn-group.snippet-option-pos_palette > .dropdown-menu > a:before {
color: #05eb05;
}
body.editor_enable #oe_manipulators .no_parent_options .snippet-option-pos_palette,
body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
display: none;
}
.pos-palette_01 .pos-payment_info {
background: #3E3E3E;
@@ -492,21 +464,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #3E3E3E;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_01 {
background: #f6f6f6 !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_01:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #3E3E3E;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_01:before {
text-shadow: 0 0 1px #090909;
}
.pos-palette_02 .pos-payment_info {
background: #364152;
@@ -529,21 +486,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #364152;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_02 {
background: #ecf2f6 !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_02:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #364152;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_02:before {
text-shadow: 0 0 1px #130d09;
}
.pos-palette_03 .pos-payment_info {
background: #1BA39C;
@@ -566,21 +508,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #1BA39C;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_03 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_03:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #1BA39C;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_03:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_04 .pos-payment_info {
background: #0b7b6c;
@@ -603,21 +530,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #0b7b6c;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_04 {
background: #efeeec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_04:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #0b7b6c;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_04:before {
text-shadow: 0 0 1px #101113;
}
.pos-palette_05 .pos-payment_info {
background: #E26868;
@@ -640,21 +552,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #E26868;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_05 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_05:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #E26868;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_05:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_06 .pos-payment_info {
background: #9E373B;
@@ -677,21 +574,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #9E373B;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_06 {
background: #f6f6f6 !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_06:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #9E373B;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_06:before {
text-shadow: 0 0 1px #090909;
}
.pos-palette_07 .pos-payment_info {
background: #ce9934;
@@ -714,21 +596,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #ce9934;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_07 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_07:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #ce9934;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_07:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_08 .pos-payment_info {
background: #a48c77;
@@ -751,21 +618,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #a48c77;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_08 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_08:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #a48c77;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_08:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_09 .pos-payment_info {
background: linear-gradient(30deg, #014d43, #127e71);
@@ -788,21 +640,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: linear-gradient(30deg, #014d43, #127e71);
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_09 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_09:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: linear-gradient(30deg, #014d43, #127e71);
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_09:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_10 .pos-payment_info {
background: linear-gradient(30deg, #e2316c, #ea4c89);
@@ -825,21 +662,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: linear-gradient(30deg, #e2316c, #ea4c89);
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_10 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_10:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: linear-gradient(30deg, #e2316c, #ea4c89);
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_10:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_11 .pos-payment_info {
background: linear-gradient(30deg, #362b3d, #5b4a63);
@@ -862,21 +684,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: linear-gradient(30deg, #362b3d, #5b4a63);
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_11 {
background: #ececec !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_11:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: linear-gradient(30deg, #362b3d, #5b4a63);
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_11:before {
text-shadow: 0 0 1px #131313;
}
.pos-palette_12 .pos-payment_info {
background: #434343;
@@ -899,21 +706,6 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: #434343;
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_12 {
background: #5b5b5b !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_12:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: #434343;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_12:before {
text-shadow: 0 0 1px #a4a4a4;
}
.pos-palette_13 .pos-payment_info {
background: linear-gradient(30deg, #1a1b1f, #3d3f45);
@@ -936,18 +728,3 @@ body.editor_enable #oe_manipulators .no_parent_options .o_parent_editor_header {
background: linear-gradient(30deg, #1a1b1f, #3d3f45);
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_13 {
background: #a2a2ab !important;
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_13:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 50px;
background: linear-gradient(30deg, #1a1b1f, #3d3f45);
}
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > .pos-palette_13:before {
text-shadow: 0 0 1px #5d5d54;
}
@@ -1,50 +0,0 @@
odoo.define('point_of_sale.editor', function (require) {
'use strict';
var s_options = require('web_editor.snippets.options');
var core = require('web.core');
var _t = core._t;
// Clone default web_editor background image functionalities
s_options.registry.pos_background = s_options.registry.background;
// Show reset button for company logo
s_options.registry.pos_company_logo = s_options.Class.extend({
start: function () {
var self = this;
setTimeout(function(){
self.$overlay.find('.pos-use_default_logo').removeClass('d-none');
},500);
}
});
s_options.registry.pos_no_parent = s_options.Class.extend({
start:function() {
this.$overlay.find('.oe_options').addClass('no_parent_options');
this.$overlay.find('.oe_overlay_options').css({'top':'0px'});
}
});
// Hide 'remove' buttun for element that should not be removed
s_options.registry.pos_no_remove = s_options.Class.extend({
start:function() {
this.$overlay.find('.oe_snippet_remove').addClass('d-none');
this.$('.pos-adv').append($('<div class="pos_adv_onsave_remove text-center" style="color:#666666; padding:10px;">' + _t('Set your customized advertisement here') + '</span>'));
},
cleanForSave: function () {
this.$('.pos_adv_onsave_remove').remove();
}
});
// Palette
s_options.registry.pos_palette = s_options.Class.extend({
start:function() {
this.$overlay.find('.oe_overlay_options').css({'top':'0px', 'left': 'calc(50% - 45px)'}).end()
.find('.oe_options').addClass('snippet-option-pos_palette')
.find('> a').text('Palette').prepend('<i style="margin-right:5px" class="fa fa-paint-brush"/>');
}
});
});
@@ -418,54 +418,6 @@ body {
.pos-hidden {
opacity: 0;
}
// =========== EDIT MODE ===========
&.editor_enable {
.pos-hidden {
opacity: 0.1;
background: repeating-linear-gradient(
45deg,
$color-gray-lighter,
$color-gray-lighter 5px,
$color-gray-dark 5px,
$color-gray-dark 10px
)!important;
}
@media all and (orientation: portrait) {
.pos-customer_facing_display {
.pos-payment_info .pos-adv {
top: 35px;
}
}
}
#oe_manipulators .oe_overlay > .oe_overlay_options > .btn-group> .dropdown.oe_options.btn-group.snippet-option-pos_palette > .dropdown-menu {
min-width: 100px;
max-width: 100px;
> .o_main_header {
display: none;
}
> a {
position: relative;
padding: 14px 0!important;
margin-bottom: 1px;
&:before {
color: #05eb05;
}
}
}
#oe_manipulators .no_parent_options {
.snippet-option-pos_palette,
.o_parent_editor_header {
display: none;
}
}
}
}
@@ -503,28 +455,11 @@ body {
background: $bg-info;
}
}
}
// Editor dropdown buttons
#oe_manipulators .oe_overlay > .oe_overlay_options .snippet-option-pos_palette > .dropdown-menu > & {
background: $bg-products!important;
&:after {
content: "";
position: absolute;
top:0;
right: 0;
bottom:0;
left: 50px;
background: $bg-info;
}
&:before {
text-shadow: 0 0 1px invert($bg-products);
}
}
};
// =========== PALETTE ===========
// =========== PALETTES ===========
// Those are kept for compatibility for now (previously there was a feature
// which allowed to change the default pos-palette_01 class.
.pos-palette_01 { @include palette-variant; }
.pos-palette_02 { @include palette-variant(#364152, #e6e7e8, #ecf2f6, #364152, white, $color-gray-dark, #364152 ); }
.pos-palette_03 { @include palette-variant(#1BA39C, $color-gray-lighter, #ececec ); }
@@ -533,10 +468,8 @@ body {
.pos-palette_06 { @include palette-variant(#9E373B, $color-gray-lighter); }
.pos-palette_07 { @include palette-variant(#ce9934, white, #ececec ); }
.pos-palette_08 { @include palette-variant(#a48c77, $color-gray-lighter, #ececec ); }
.pos-palette_09 { @include palette-variant(linear-gradient(30deg, #014d43, #127e71), $color-gray-lighter, #ececec ); }
.pos-palette_10 { @include palette-variant(linear-gradient(30deg, #e2316c, #ea4c89), white, #ececec ); }
.pos-palette_11 { @include palette-variant(linear-gradient(30deg, #362b3d, #5b4a63), white, #ececec ); }
.pos-palette_12 { @include palette-variant(#434343, #e6e6e6, #5b5b5b, #bdb9b9, #f5f5f5); }
.pos-palette_13 { @include palette-variant(linear-gradient(30deg, #1a1b1f, #3d3f45), white, #a2a2ab, $color-gray-lighter, $color-gray-lighter); }
+2 -3
View File
@@ -933,7 +933,7 @@
<t t-call="OrderReceiptWrappedProductNameLines"/>
<t t-if="line.display_discount_policy == 'without_discount' &amp;&amp; line.price != line.price_lst">
<div class="pos-receipt-left-padding">
<t t-esc="widget.format_currency_no_symbol(line.price_lst)" />
<t t-esc="widget.format_currency_no_symbol(line.price_lst)" />
->
<t t-esc="widget.format_currency_no_symbol(line.price)" />
</div>
@@ -1458,7 +1458,7 @@
</em>
<t t-esc="line.get_unit().name" />
at
<t t-if="line.display_discount_policy() == 'without_discount' &amp;&amp;
<t t-if="line.display_discount_policy() == 'without_discount' &amp;&amp;
line.get_unit_display_price() != line.get_lst_price()">
<s>
<t t-esc="widget.format_currency(line.get_lst_price(),'Product Price')" />
@@ -1733,7 +1733,6 @@
</div>
</t>
<!-- This is a duplicate of xml_id = point_of_sale.extra_head . We could have told models.js to do an extra rpc call for this-->
<t t-name="CustomerFacingDisplayHead">
<div class="resources">
<base t-att-href="origin"/>
@@ -64,22 +64,4 @@
</html>
</template>
<!-- This is a duplicate of Qweb template JS side CustomerFacingDisplayHead. We could have told models.js to do an extra rpc call for this-->
<template id="extra_head">
<link href="/point_of_sale/static/src/css/customer_facing_display.css" rel="stylesheet"/>
<script type="text/javascript">
$(document).ready(function(){
$(window).on('resize', function () {
$('.pos-customer_facing_display').toggleClass('pos-js_no_ADV', $('.pos-adv').hasClass('pos-hidden'));
}).trigger('resize');
});
</script>
</template>
<template id="pos_editor_assets" inherit_id="web_editor.assets_wysiwyg">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/point_of_sale/static/src/js/pos.web_editor.js"/>
</xpath>
</template>
</odoo>