Merge lp:~camptocamp/openobject-addons/6.1-opening-entry-fix-mdh into lp:~camptocamp/openobject-addons/6.1-c2c-official
Status: | Merged |
---|---|
Merged at revision: | 6640 |
Proposed branch: | lp:~camptocamp/openobject-addons/6.1-opening-entry-fix-mdh |
Merge into: | lp:~camptocamp/openobject-addons/6.1-c2c-official |
Diff against target: |
27 lines (+1/-9) 1 file modified
account/wizard/account_fiscalyear_close.py (+1/-9) |
To merge this branch: | bzr merge lp:~camptocamp/openobject-addons/6.1-opening-entry-fix-mdh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guewen Baconnier @ Camptocamp | Approve | ||
Yannick Vaucher @ Camptocamp | Approve | ||
Leonardo Pistone | Approve | ||
Romain Deheele - Camptocamp (community) | code review | Approve | |
Review via email: mp+216093@code.launchpad.net |
Commit message
[FIX] lp:1257288 - fixed amount in foreign currency for opening entries
Description of the change
Found this issue: when computing an opening entry, the move lines' domains differ between the amount in system currency (all move lines in the latest FY before the current one, for example FY2012) and the amount in foreign currency (all move lines in previous FY, for example FY2012, 2011, 2010...).
I removed the old method to retrieve the sum of foreign amounts, which used a domain of multiple FYs, and retrieved the correct sum by using the function field "foreign_balance" in the account (since a single FY is specified in the browse() context, only the balance for this FY is retrieved; this is how the correct "account.balance" works).
New 6.1 branch, after another commit was "stored" in this one (I'll make a separate MP to keep XA and c2c-official consistent).
LGTM,
Romain