Merge lp:~therp-nl/therp-addons/7.0-fetchmail-invoice_fix_journal_selection into lp:~therp-nl/therp-addons/7.0

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 90
Proposed branch: lp:~therp-nl/therp-addons/7.0-fetchmail-invoice_fix_journal_selection
Merge into: lp:~therp-nl/therp-addons/7.0
Diff against target: 21 lines (+3/-2)
1 file modified
fetchmail_invoice/model/fetchmail_invoice.py (+3/-2)
To merge this branch: bzr merge lp:~therp-nl/therp-addons/7.0-fetchmail-invoice_fix_journal_selection
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Ronald Portier (Therp) Approve
Review via email: mp+184667@code.launchpad.net

Description of the change

To clarify the possibly suspicious looking diff: the default function for account.invoice's type field looks to the context so I don't need it in the custom_value anymore once it's in the context. And I need it in the context because that's where the default function for journal_id looks to determine the journal type.

To post a comment you must log in.
Revision history for this message
Ronald Portier (Therp) (rportier1962) wrote :

Approve. Code review and test.

Actually integrated the fix in my branch (Work in Progress) to enable fetchmail_invoice for multi-company.

review: Approve
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'fetchmail_invoice/model/fetchmail_invoice.py'
2--- fetchmail_invoice/model/fetchmail_invoice.py 2013-08-23 06:53:00 +0000
3+++ fetchmail_invoice/model/fetchmail_invoice.py 2013-09-09 19:24:26 +0000
4@@ -48,7 +48,8 @@
5 if custom_values is None:
6 custom_values = {}
7
8- custom_values.update({
9+ local_context = dict(context)
10+ local_context.update({
11 'type': 'in_invoice',
12 })
13
14@@ -78,6 +79,6 @@
15
16 # Create the resource
17 res_id = super(account_invoice, self).message_new(
18- cr, uid, msg_dict, custom_values=custom_values, context=context)
19+ cr, uid, msg_dict, custom_values=custom_values, context=local_context)
20
21 return res_id

Subscribers

People subscribed via source and target branches

to all changes: