Skip to content

Commit

Permalink
[FIX] account: remove useless TOFIX lines
Browse files Browse the repository at this point in the history
There is nothing preventint to remove this line
The second FIXME is preserved to keep the tests running, as the account functionality of the function may be removed

closes #30323
  • Loading branch information
william-andre committed Feb 7, 2019
1 parent 5c13831 commit 6dd2599
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Expand Up @@ -1337,11 +1337,10 @@ var ManualModel = StatementModel.extend({
});
default:
var partner_ids = context.partner_ids;
var account_ids = self.account_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
partner_ids = null; // TOFIX: REMOVE ME
return self._rpc({
model: 'account.reconciliation.widget',
method: 'get_all_data_for_manual_reconciliation',
Expand Down
6 changes: 3 additions & 3 deletions addons/account/static/tests/reconciliation_tests.js
Expand Up @@ -474,7 +474,7 @@ var auto_reconciliation = {
};

var data_for_manual_reconciliation_widget = {
'[null,null]': {
'[[],null]': {
'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"}
Expand Down Expand Up @@ -1622,7 +1622,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,null]']);
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]'].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",
Expand Down Expand Up @@ -1731,7 +1731,7 @@ QUnit.module('account', {
QUnit.test('Tax on account receivable', function(assert){
assert.expect(21);

this.params.data_for_manual_reconciliation_widget['[null,null]'].accounts = [];
this.params.data_for_manual_reconciliation_widget['[[],null]'].accounts = [];
var clientAction = new ReconciliationClientAction.ManualAction(null, this.params.options);
testUtils.addMockEnvironment(clientAction, {
data: this.params.data,
Expand Down

0 comments on commit 6dd2599

Please sign in to comment.