Community mailing list archives

Re: Calling super() causes commit

OpenERP Master
- 12/26/2014 00:57:06
I was wrong,

this appears to be a problem with the payment feature in odoo 8 specifically. From an invoice, during register payment, as soon as you click pay, the record is saved in the database, even if you immediately raise after calling move_line_create, its already saved.

On Thu, Dec 25, 2014 at 9:30 PM, OpenERP Master <> wrote:

Hoping for explanation or confirmation of issue. I created a payment module. I call super() on action_move_line_create in account.voucher module. I do this before executing my payment api calls to ensure that the transaction can be completed successfully in Odoo first. Once the call is made, its not possible to reverse the transaction in the external system.

I noticed by calling super() that an account.voucher payment record is saved in the database, even if I immediately raise after super or call cr.rollback()

super(AccountVoucher, self).action_move_line_create(cr, uid, ids, context)

I thought that any raise would rollback everything unless I explicitly called cr.commit()

Could someone explain?