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

Proposed by Biel - txerpa.com
Status: Merged
Merged at revision: 108
Proposed branch: lp://staging/~txerpa/account-payment/7.0-account_payment-call-move-post
Merge into: lp://staging/~account-payment-team/account-payment/7.0
Diff against target: 13 lines (+1/-3)
1 file modified
account_payment_extension/account_payment.py (+1/-3)
To merge this branch: bzr merge lp://staging/~txerpa/account-payment/7.0-account_payment-call-move-post
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Approve
Omar (Pexego) code review Needs Fixing
xavi (community) Approve
Review via email: mp+198433@code.staging.launchpad.net

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.

http://bazaar.launchpad.net/~account-payment-team/account-payment/7.0/view/head:/account_payment_extension/account_payment.py#L317

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

It should be:
if order.mode.journal.entry_posted:
    move_obj.post()

To post a comment you must log in.
Revision history for this message
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.

Regards.

review: Approve (code review and test)
Revision history for this message
xavi (xgilest) :
review: Approve
Revision history for this message
Omar (Pexego) (omar7r) wrote :

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

Thanks

review: Needs Fixing (code review)
106. By Biel - txerpa.com

context as a keyword argument

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

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.

Revision history for this message
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.

Regards

review: Approve
Revision history for this message
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
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches