Commit Graph
8 Commits
Author SHA1 Message Date
Victor Feyens 550a47c1f8 [IMP] base: warning on decimal precision change 2020-11-27 16:10:01 +00:00
Raphael Collet eff6ce5e48 [FIX] core: decimal precision after update
When modifying a field's decimal precision, the caches are cleared in
order to retrieve the new value from the database.  As the new value is
retrieved in pure SQL, one has to flush the updates before doing the
query!

X-original-commit: 8a9617d045c2afda8d804a5863df927012f0692c
2020-11-24 19:06:38 +00:00
Xavier Morel 75f2984834 [REM] base: precision() override on ir.qweb.field.float
Code's been dead since 3407fb70e4
essentially inlined its behaviour into the base class.

closes odoo/odoo#53774

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-29 06:16:01 +00:00
Adrian Torres 4b38cc6590 [REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.

Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-17 14:13:12 +02:00
Raphael Collet c552fb7a61 [IMP] api: remove deprecated decorators 2019-07-08 13:51:35 +00:00
Martin Trigaux dd2fae2ead [IMP] base: remove decimal.precision.test model
It should not be a standard model but a test model
2019-07-03 11:16:24 +00:00
Martin TrigauxandOlivier Dony 82be146954 [IMP] base: keep backward compatibility for decimal_precision
As the decimal_precision module was removed, allow code like

    from odoo.addons import decimal_precision as dp
    fields.Float(digits=dp.get_precision('Foo')

to keep working

Co-authored-by: Olivier Dony <odo@odoo.com>
2019-07-03 11:15:48 +00:00
Mitali Patel 0c5121a979 [IMP] decimal_precision: integrate into base
The decimal precision feature makes sense to be an ORM feature, no need to be
in a specific module

Previous syntax was
    from odoo.addons import decimal_precision as dp
    fields.Float(digits=dp.get_precision('Foo'))

and now is:
    fields.Float(digits='Foo')

Remove the possibility to have a callable method on the digits attribute (it
was only used for precision anyway) and directly retrieve the digits on the
decimal.precision model

Rename the method digits to get_digits to avoid confusion between the field
attribute when declaring a field and the method to retrieve the precision

Task id: 48198
2019-07-03 11:15:48 +00:00