From e0bc158655b03150f6848f4243136aa66311c38e Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Thu, 9 Aug 2018 11:41:49 +0200 Subject: [PATCH] [FIX] account: fix missing 'amount_type' field on testing data Since https://github.com/odoo/odoo/commit/10b9d06689c55e5273d2fdff560403cac59278be, the reconciliation widget tests failed because the code is using the 'amount_type' field on 'account_tax'. However, this field is not specified on testing data. --- .../static/src/js/reconciliation/reconciliation_model.js | 1 - addons/account/static/tests/reconciliation_tests.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index 6f0f756930c..44668fc79c4 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -842,7 +842,6 @@ var StatementModel = BasicModel.extend({ var args = [[prop.tax_id.id], prop.base_amount, formatOptions.currency_id]; var add_context = {'round': true}; - debugger; if(line.createForm.force_tax_included && prop.tax_id.amount_type !== "group") add_context.force_price_include = true; tax_defs.push(self._rpc({ diff --git a/addons/account/static/tests/reconciliation_tests.js b/addons/account/static/tests/reconciliation_tests.js index d83eb280c33..8c51fa4db0f 100644 --- a/addons/account/static/tests/reconciliation_tests.js +++ b/addons/account/static/tests/reconciliation_tests.js @@ -81,10 +81,11 @@ var db = { price_include: {string: "Included in Price", type: 'boolean'}, account_id: {string: "partner", type: 'many2one', relation: 'account.account'}, company_id: {string: "Company", type: 'many2one', relation: 'res.company'}, + amount_type: {string: "type", type: 'selection'} }, records: [ - {id: 6, display_name: "Tax 20.00%", amount: 20, price_include: false, company_id: 1}, - {id: 7, display_name: "Tax 10.00% include", amount: 10, price_include: true, account_id: 288, company_id: 1}, + {id: 6, display_name: "Tax 20.00%", amount: 20, amount_type: 'percent', price_include: false, company_id: 1}, + {id: 7, display_name: "Tax 10.00% include", amount: 10, amount_type: 'percent', price_include: true, account_id: 288, company_id: 1}, ], json_friendly_compute_all: function (args) { var tax = _.find(db['account.tax'].records, {'id': args[0][0]});