Odoo Help

0

[OpenERP 7] Group by user defined field

By
Peio
on 12/3/15, 5:02 AM 351 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!

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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