diff --git a/mass_mailing_switzerland/models/__init__.py b/mass_mailing_switzerland/models/__init__.py index ff3be2f3b..2b42dd197 100644 --- a/mass_mailing_switzerland/models/__init__.py +++ b/mass_mailing_switzerland/models/__init__.py @@ -26,3 +26,4 @@ from . import mailchimp_lists from . import res_partner_category from . import mailchimp_merge_fields +from . import res_users diff --git a/mass_mailing_switzerland/models/res_users.py b/mass_mailing_switzerland/models/res_users.py new file mode 100644 index 000000000..9306d534d --- /dev/null +++ b/mass_mailing_switzerland/models/res_users.py @@ -0,0 +1,22 @@ +############################################################################## +# +# Copyright (C) 2022 Compassion CH (http://www.compassion.ch) +# Releasing children from poverty in Jesus' name +# @author: Emanuel Cino +# +# The licence is in the file __manifest__.py +# +############################################################################## +from odoo import models + + +class ResUsers(models.Model): + _inherit = "res.users" + + def create(self, vals_list): + """No need to update mailchimp from res_users""" + return super(ResUsers, self.with_context(no_need=True)).create(vals_list) + + def write(self, vals): + """No need to update mailchimp from res_users""" + return super(ResUsers, self.with_context(no_need=True)).write(vals)