diff options
| author | Raphael Collet <rco@openerp.com> | 2014-11-03 16:00:50 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2014-11-04 13:47:57 +0100 |
| commit | f2e4a10e1a58c932f9a989e642771f5ae75d756a (patch) | |
| tree | b5d933afe79088ecf5b8a5bc9eae957fb8898b0b /addons/decimal_precision/tests/test_qweb_float.py | |
| parent | 0f52e22906a969a8ca3b2c38acddf5bf8a6386be (diff) | |
[IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns. This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...
This commit contains the following changes:
- adapt several methods of BaseModel to use fields instead of columns and
_all_columns
- copy all semantic-free attributes of related fields from their source
- add attribute 'group_operator' on integer and float fields
- base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
payment_acquirer, share, website, website_crm, website_mail: simply use
_fields instead of _all_columns
- base, decimal_precision, website: adapt qweb rendering methods to use fields
instead of columns
Diffstat (limited to 'addons/decimal_precision/tests/test_qweb_float.py')
| -rw-r--r-- | addons/decimal_precision/tests/test_qweb_float.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/decimal_precision/tests/test_qweb_float.py b/addons/decimal_precision/tests/test_qweb_float.py index 93334170f37..c481dba2fd9 100644 --- a/addons/decimal_precision/tests/test_qweb_float.py +++ b/addons/decimal_precision/tests/test_qweb_float.py @@ -8,10 +8,10 @@ class TestFloatExport(common.TransactionCase): def get_converter(self, name): converter = self.registry('ir.qweb.field.float') - column = self.Model._all_columns[name].column + field = self.Model._fields[name] return lambda value, options=None: converter.value_to_html( - self.cr, self.uid, value, column, options=options, context=None) + self.cr, self.uid, value, field, options=options, context=None) def test_basic_float(self): converter = self.get_converter('float') |
