← Back to team overview

account-payment-team team mailing list archive

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

 

Biel - txerpa.com has proposed merging lp:~txerpa/account-payment/7.0-account_payment-call-move-post into lp:account-payment/7.0.

Requested reviews:
  Pedro Manuel Baeza (pedro.baeza)

For more details, see:
https://code.launchpad.net/~txerpa/account-payment/7.0-account_payment-call-move-post/+merge/198433

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()
-- 
https://code.launchpad.net/~txerpa/account-payment/7.0-account_payment-call-move-post/+merge/198433
Your team Account Payment is subscribed to branch lp:account-payment/7.0.
=== modified file 'account_payment_extension/account_payment.py'
--- account_payment_extension/account_payment.py	2013-09-24 15:15:21 +0000
+++ account_payment_extension/account_payment.py	2013-12-10 16:17:16 +0000
@@ -316,9 +316,7 @@
                 }, context)
             # Post the move
             if order.mode.journal.entry_posted:
-                move_obj.write(cr, uid, [move_id], {
-                    'state':'posted',
-                }, context)
+                move_obj.post(cr, uid, [move_id], context)
 
         return result
 


Follow ups