← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 667637] Re: On partner list sort by Country getting ERROR

 

*** This bug is a duplicate of bug 629332 ***
    https://bugs.launchpad.net/bugs/629332

** Changed in: openobject-addons
     Assignee: OpenERP's Framework R&D (openerp-dev-framework) => DHS(OpenERP) (dhs-openerp)

** This bug has been marked a duplicate of bug 629332
   Function,related fields do not get sorted
 * You can subscribe to bug 629332 by following this link: https://bugs.launchpad.net/openobject-server/+bug/629332/+subscribe

-- 
On partner list sort by Country getting ERROR
https://bugs.launchpad.net/bugs/667637
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Confirmed

Bug description:

On partner list sort by Country getting ERROR.

Sales -> Address Book -> Customers window. Sort by Country.

Traceback (most recent call last):
  File "/home/jacara/Pydev-workspace/monoserp/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/jacara/Pydev-workspace/monoserp/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/jacara/Pydev-workspace/monoserp/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/jacara/Pydev-workspace/monoserp/osv/orm.py", line 1804, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/home/jacara/Pydev-workspace/monoserp/osv/orm.py", line 4028, in _search
    order_by = self._generate_order_by(order, query)
  File "/home/jacara/Pydev-workspace/monoserp/osv/orm.py", line 3995, in _generate_order_by
    order_by_clause = self._generate_m2o_order_by(order_field, query)
  File "/home/jacara/Pydev-workspace/monoserp/osv/orm.py", line 3956, in _generate_m2o_order_by
    assert order_field_column._classic_write or getattr(order_field_column, 'store', False), "Many2one function/related fields must be stored to be used as ordering fields"
AssertionError: Many2one function/related fields must be stored to be used as ordering fields

Revision :
  server - 2957
  addons - 4483





References