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

Hello everyone,

I am using Odoo 12 and need to remove the "external connection/link" widget from the form view for a many2one field.

Please refer to the below image:


I have used on my xml:

<field name="my_field" options="{'no_create_edit': True}"/>

This code worked for the "Create..." option on the list, but did not removed the widget in front of the field.

How can I do that?

Thank you in advance

Regards

Paulo

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

options='{"no_open": True}' is used to prevent you from opening the record.


Syntax:

<field name="your_m2o_field" options="{'no_open': True}"
Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you @Ray,

It works exactly as expected.

Best regards

Tác giả

@Ray,

This is exactly the kind of "answer" we all newbies expect to read from the pro's.

A simple answer and a valuable syntax to help us better understand the code/solution provided.

Thank you once again! +100 for you!

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 19
9939
1
thg 9 21
5608
3
thg 1 20
6776
5
thg 9 19
6248
0
thg 3 20
3374