Hi,
if this is the case:
[quote="greno"][quote="foggy"]
account.close_method=='unreconciled'
a) additional query for : 'AND reconcile_id is NULL ' \
b) fy_id is not included in 'LIMIT %d OFFSET %d', (account.id, limit, offset))
[/quote]
I'm looking at 4.2.0 stable code right now and fy_id is included for the
unreconciled case and I think it should be. You have to limit the move lines
returned by the periods in the fiscal year.
Regards,
Gerry[/quote]
and the only need for fy_id to be there, I found another solutions that started
to work (I faced the same problem - mentioned in this topic and was not able to
solve it unless saw the last post).
So - it seems that this portion of code:
query_line = pool.get('account.move.line')._query_get(cr, uid,
obj='account_move_line', context={'fiscalyear':
fy_id})
returns nothing or not well formed portion of WHERE clause in:
WHERE account_id = %d ' \
'AND ' +
query_line + ' ' \
'AND
reconcile_id is NULL ' \
Thus - the only thing is needed to be done to make it works - to replace
"query_line" with the one like this:
'WHERE account_id = %d ' \
'AND period_id
IN (SELECT id FROM account_period WHERE fiscalyear_id = %d) ' \
'AND
reconcile_id is NULL ' \
After that - everything is perfect.
-------------------- m2f --------------------
--
http://www.openerp.com/forum/viewtopic.php?p=25205#25205
-------------------- m2f --------------------
_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users