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

Hello everybody;

Can anyone help me know please why is my action not called. 

action = {
'name': record.file_name,
'type': 'ir.actions.act_url',
'mimeType': "application/msword",
'url':
base_url + "web/content/?model=stock.picking&id=" + str(record.id)
+ "&filename_field=file_name&field=file_test&download=true",
'target': 'new',
}
return action


Thanks a lot in advance.

Best regards.

Ảnh đại diện
Huỷ bỏ

i think you may need / before web/content. Like this : base_url + "/web/content

if this is not the problem, can you show us the odoo logs? the error should be there.

Waiting for your reply to this.

Câu trả lời hay nhất

Hi  , have you managed to find a solution , if yes please upload here. I am also facing the same issue.

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

Thanlks a lot for the answer my friend.

I have added base_url but also not working :/

here is my logs:

2019-10-31 14:38:07,338 30554 INFO test_master werkzeug: 127.19.5.1 - - [31/Oct/2019 14:38:07] "POST /web/action/load HTTP/1.1" 200 - 15 0.007 0.011
2019-10-31 14:38:08,418 30554 INFO test_master werkzeug: 127.19.5.1 - - [31/Oct/2019 14:38:08] "POST /web/action/run HTTP/1.1" 200 - 40 0.020 1.055
2019-10-31 14:38:08,525 30554 INFO test_master werkzeug: 127.19.5.1 - - [31/Oct/2019 14:38:08] "POST /web/dataset/call_kw/stock.picking/read HTTP/1.1" 200 - 64 0.062 0.038
2019-10-31 14:38:08,581 30554 INFO test_master werkzeug: 127.19.5.1 - - [31/Oct/2019 14:38:08] "POST /web/dataset/call_kw/stock.move/read HTTP/1.1" 200 - 35 0.023 0.026

Ả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 19
6011
0
thg 3 24
851
1
thg 10 21
4270
1
thg 1 21
2998
2
thg 10 20
4107