← Back to team overview

openerp-community-reviewer team mailing list archive

Re: [Merge] lp:~camptocamp/ocb-addons/lp1236844 into lp:ocb-addons

 

Review: Needs Fixing

Thanks! Not sure that this is the right fix though.

I think the meaning of the 'AND' operator here is to select partners that have unreconciled amounts on the same account on both the debit side and the credit side. It selects these as sums a couple of lines before the start of the diff. With your change, I also get partners that only have unreconciled amounts on only one side, which is annoying because there is nothing to reconcile in that case.

Apparently, the problem is that the sums are assigned the aliases 'debit' and 'credit', which is ambiguous in the select statement shown in the diff because the move line table has fields by the same names. The bug would then be caused by the database interpreting these references as the respective fields of the move line table instead of the sums aliases.

The proper fix should be to rename the aliases as well as there usage in the select statement to something like 'debit_sum' and 'credit_sum'. I just tried it and it seems to work.

-- 
https://code.launchpad.net/~camptocamp/ocb-addons/lp1236844/+merge/193061
Your team OpenERP Community Backports Team is subscribed to branch lp:ocb-addons.


References