Community mailing list archives

Calling super() causes commit

OpenERP Master
- 12/25/2014 21:30:53

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?