[FIX] account: manual reconciliation no data
The function get_all_data_for_manual_reconciliation got an empty list instead of None. This leads to not query the db. However we want to get results in the default behavior for get_all_data_for_manual_reconciliation closes odoo/odoo#33711 Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
This commit is contained in:
@@ -1387,11 +1387,8 @@ var ManualModel = StatementModel.extend({
|
||||
return self.loadData(lines);
|
||||
});
|
||||
default:
|
||||
var partner_ids = context.partner_ids;
|
||||
var account_ids = context.account_ids || self.account_ids;
|
||||
if (partner_ids && !account_ids) account_ids = [];
|
||||
if (!partner_ids && account_ids) partner_ids = [];
|
||||
account_ids = null; // TOFIX: REMOVE ME
|
||||
var partner_ids = context.partner_ids || null;
|
||||
var account_ids = context.account_ids || self.account_ids || null;
|
||||
return self._rpc({
|
||||
model: 'account.reconciliation.widget',
|
||||
method: 'get_all_data_for_manual_reconciliation',
|
||||
|
||||
@@ -477,7 +477,7 @@ var auto_reconciliation = {
|
||||
};
|
||||
|
||||
var data_for_manual_reconciliation_widget = {
|
||||
'[[],null]': {
|
||||
'[null,[282,283,284,285,286,287,288,308,499,500,501,502,503,504]]': {
|
||||
'customers': [
|
||||
{'account_id': 287, 'partner_name': "Agrolait", 'reconciliation_proposition': [], 'currency_id': 3, 'max_date': "2017-02-14 12:30:31", 'last_time_entries_checked': null, 'account_code': "101200", 'partner_id': 8, 'account_name': "101200 Account Receivable", 'mode': "customers"},
|
||||
{'account_id': 7, 'partner_name': "Camptocamp", 'reconciliation_proposition': [], 'currency_id': 3, 'max_date': "2017-02-13 14:24:55", 'last_time_entries_checked': null, 'account_code': "101200", 'partner_id': 12, 'account_name': "101200 Account Receivable", 'mode': "customers"}
|
||||
@@ -1632,7 +1632,7 @@ QUnit.module('account', {
|
||||
assert.expect(5);
|
||||
|
||||
// tweak the data to fit our needs
|
||||
this.params.data_for_manual_reconciliation_widget['[283, null, "", 0, 6]'] = _.extend({}, this.params.data_for_manual_reconciliation_widget['[[],null]']);
|
||||
this.params.data_for_manual_reconciliation_widget['[283, null, "", 0, 6]'] = _.extend({}, this.params.data_for_manual_reconciliation_widget['[null,[282,283,284,285,286,287,288,308,499,500,501,502,503,504]]']);
|
||||
this.params.data_for_manual_reconciliation_widget['[283, null, "", 0, 6]'].accounts[0].reconciliation_proposition = [
|
||||
{account_id: 283, account_type: "other", amount_currency_str: "", currency_id: false, date_maturity: "2017-03-18", date: "2017-02-16",
|
||||
total_amount_str: "$ 500.00", partner_id: 8, account_name: "101000 Current Assets", name: "INV/2017/0987", partner_name: "Agrolait",
|
||||
@@ -1741,7 +1741,7 @@ QUnit.module('account', {
|
||||
QUnit.test('Tax on account receivable', function(assert){
|
||||
assert.expect(21);
|
||||
|
||||
this.params.data_for_manual_reconciliation_widget['[[],null]'].accounts = [];
|
||||
this.params.data_for_manual_reconciliation_widget['[null,[282,283,284,285,286,287,288,308,499,500,501,502,503,504]]'].accounts = [];
|
||||
var clientAction = new ReconciliationClientAction.ManualAction(null, this.params.options);
|
||||
testUtils.addMockEnvironment(clientAction, {
|
||||
data: this.params.data,
|
||||
|
||||
Reference in New Issue
Block a user