Must be some basic stuff, but I would like to know how I can sort projects by End Date. I have tried below in an addon module...
from openerp.osv import fields, osv
class project(osv.osv):
_inherit = 'project.project'
_name = 'project.project'
_order = 'date'
And I get this error.
ProgrammingError: column "date" does not exist
LINE 1: ...0, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63) ORDER BY date
I realize that the original project class `_inherits` "account.analytic.account" which is where the End Date comes from. In such case how can we use a field that belong to the original model in sorting?
↧