Skip to Content
Menu
This question has been flagged
1 Reply
2298 Views

When I try to print a report , I get this error :

....
File "/opt/odoo9/openerp/osv/expression.py", line 844, in parse raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf))) ValueError: Invalid field 'period_id' in leaf "<osv.ExtendedLeaf: ('period_id', 'in', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) on account_move_line (ctx: )>"

thanks in advance

Avatar
Discard
Best Answer

Hi,

Regarding the report or you didn't add much details about the error ? Is it coming from your custom reports ? If so check the code and see where you have used the period_id . Invalid leaf error is thrown when you use a field which is not there in the model.

Example:

Suppose if i need to search inside the sale.order model for record with id 12, i can do it like this,

self.env['sale.order'].search([('id', '=', 1)])


Instead of id, if i specify any field name which does not exist in corresponding model, ie. sale.order, it will throw invalid leaf error.


Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Sep 23
498
0
Sep 23
451
2
Feb 23
9254
6
Oct 23
19280
3
Mar 24
7694