Hello guys,
I have writen this little function/method. I would want to use it in many pyhton files.
How to get it available everywhere and how to call it?
def whichCompanyPrefix(self):
self.cr, self.uid, self.pool = request.cr, request.uid, request.registry
user = self.pool["res.users"].browse(self.cr, self.uid, self.uid)
company_id = user.company_id.id
company_name = user.company_id.name
company_prefix = user.company_id.x_company_prefix
if not company_prefix :
company_prefix = 'ZZ'
return company_prefix
THANKS