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

Hi,

When i have a many2one fields and the related table is empty i have the option to create and edit said object from the model that holds the many2one in the form of a dropdown list, right?

Is any way that i can eliminate that option alltogether? If there is no record in the related table that it will say only that?

Thanks

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

<field name="name_id" edit="false"/>

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

sorry you can try this <field name="name_id" widget="selection"/>

Tác giả

A selection widget? Uhmn, never could have guessed it, i am going to try it. Thanks.

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

This is a duplicate question. You can see original question How to Hide Save, Remove Option.

Ảnh đại diện
Huỷ bỏ
Tác giả

Actually i don't want to remove the create or save button from my form, i just want to remove the option to create it from a many2one call. I want the people not be able to create a client from a sale order for example. Not the create button from the clients view.

Tác giả

I don't want to eliminate the create or save button, i just want, for example, stop the user from creating a new client from a sale order via the many2one client field.

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 2 25
35361
2
thg 6 23
2814
2
thg 8 15
4882
1
thg 7 23
2394
1
thg 5 23
2664