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

Hi, I want to add a button to bank statement view form to open another system, the link to external system includes a query string that includes the id of the statement, is that possible?

In shot I want the button to open a link like this: https://www.abc.com?statementid=150

The number 150 should change based on the open statement

Ameen

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
In Model:
def test_url(self):
if self.id:
return {
'type': 'ir.actions.act_url',
'url': 'https://www.abc.com?statementid=%s' % (self.id),
'target': 'new',
}
In xml create a button with type object and name as test_url

Regards


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

.

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