Suppose uploading an attachment with res_id = 0, res_model = 'existing.model'. Suppose also there a one2many having 'ir.attachment' as co_model and res_id as co_field in 'existing.model'. This setup leads to an error since the record with id=0 doesn't exists. This commit ensures the res_model is not set when uploading the attachment. closes odoo/odoo#37414 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>