odoo/openerp/osv
Raphael Collet 5ec8596f67 [FIX] fields: fix `_column.new()` by relying on `to_field_args()`
The implementation was based on the ill-defined method `same_parameters()` that
compares arguments based on a heuristic.  Instead, we now create a new column
and check whether it is equivalent to `self` by comparing the arguments
returned by `to_field_args()`.  If that is the case, `self` is reused instead
of the new column.

The code refactoring also fixes the column reuse which was broken by the
introduction of the parameter `compute` in commit 9333c62.  Indeed, with that
parameter, `same_parameters()` always returned False, since old-api columns do
not have that parameter by default.  The parameter has been renamed to
`_computed_field`, and is no longer passed for creating columns.
2015-02-23 15:50:09 +01:00
..
__init__.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
expression.py [FIX] orm: Revert 332154444d && acd7d84da4 2015-01-21 18:33:36 +01:00
fields.py [FIX] fields: fix `_column.new()` by relying on `to_field_args()` 2015-02-23 15:50:09 +01:00
orm.py [MERGE] forward port of branch 7.0 up to 284ca73 2014-12-08 14:57:21 +01:00
osv.py [MERGE] new v8 api by rco 2014-07-06 17:05:41 +02:00
query.py [REM] Deleted .apidoc lines. 2013-02-12 15:24:10 +01:00