Merge lp:~camptocamp/account-invoicing/7.0_fix_period_in_refund_mdh into lp:~account-core-editors/account-invoicing/7.0
Proposed by
Matthieu Dietrich @ camptocamp
Status: | Merged |
---|---|
Approved by: | Guewen Baconnier @ Camptocamp |
Approved revision: | 25 |
Merged at revision: | 28 |
Proposed branch: | lp:~camptocamp/account-invoicing/7.0_fix_period_in_refund_mdh |
Merge into: | lp:~account-core-editors/account-invoicing/7.0 |
Diff against target: |
13 lines (+2/-2) 1 file modified
invoice_validation_wkfl/invoice.py (+2/-2) |
To merge this branch: | bzr merge lp:~camptocamp/account-invoicing/7.0_fix_period_in_refund_mdh |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pedro Manuel Baeza | code review | Approve | |
Guewen Baconnier @ Camptocamp | Approve | ||
Review via email: mp+201180@code.launchpad.net |
Commit message
[FIX] correctly retrieving period from form
Description of the change
Fixing an existing issue; if a period is filled out in the refund wizard, an issue is raised at validation: "Column 'period_id' is of type integer but expression is of type record".
I just fixed it as the journal above it; if it is present (aka. a record (id, name)), take the ID only instead of the tuple.
To post a comment you must log in.
This is surely nitpicking, but you can just write:
if form.get('period'):
As get() will return a None if the key is not present.
I made this tiny change.