Merge lp://qastaging/~agilebg/account-consolidation/7.0-fix-1334645-elbati into lp://qastaging/~account-core-editors/account-consolidation/7.0

Proposed by Lorenzo Battistini
Status: Needs review
Proposed branch: lp://qastaging/~agilebg/account-consolidation/7.0-fix-1334645-elbati
Merge into: lp://qastaging/~account-core-editors/account-consolidation/7.0
Diff against target: 31 lines (+8/-6)
1 file modified
account_parallel_currency/account.py (+8/-6)
To merge this branch: bzr merge lp://qastaging/~agilebg/account-consolidation/7.0-fix-1334645-elbati
Reviewer Review Type Date Requested Status
Leonardo Pistone Approve
Review via email: mp+225266@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Leonardo Pistone (lepistone) wrote :

thanks for the fix Lorenzo.

Can you confirm that the test is correct and production code was actually broken?

review: Needs Information
Revision history for this message
Lorenzo Battistini (elbati) wrote :

I confirm.
Note that the bug only occurs when you create a new tax code without parent.

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Hi Lorenzo,

I am still non convinced :)

This way the test is not actually testing a useful workflow, but just a "return True" workaround.

I'd be happier if the yaml test actually tested a realistic case. (or at least, clarify in the yaml file what's going on)

Thanks!

review: Needs Fixing
24. By Lorenzo Battistini

[IMP] when parent_id is missing, just don't fill the parent_id field of the parallel account

Revision history for this message
Lorenzo Battistini (elbati) wrote :

lep, right. I looked at it better and saw that if parent_id is missing, I should just not fill the parent_id field of the parallel account.

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Thanks Lorenzo.

maybe you could refactor a bit putting

parent_parallel_tax_code_id = False

in an else: block a few lines down? otherwise, lgtm

review: Needs Fixing
25. By Lorenzo Battistini

[IMP] else block

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 07/07/2014 03:00 PM, Leonardo Pistone - camptocamp wrote:
> maybe you could refactor a bit putting
>
> parent_parallel_tax_code_id = False
>
> in an else: block a few lines down? otherwise, lgtm

Done

Revision history for this message
Leonardo Pistone (lepistone) wrote :

thanks

review: Approve
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

This project is now hosted on https://github.com/OCA/account-consolidation. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Unmerged revisions

25. By Lorenzo Battistini

[IMP] else block

24. By Lorenzo Battistini

[IMP] when parent_id is missing, just don't fill the parent_id field of the parallel account

23. By Lorenzo Battistini

[FIX] account_parallel_currency: test failure test/mapping_parallel_accounts.yml

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches