Merge lp:~txerpa/account-payment/7.0-account_payment-call-move-post into lp:~account-payment-team/account-payment/7.0

Proposed by Biel - on 2013-12-10
Status: Merged
Merged at revision: 108
Proposed branch: lp:~txerpa/account-payment/7.0-account_payment-call-move-post
Merge into: lp:~account-payment-team/account-payment/7.0
Diff against target: 13 lines (+1/-3)
1 file modified
account_payment_extension/ (+1/-3)
To merge this branch: bzr merge lp:~txerpa/account-payment/7.0-account_payment-call-move-post
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza 2013-12-10 Approve on 2014-01-31
Omar (Pexego) code review Needs Fixing on 2013-12-13
xavi (community) Approve on 2013-12-11
Review via email:

Description of the change

When creating an order with the direct payment option and the entry_posted option of the journal is chosen, it changes the status to posted of the move when it should call the post method.

 # Post the move
 if order.mode.journal.entry_posted:
     move_obj.write(cr, uid, [move_id], {
        }, context)

It should be:
if order.mode.journal.entry_posted:

To post a comment you must log in.
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the MP! In 6.1, it has been also changed in revision 111. It would be desirable to put context as a keyword argument (context=context), to avoid incompatibilities if the signature of post method changes.


review: Approve (code review and test)
xavi (xgilest) :
review: Approve
Omar (Pexego) (omar7r) wrote :

Need fixing status, while don't update it with context=context as Pedro said.


review: Needs Fixing (code review)
106. By Biel - on 2014-01-31

context as a keyword argument

I set this MP as Work in progress as it is in "Needs Fixing" since weeks. Please set it back to "Need Review" once you think you are done.

Pedro Manuel Baeza (pedro.baeza) wrote :

As the change is trivial, I'm going to make it on merge time, so I proceed with the merge.


review: Approve
Pedro Manuel Baeza (pedro.baeza) wrote :

Sorry, it was made already, but not notified with any comment.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_payment_extension/'
2--- account_payment_extension/ 2013-09-24 15:15:21 +0000
3+++ account_payment_extension/ 2014-01-31 09:52:16 +0000
4@@ -316,9 +316,7 @@
5 }, context)
6 # Post the move
7 if order.mode.journal.entry_posted:
8- move_obj.write(cr, uid, [move_id], {
9- 'state':'posted',
10- }, context)
11+, uid, [move_id], context=context)
13 return result