[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.
This commit is contained in:
Laurent Smet
2018-08-09 12:28:02 +02:00
parent c3adeb8420
commit e0bc158655
2 changed files with 3 additions and 3 deletions
@@ -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({
@@ -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]});