diff --git a/addons/account/models/account.py b/addons/account/models/account.py index cf0dcc4a605..beab40c9ddb 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -978,6 +978,7 @@ class AccountTax(models.Model): 'account_id': tax.account_id.id, 'refund_account_id': tax.refund_account_id.id, 'analytic': tax.analytic, + 'price_include': tax.price_include, }) return { diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index b07961b9ef1..8f81b700168 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -773,6 +773,8 @@ var StatementModel = BasicModel.extend({ '__focus': false }); + prop.computed_with_tax = tax.price_include + prop.tax_amount = tax.amount prop.amount = tax.base; prop.amount_str = field_utils.format.monetary(Math.abs(prop.amount), {}, formatOptions); prop.invalid = !self._isValid(prop); @@ -1042,7 +1044,8 @@ var StatementModel = BasicModel.extend({ * @returns {object} */ _formatToProcessReconciliation: function (line, prop) { - var amount = -prop.amount; + // Do not forward port in master. @CSN will change this + var amount = prop.computed_with_tax && -prop.base_amount || -prop.amount; if (prop.partial_reconcile === true) { amount = -line.st_line.amount; } @@ -1050,6 +1053,10 @@ var StatementModel = BasicModel.extend({ name : prop.label, debit : amount > 0 ? amount : 0, credit : amount < 0 ? -amount : 0, + // This one isn't usefull for the server, + // But since we need to change the amount (and thus its semantics) into base_amount + // It might be useful to have a trace in the RPC for debugging purposes + computed_with_tax: prop.computed_with_tax, }; if (!isNaN(prop.id)) { result.counterpart_aml_id = prop.id; diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index b794d0303a3..558f7e53961 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -221,6 +221,10 @@ FormRenderer.include({ params: {action_id: params.actionID} }) .then(function (action) { + if (!action) { + // the action does not exist anymore + return $.when(); + } var view = _.find(action.views, function (descr) { return descr[1] === params.viewType; }); diff --git a/addons/board/static/tests/dashboard_tests.js b/addons/board/static/tests/dashboard_tests.js index d884c33b991..21067b32c44 100644 --- a/addons/board/static/tests/dashboard_tests.js +++ b/addons/board/static/tests/dashboard_tests.js @@ -365,4 +365,42 @@ QUnit.test('twice the same action in a dashboard', function (assert) { form.destroy(); }); +QUnit.test('non-existing action in a dashboard', function (assert) { + assert.expect(1); + + var form = createView({ + View: FormView, + model: 'board', + data: this.data, + arch: '
' + + '' + + '' + + '' + + '' + + '' + + '
', + intercepts: { + load_views: function () { + throw new Error('load_views should not be called'); + } + }, + mockRPC: function (route) { + if (route === '/board/static/src/img/layout_1-1-1.png') { + return $.when(); + } + if (route === '/web/action/load') { + // server answer if the action doesn't exist anymore + return $.when(false); + } + return this._super.apply(this, arguments); + }, + }); + + assert.strictEqual(form.$('.oe_action:contains(ABC)').length, 1, + "there should be a box for the non-existing action"); + + form.destroy(); +}); + + }); diff --git a/addons/hr/i18n/hr.pot b/addons/hr/i18n/hr.pot index b883df62277..06a2bd3b681 100644 --- a/addons/hr/i18n/hr.pot +++ b/addons/hr/i18n/hr.pot @@ -599,11 +599,6 @@ msgstr "" msgid "Private Information" msgstr "" -#. module: hr -#: model:ir.ui.view,arch_db:hr.res_config_settings_view_form -msgid "Prout prout prout" -msgstr "" - #. module: hr #: model:ir.ui.view,arch_db:hr.view_hr_job_form msgid "Recruitment" diff --git a/addons/hr/views/res_config_settings_views.xml b/addons/hr/views/res_config_settings_views.xml index 7c7bb5f7fe5..37c2e566b4d 100644 --- a/addons/hr/views/res_config_settings_views.xml +++ b/addons/hr/views/res_config_settings_views.xml @@ -9,7 +9,7 @@

Work Organization

-
+