dataset/seed/odoo/funcs/odoo.py
Emmanuel Garette f1b2e20063 add odoo
2022-10-01 18:57:37 +02:00

8 lines
250 B
Python

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())