[FIX] web,account,google_calendar: chasing breaking spaces
Before this commit, some breaking spaces were present in the js code. Such spaces are misinterpreted and worked by luck. This has become a problem with exported js bunldes (e.g. the external_lib bundle in im_livechat). This commit replaces breaking spaces by regular spaces.
This commit is contained in:
@@ -956,7 +956,7 @@ QUnit.module('account', {
|
||||
});
|
||||
clientAction.appendTo($('#qunit-fixture'));
|
||||
|
||||
assert.strictEqual(clientAction.$('.accounting_view tfoot .cell_right, .accounting_view tfoot .cell_left').text().replace(/[$, ]+/g, ''), " 1175.00 32.58 2000.00", "should display the open balance values");
|
||||
assert.strictEqual(clientAction.$('.accounting_view tfoot .cell_right, .accounting_view tfoot .cell_left').text().replace(/[$, ]+/g, ''), " 1175.00 32.58 2000.00", "should display the open balance values");
|
||||
|
||||
var widget = clientAction.widgets[0];
|
||||
|
||||
@@ -988,8 +988,8 @@ QUnit.module('account', {
|
||||
|
||||
widget.$('.create .create_amount input').val('1100.00').trigger('input');
|
||||
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_right').text(), "$ 1100.00", "should display the value 1100.00 in right column");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_right').text(), "$ 75.00", "should display 'Open Balance' line because the rest to reconcile is 75.00");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_right').text(), "$ 1100.00", "should display the value 1100.00 in right column");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_right').text(), "$ 75.00", "should display 'Open Balance' line because the rest to reconcile is 75.00");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody tr').length, 1, "should have ever only the created reconcile line");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody tr').text().replace(/[\n\r\s$,]+/g, ' '), " 101200 SAJ/2014/002 and SAJ/2014/003 1100.00 ",
|
||||
"the new line should be update the amout");
|
||||
@@ -1001,9 +1001,9 @@ QUnit.module('account', {
|
||||
$('.ui-autocomplete .ui-menu-item a:contains(101000 Current Assets)').trigger('mouseenter').trigger('click');
|
||||
widget.$('.create .create_label input').val('test0').trigger('input');
|
||||
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_left:last').text(), "$ 100.00", "should display the value 100.00 in left column");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_left:last').text(), "$ 100.00", "should display the value 100.00 in left column");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_label').text(), "Open balance", "should display 'Open Balance'");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_right').text(), "$ 175.00", "should display 'Open Balance' line because the rest to reconcile is 175.00");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_right').text(), "$ 175.00", "should display 'Open Balance' line because the rest to reconcile is 175.00");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody tr').length, 2, "should have 2 created reconcile lines");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody tr:eq(1)').text().replace(/[\n\r\s$,]+/g, ' '), " 101000 test0 100.00 ",
|
||||
"the new line should have the selected account, name and amout");
|
||||
@@ -1018,9 +1018,9 @@ QUnit.module('account', {
|
||||
$('.ui-autocomplete .ui-menu-item a:contains(101000 Current Assets)').trigger('mouseenter').trigger('click');
|
||||
widget.$('.create .create_label input').val('test1').trigger('input');
|
||||
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_right:last').text(), "$ 200.00", "should display the value 200.00 in left column");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody .cell_right:last').text(), "$ 200.00", "should display the value 200.00 in left column");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_label').text(), "Create Write-off", "should display 'Create Write-off'");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_left').text(), "$ 25.00", "should display 'Create Write-off' with 25.00 in left column");
|
||||
assert.strictEqual(widget.$('.accounting_view tfoot .cell_left').text(), "$ 25.00", "should display 'Create Write-off' with 25.00 in left column");
|
||||
assert.strictEqual(widget.$('.accounting_view tbody tr').length, 3, "should have 3 created reconcile lines");
|
||||
|
||||
clientAction.destroy();
|
||||
|
||||
@@ -27,8 +27,8 @@ QUnit.module('Google Calendar', {
|
||||
type: {string: "type", type: "integer"},
|
||||
},
|
||||
records: [
|
||||
{id: 5, user_id: 4, partner_id: 4, name: "event 1", start: "2016-12-13 15:55:05", stop: "2016-12-15 18:55:05", allday: false, partner_ids: [], type: 2},
|
||||
{id: 6, user_id: 4, partner_id: 4, name: "event 2", start: "2016-12-18 08:00:00", stop: "2016-12-18 09:00:00", allday: false, partner_ids: [], type: 3}
|
||||
{id: 5, user_id: 4, partner_id: 4, name: "event 1", start: "2016-12-13 15:55:05", stop: "2016-12-15 18:55:05", allday: false, partner_ids: [], type: 2},
|
||||
{id: 6, user_id: 4, partner_id: 4, name: "event 2", start: "2016-12-18 08:00:00", stop: "2016-12-18 09:00:00", allday: false, partner_ids: [], type: 3}
|
||||
],
|
||||
check_access_rights: function () {
|
||||
return $.when(true);
|
||||
|
||||
@@ -52,19 +52,19 @@ return {
|
||||
|
||||
if (options.method === 'read_group') {
|
||||
if (!(params.args && params.args[0] !== undefined)) {
|
||||
params.kwargs.domain = options.domain || params.domain || params.kwargs.domain || [];
|
||||
params.kwargs.domain = options.domain || params.domain || params.kwargs.domain || [];
|
||||
}
|
||||
if (!(params.args && params.args[1] !== undefined)) {
|
||||
params.kwargs.fields = options.fields || params.fields || params.kwargs.fields || [];
|
||||
params.kwargs.fields = options.fields || params.fields || params.kwargs.fields || [];
|
||||
}
|
||||
if (!(params.args && params.args[2] !== undefined)) {
|
||||
params.kwargs.groupby = options.groupBy || params.groupBy || params.kwargs.groupby || [];
|
||||
params.kwargs.groupby = options.groupBy || params.groupBy || params.kwargs.groupby || [];
|
||||
}
|
||||
params.kwargs.offset = options.offset || params.offset || params.kwargs.offset;
|
||||
params.kwargs.limit = options.limit || params.limit || params.kwargs.limit;
|
||||
params.kwargs.offset = options.offset || params.offset || params.kwargs.offset;
|
||||
params.kwargs.limit = options.limit || params.limit || params.kwargs.limit;
|
||||
// In kwargs, we look for "orderby" rather than "orderBy" (note the absence of capital B),
|
||||
// since the Python argument to the actual function is "orderby".
|
||||
var orderBy = options.orderBy || params.orderBy || params.kwargs.orderby;
|
||||
var orderBy = options.orderBy || params.orderBy || params.kwargs.orderby;
|
||||
params.kwargs.orderby = orderBy ? this._serializeSort(orderBy) : orderBy;
|
||||
params.kwargs.lazy = 'lazy' in options ? options.lazy : params.lazy;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ return {
|
||||
if (options.method === 'search_read') {
|
||||
// call the model method
|
||||
params.kwargs.domain = options.domain || params.domain || params.kwargs.domain;
|
||||
params.kwargs.fields = options.fields || params.fields || params.kwargs.fields;
|
||||
params.kwargs.fields = options.fields || params.fields || params.kwargs.fields;
|
||||
params.kwargs.offset = options.offset || params.offset || params.kwargs.offset;
|
||||
params.kwargs.limit = options.limit || params.limit || params.kwargs.limit;
|
||||
// In kwargs, we look for "order" rather than "orderBy" since the Python
|
||||
|
||||
@@ -306,7 +306,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
_disableButtons: function () {
|
||||
_disableButtons: function () {
|
||||
if (this.$buttons) {
|
||||
this.$buttons.find('button').attr('disabled', true);
|
||||
}
|
||||
@@ -352,7 +352,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
_enableButtons: function () {
|
||||
_enableButtons: function () {
|
||||
if (this.$buttons) {
|
||||
this.$buttons.find('button').removeAttr('disabled');
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ QUnit.module('upgrade_fields', {
|
||||
"the upgrade label shouldn't be inside the field section");
|
||||
assert.strictEqual(form.$('.o_label .label').length, 1,
|
||||
"the upgrade label should be inside the label section");
|
||||
assert.strictEqual(form.$('.o_label').text(), "Bar EnterpriseCoucou",
|
||||
assert.strictEqual(form.$('.o_label').text(), "Bar EnterpriseCoucou",
|
||||
"the upgrade label should be inside the label section");
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
@@ -792,7 +792,7 @@ var MockServer = Class.extend({
|
||||
var result = this._mockSearchReadController({
|
||||
model: model,
|
||||
domain: kwargs.domain || args[0],
|
||||
fields: kwargs.fields || args[1],
|
||||
fields: kwargs.fields || args[1],
|
||||
offset: kwargs.offset || args[2],
|
||||
limit: kwargs.limit || args[3],
|
||||
order: kwargs.order || args[4],
|
||||
|
||||
Reference in New Issue
Block a user