dataset/seed/odoo/funcs/odoo.py

9 lines
250 B
Python
Raw Normal View History

2022-10-01 18:57:37 +02:00
from base64 import b64encode as _b64encode
from os.path import isfile as _isfile
def get_logo(filename):
if not _isfile(filename):
raise Exception(f'cannot find odoo logo {filename}')
return _b64encode(open(filename, 'rb') .read())