Hello,
I would like save image in file.
But how can I get the DATA_DIR variable define in openerp-server.conf in my function ?
Thanks,
Valérian
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I would like save image in file.
But how can I get the DATA_DIR variable define in openerp-server.conf in my function ?
Thanks,
Valérian
You can access all the details saved in configuration file inside Odoo.
Sample code:
from openerp.tools import config
your_value = config['key_in_config_file']
Hello,
You can define path in system parameter for image store.
Than you can use this path to store file and retrieve file.
img_file_data = base64.b64decode(image_data)
with open(your_path_for_store, 'wb') as f:
f.write(imgdata)
You need some python code for achieve this.
May be this will help you.
Okay,
It's done
Thank you very much
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
5
Oct 24
|
8377 | ||
|
0
Jan 24
|
379 | ||
|
0
Nov 23
|
1412 | ||
|
2
May 23
|
6770 | ||
|
1
May 22
|
4150 |
for what will you use this image??