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

Hello, I need to fill a one2many field from a website form.

I have a model1 where I am creating an element from the website form. This model1 has a one2many field in relation with model2. The problem is that I have to create an element in model2 at the same time that the element in model1 with the same website form but in odoo11 forms do not allow this.

Can someone help me? Thanks.

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

Hi,

if you are using the controller for the form, you can achieve the same by doing some code inside the controller. Here you might have using the form builder and mapping the input fields to the fields in the backend and in the corresponding model, you cannot achieve the same by using the form builder.

Otherwise, you can set some automated action in the backend such a way that the action will create one2many lines once the record is created in the corresponding model.


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 2 19
4738
2
thg 5 25
9779
3
thg 3 24
5424
4
thg 7 23
18296
3
thg 11 21
7808