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

I have a many2one field called "patient_id" in my calendar view and I want to show a specific form when clicking "Create and edit" in patient_id field. I'm setting the "form_view_ref" in the context to the id of the specific view I want, but it does not work and I get the default view.


calendar string="Calendar" date_start="app_date" date_stop="app_date_stop"  quick_add="false" mode="week" event_open_popup="true" color="category_id">

          field name="app_code"/>

          field name="patient_id" context="{'form_view_ref':'pms.patient_form_calendar'}"/>

          field name="app_date"/>

          field name="app_date_stop"/>

          field name="category_id" filters="1"/>

          field name="notes"/>

/calendar>


I'm working on odoo 16


Is it possible that "form_view_ref" is not working in calendar view? Can someone verify this?

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

Answering my own question, I had to apply the context to the patient_id field in the form view definition of the same model, not the calendar view definition.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 3 19
13212
7
thg 8 20
5297
2
thg 3 20
7150
1
thg 7 24
2042
1
thg 5 24
3356