Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1449 Lượt xem

Hi!

I am developing a module for a payment gatewat for Odoo v15.


When installing the module in Odoo v15 in odoo . sh, I get the following error:

RPC_ERROR

Odoo Server Error

Traceback (most recent call last):

File "/home/odoo/src/odoo/odoo/tools/convert.py", line 683, in _tag_root

f(rec)

File "/home/odoo/src/odoo/odoo/tools/convert.py", line 572, in _tag_record

f_val = _eval_xml(self, field, env)

File "/home/odoo/src/odoo/odoo/tools/convert.py", line 149, in _eval_xml

with file_open(node.get('file'), 'rb', env=env) as f:

File "/home/odoo/src/odoo/odoo/tools/misc.py", line 205, in file_open

path = file_path(name, filter_ext=filter_ext, env=env)

File "/home/odoo/src/odoo/odoo/tools/misc.py", line 184, in file_path

raise FileNotFoundError("File not found: " + file_path)

FileNotFoundError: File not found: payment_pay/static/description/icon.png


My XML data file is this:

<record id="payment_acquirer_payment"model="payment.acquirer">

<field name="image_128"type="base64"file="payment_pay/static/description/icon.png"/>

record>


If the icon file exists in the specified path, what path should I put so that Odoo can find it and save it to the database?


Or is there some way to obtain the absolute path and add it to the file field in xml?

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Daniela Guerra,


May be you're facing this issue because the record you're trying to create (id="payment_acquirer_payment") is not in the same module in which the icon.png file is available (payment_pay). If this is the case then kindly add 'payment_pay' in the depends of you module's manifest file and then try again.

Thanks & Regards,
Email:   odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 22
46
0
thg 11 22
2176
0
thg 9 22
2478
1
thg 7 22
9391
2
thg 12 21
3231