summaryrefslogtreecommitdiff
path: root/addons/l10n_fr_fec
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2020-06-18 16:21:01 +0000
committerJeremy Kersten <jke@odoo.com>2020-07-14 15:52:59 +0000
commit76b2de42f47d6d3196e3b1ead6ff3fe85b357c17 (patch)
tree91638158da3cf67ec4e08360b12b1f2eb4c95263 /addons/l10n_fr_fec
parent92a7f8c13fa6bc84a66f973f9454971d346fd801 (diff)
[FIX] *: handle null value for boolean in sql queries
It has always been a best effort until the v13 to have false as default value for boolean field. Until v13: https://github.com/odoo/odoo/blob/12.0/odoo/models.py#L3645 During ORM refactoring in v13 it has been replaced by a default value in sql From v13: https://github.com/odoo/odoo/blob/13.0/odoo/tools/sql.py#L79 But with a typo since columntype for boolean is bool and not boolean. What's mean that in v13 we have a lot of null value for boolean (~=False) In all cases, we try to be aware and check Falsy boolean with 'null or False' (https://github.com/odoo/odoo/blob/13.0/odoo/osv/expression.py#L1230) So we should do the same when we write pure sql in method bypassing the ORM. closes odoo/odoo#53391 closes odoo/odoo#54458 Related: odoo/enterprise#11319 Related: odoo/enterprise#11838 X-original-commit: 118c9f6aafd423f415b2bbfcf8a9cfcd676d9b92 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/l10n_fr_fec')
-rw-r--r--addons/l10n_fr_fec/wizard/account_fr_fec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/l10n_fr_fec/wizard/account_fr_fec.py b/addons/l10n_fr_fec/wizard/account_fr_fec.py
index 0484c10ce1c..497a716109c 100644
--- a/addons/l10n_fr_fec/wizard/account_fr_fec.py
+++ b/addons/l10n_fr_fec/wizard/account_fr_fec.py
@@ -57,7 +57,7 @@ class AccountFrFec(models.TransientModel):
WHERE
am.date < %s
AND am.company_id = %s
- AND aat.include_initial_balance = 'f'
+ AND aat.include_initial_balance IS NOT TRUE
AND (aml.debit != 0 OR aml.credit != 0)
'''
# For official report: only use posted entries