> 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?

MP's here 
https://code.launchpad.net/~camptocamp/openupgrade-tools/7.0-add-database_cleanup-purge-model-attachment-error/+merge/204442
-- 
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.

-- 
Mailing list: https://launchpad.net/~credativ
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~credativ
More help   : https://help.launchpad.net/ListHelp

Reply via email to