Skip to content
Permalink
Browse files

[FIX] web, account: fix RTL popover on invoice

Reproduce the issue

    - Load Arabic language
    - Install Accounting
    - Create an invoice & add credit note
    - Switch to arabic
    - Click on the "(i)" icon near the total price

    The popover is displayed at the other side of the screen

Cause

    - RTLcss was reversing the "left: 0" css property to "right: 0"
    - The popover configuration was not adapted for RTL

This commit ignore RTL for the popover css "left" property and
configure correctly the JS side

OPW-2146210

X-original-commit: 88f03f0
  • Loading branch information
jvm-odoo committed Dec 2, 2019
1 parent 3b0c93a commit dd079e3b63cffbb493df45c691c864324a0f4fc2
@@ -7,7 +7,7 @@ var field_registry = require('web.field_registry');
var field_utils = require('web.field_utils');

var QWeb = core.qweb;

var _t = core._t;

var ShowPaymentLineWidget = AbstractField.extend({
events: _.extend({
@@ -55,6 +55,7 @@ var ShowPaymentLineWidget = AbstractField.extend({
title: info.title
}));
_.each(this.$('.js_payment_info'), function (k, v){
var isRTL = _t.database.parameters.direction === "rtl";
var content = info.content[v];
var options = {
content: function () {
@@ -76,7 +77,7 @@ var ShowPaymentLineWidget = AbstractField.extend({
return $content;
},
html: true,
placement: 'left',
placement: isRTL ? 'bottom' : 'left',
title: 'Payment Information',
trigger: 'focus',
delay: { "show": 0, "hide": 100 },
@@ -84,3 +84,8 @@
.btn:not(:disabled):not(.disabled) {
cursor: pointer;
}

// Disable RTL for the popover position
.popover {
right: auto#{"/*rtl:ignore*/"};
}

0 comments on commit dd079e3

Please sign in to comment.
You can’t perform that action at this time.