← Back to team overview

openerp-community-reviewer team mailing list archive

Re: lp:~camptocamp/account-financial-tools/7.0-add-account_move_batch_validate-lep into lp:account-financial-tools

 

Just about these lines:

135	+ session_hdl = ConnectorSessionHandler(cr.dbname, uid)
136	+ with session_hdl.session() as session:

session_hdl.session() will open a new transaction (new cr), and commit the jobs at the end of the context manager.
I'm not sure that's what you want. 

My opinion is that if something fails in the main transaction of the wizard, the jobs should not be created. In that case, you would need to create a Session with the current cursor (instead of creating a new cursor).

    session = Session(cr, uid, context=context)
-- 
https://code.launchpad.net/~camptocamp/account-financial-tools/7.0-add-account_move_batch_validate-lep/+merge/201187
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:account-financial-tools.


Follow ups