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
=== modified file 'fetchmail_invoice/model/fetchmail_invoice.py'
--- fetchmail_invoice/model/fetchmail_invoice.py 2013-08-23 06:53:00 +0000
+++ fetchmail_invoice/model/fetchmail_invoice.py 2013-09-09 19:24:26 +0000
@@ -48,7 +48,8 @@
48 if custom_values is None:48 if custom_values is None:
49 custom_values = {}49 custom_values = {}
5050
51 custom_values.update({51 local_context = dict(context)
52 local_context.update({
52 'type': 'in_invoice',53 'type': 'in_invoice',
53 }) 54 })
5455
@@ -78,6 +79,6 @@
7879
79 # Create the resource80 # Create the resource
80 res_id = super(account_invoice, self).message_new(81 res_id = super(account_invoice, self).message_new(
81 cr, uid, msg_dict, custom_values=custom_values, context=context)82 cr, uid, msg_dict, custom_values=custom_values, context=local_context)
82 83
83 return res_id84 return res_id

Subscribers

People subscribed via source and target branches

to all changes: