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
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.
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']
Okay,
It's done
Thank you very much
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
|
3
ก.ค. 25
|
8802 | ||
Upload Large File Store to Odoo.sh
แก้ไขแล้ว
|
|
1
ก.ค. 25
|
6570 | |
|
1
พ.ค. 25
|
1091 | ||
|
1
ก.พ. 25
|
2845 | ||
|
5
ต.ค. 24
|
11969 |
for what will you use this image??