~openerp-dev/openobject-server/saas-4-readflat-order

Viewing all changes in revision 5209.

  • Committer: Olivier Dony
  • Date: 2014-05-09 13:29:16 UTC
  • Revision ID: odo@openerp.com-20140509132916-zkbe7z5ltu6emtoi
[FIX] orm.read_flat: improved ORDER BY generation to use _generate_order_by()

- Properly uses fully qualified column names in the ORDER BY clause
- Supports inherited columns and smart orders (Many2One orders using destination order, not the FK value)

This solves several issues such as using `create_date` or other common fields as
ORDER fields, which could cause name collisions when two tables are involved
in a query due to `auto_join`ed relationships.
It will also allow using inherited columns in the _order or _parent_order
of a model, previously not supported.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: