diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-04-27 11:56:54 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-04-27 12:01:21 +0200 |
| commit | 3e7d3c7ee4f8838e0a9c347eca016e746175a634 (patch) | |
| tree | e5d88068ef26f07e37cf729ffc21e64e0269a54a /openerp/sql_db.py | |
| parent | e8ffc09b30509ba80f1c74fb5269b0b77ff67458 (diff) | |
[FIX] account: tax_amount can be null in database
The `tax_amount` of move lines is by default set to `0.0`.
Nevertheless, this default value is set by Odoo,
not by postgresql.
This is therefore likely that the `tax_amount` is set as
null instead of 0.0, in database.
Therefore, when getting this value directly with a SQL
request, this is possible that `null` will be returned.
Therefore, in this specific case, `res.get(record.id, 0.0`
could return `False`, if the sum of `tax_amount` is `null`,
and try to multiply a boolean with an integer is not possible:
`_rec_get(rec) * rec.sign`
opw-633903
Diffstat (limited to 'openerp/sql_db.py')
0 files changed, 0 insertions, 0 deletions
