diff --git a/ext/custom-addons/dp_custom/models/__init__.py b/ext/custom-addons/dp_custom/models/__init__.py index 165b0fc5..27b85503 100644 --- a/ext/custom-addons/dp_custom/models/__init__.py +++ b/ext/custom-addons/dp_custom/models/__init__.py @@ -31,3 +31,4 @@ from . import product from . import ir_attachment from . import account from . import commission_account +from . import res_users diff --git a/ext/custom-addons/dp_custom/models/res_users.py b/ext/custom-addons/dp_custom/models/res_users.py new file mode 100644 index 00000000..6c1445b8 --- /dev/null +++ b/ext/custom-addons/dp_custom/models/res_users.py @@ -0,0 +1,14 @@ +# Copyright 2018-Today datenpol gmbh () +# License OPL-1 or later (https://www.odoo.com/documentation/user/11.0/legal/licenses/licenses.html#licenses). + +from odoo import api, models + + +class Users(models.Model): + _inherit = 'res.users' + + @api.model + def create(self, vals): + vals['customer'] = False + + return super(Users, self).create(vals)