if partner_ids and template_id are set, a traceback happens. Indeed, some mail fields are not taken from the res_ids when partner_ids is set. When trying to update the values with the one from the template, the existing values are popped, which raised an error as those keys weren't set. closes odoo/odoo#38434 X-original-commit: c8ad614718674b55e9af5edd062ded958136e7ac Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>