← Back to team overview

credativ team mailing list archive

Re: [Merge] lp:~therp-nl/openupgrade-tools/7.0-add-database_cleanup into lp:openupgrade-tools

 

I got it. It happens on models still in ir.model but not in the registry because the python modules are not there.

I replaced the lines 

                    attachment_pool.write(
                        cr, uid, attachment_ids, {'res_model': False},
                        context=context)
By
                    cr.execute(
                        "UPDATE ir_attachment SET res_model = FALSE "
                        "WHERE id IN %s",
                        (tuple(attachment_ids), ))

And it worked. Is it an acceptable solution?
-- 
https://code.launchpad.net/~therp-nl/openupgrade-tools/7.0-add-database_cleanup/+merge/203633
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-tools/7.0-add-database_cleanup into lp:openupgrade-tools.


Follow ups

References