Browse Source

[FIX] mis_builder: use =like instead of like to search on account codes

pull/189/head
Stéphane Bidoul 9 years ago
parent
commit
46f806de2c
  1. 6
      mis_builder/CHANGES.rst
  2. 2
      mis_builder/models/aep.py

6
mis_builder/CHANGES.rst

@ -9,9 +9,11 @@ Changelog
9.0.1.0.0 (2016-??-??) 9.0.1.0.0 (2016-??-??)
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
* Correctly compute the initial balance of income and expense account
* [FIX] use =like instead of like to search for accounts, because
the % are added by the user in the expressions
* [FIX] Correctly compute the initial balance of income and expense account
based on the start of the fiscal year based on the start of the fiscal year
* Support date ranges (from OCA/server-tools/date_range) as a more
* [IMP] Support date ranges (from OCA/server-tools/date_range) as a more
flexible alternative to fiscal periods flexible alternative to fiscal periods
* v9 migration: fiscal periods are removed, account charts are removed, * v9 migration: fiscal periods are removed, account charts are removed,
consolidation accounts have been removed consolidation accounts have been removed

2
mis_builder/models/aep.py

@ -86,7 +86,7 @@ class AccountingExpressionProcessor(object):
self._account_ids_by_code[account_code].update(account_ids) self._account_ids_by_code[account_code].update(account_ids)
elif '%' in account_code: elif '%' in account_code:
account_ids = account_model.\ account_ids = account_model.\
search([('code', 'like', account_code),
search([('code', '=like', account_code),
('company_id', '=', company.id)]).ids ('company_id', '=', company.id)]).ids
self._account_ids_by_code[account_code].update(account_ids) self._account_ids_by_code[account_code].update(account_ids)
else: else:

Loading…
Cancel
Save