many2one functional field not supported in view
This bug report was converted into a question: question #223411: many2one functional field not supported in view.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I tried to create a many2one functional field
I put this field in the view.
I cannot load the view. It appears that these types of fields are not supported in a view
Server Traceback (most recent call last):
File "/usr/local/
return openerp.
File "/usr/local/
result = ExportService.
File "/usr/local/
res = fn(db, uid, *params)
File "/usr/local/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/usr/local/
return f(self, dbname, *args, **kwargs)
File "/usr/local/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/
result = self._read_flat(cr, user, select, fields, context, load)
File "/usr/local/
record[f] = res2[record['id']]
KeyError: 13
Changed in openobject-server: | |
status: | Expired → Invalid |
Hello Kyle Waid,
I have checked your issue with latest trunk, but I did not face any issue. So would you please provide a proper steps to
reproduce the bug.
For more information:
You can see the many2one function field defined in the account/ account_ bank_statement. py(line no: 128):
'currency': fields. function( _currency, string='Currency', type='many2one', relation= 'res.currency' ),
and corresponding in the account/ account_ view.xml( line no: 564), remove the invisible="1" and you can see the 'Currency' field in the following form view:
Invoicing -> Bank and Cash -> Bank Statements.
By seeing the traceback it seems that problem is in the function you defined.
Thanks,
Divyesh