跳至内容
菜单
此问题已终结

Actually, I used the qrcode package. It generates a qrcode which is a PIL object.

Then I want to save the qrcode image to the disk through the save() method.

With the code "img.save('abc.png')" (img is a variable of PIL object).

And odoo returned me "IOError: [Errno 13] Permission denied: 'abc.png'".

But I have already used the command "chmod -R 777 openerp/" and "chown -R odoo:odoo openerp/" to open the permission. Also the home directory of the linux user odoo who run the odoo service. But it seems didn't take effect. 

And I tried the code in the SHELL:

=========================================================

odoo@finn-virtual-machine:~$ python

Python 2.7.9 (default, Nov 11 2015, 17:17:16)

[GCC 4.8.4] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import qrcode

>>> img = qrcode.make('something')

>>> img.save('abc.png')

>>>

==========================================================

It can save the qrcode to the home directory of the linux user odoo successfully.

I have no idea about what's wrong with my developing module.

形象
丢弃
相关帖文 回复 查看 活动
0
7月 24
843
3
8月 20
5643
0
5月 19
8506
1
6月 18
7035
1
2月 18
4113