Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


[OpenERP 7] Group by user defined field

on 12/3/15, 5:02 AM 221 views

Dear community,

I have created a new "x_payment_date" in the "invoice" model which stores the invoice payment date.

In the Reporting/Invoices analysis section, I would like to group by x_payment_term.

So, in the developper mode, I have edited the search view and added the following line:

<filter string="PaymentDate" icon="terp-go-today" context="{'group_by':'x_payment_date'}"/>

But when using this filter, I get the following error:


Client Traceback (most recent call last):

File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch

response["result"] = method(self, **self.params)

File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1128, in call_kw

return self._call_kw(req, model, method, args, kwargs)

File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1120, in _call_kw

return getattr(req.session.model(model), method)(*args, **kwargs)

File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy

result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)

File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method

result = self.session.send(self.service_name, method, *args)

File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send

raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):

File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send

return openerp.netsvc.dispatch_rpc(service_name, method, args)

File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 296, in dispatch_rpc

result = ExportService.getService(service_name).dispatch(method, params)

File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch

res = fn(db, uid, *params)

File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw

return self.execute(db, uid, obj, method, *args, **kw or {})

File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper

return f(self, dbname, *args, **kwargs)

File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute

res = self.execute_cr(cr, uid, obj, method, *args, **kw)

File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr

return getattr(object, method)(cr, uid, *args, **kw)

File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2707, in read_group

if fget[f]['type'] in ('integer', 'float')

KeyError: 'x_payment_date'


Could you help me understand what is going wrong?

Many thanks in advance!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 12/3/15, 5:02 AM
Seen: 221 times
Last updated: 12/3/15, 5:02 AM