odoo/openerp/osv
Olivier Dony eb0a178196 [MERGE] name_get: support more field types and improve previous name_get changes
Introduces an improved name_get implementation,
supporting a few more fields type used as _rec_name
(such as many2one). The actual rendering of the
"display name" is delegated to the column class,
and computed based on the value returned by read()
for the column.

Funky @classmethod stuff was necessary to allow
column types to delegate to other types, such as
function types which can delegate to the real
type they emulate.

The display_name term was used because it is
being discussed for the new API to add a virtual
display_name column to all models, allowing
clients to read the name_get value along with
regular columns. It looks appropriate too.

Also fixes a few shortcomings of the latest
patches to name_get, such as supporting inherited
columns and avoiding a useless read() call with
only the id column.

bzr revid: odo@openerp.com-20120803142952-8jefy3bsgftucxuk
2012-08-03 16:29:52 +02:00
..
__init__.py API docs: settings file and titles at modules 2011-06-23 12:03:57 +03:00
expression.py [IMP] add more information when searching on a non-searchable field using debug logging 2012-08-02 17:25:53 +02:00
fields.py [FIX] fields.reference: missing coercion to int for res_id, as pointed out by XMO 2012-08-03 15:41:11 +02:00
orm.py [MERGE] name_get: support more field types and improve previous name_get changes 2012-08-03 16:29:52 +02:00
osv.py [IMP] openerp.{modules,osv}: _logger with fully qualified module name. 2012-01-24 13:42:52 +01:00
query.py API docs: settings file and titles at modules 2011-06-23 12:03:57 +03:00