class ResUserInherit(models.Model):
_inherit = ‘res.users’
user_signature=fields.Binary(string="Signature")
user_stamp=fields.Binary(string="Stamp")
is_admin_user = fields.Boolean(string='Is Admin', default=False) #this is the new field
def signature_domain(self):
return [('company_id','=',self.env.company.id)]
@api.onchange('company_id')
def get_default_admin(self):
get_admin_power_group = self.env['res.groups'].sudo().search([('name', '=ilike', 'Admin Power')])
uid = self.env.uid
admin = []
for i in get_admin_power_group.users.ids:
if uid == i:
admin.append(i)
if uid in admin:
self.is_admin_user = True
Hi, I am Tanvir Islam. I’m facing a problem that is field does not exist. I can solve the issue from the Terminal or from the configuration on Pycharm. But when I’m on live database I’m unable to update the module. And my database is going offline and showing Internal Server Error.
Can any body Help me?
I want to solve the error from the Termius
New contributor
Md Tanvir Islam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.