콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
5650 화면

I've extended timesheet with start and end datetimes created a calendar view for it and a popup form. But when creating in calendar view it always opens the timesheets form view and not the view defined in event_open_popup. What I'm doing wrong?


<record id="tabla_work_planner_calendar_view" model="ir.ui.view">
<field name="name">tabla_work_planner_calendar</field>
<field name="model">account.analytic.line</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar color="user_id" date_start="start_datetime" date_stop="finish_datetime" string="Work"
mode="week" event_open_popup="%(tabla_work_planning.tabla_work_planner_form_view)s" quick_add="0">
<field name="tasks_id_number"/>
<field name="name"/>
</calendar>
</field>
</record>

<record id="tabla_work_planner_form_view" model="ir.ui.view">
<field name="name">tabla_work_planner_calendar_popup</field>
<field name="model">account.analytic.line</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<form>
<group string="Timesheet">
<field name="user_id"/>
<field name="name"/>
<field name="start_datetime"/>
<field name="finish_datetime"/>
<field name="unit_amount" widget="float_time" readonly="1"/>
</group>
</form>
</field>
</record>



아바타
취소
베스트 답변

I have exactly the same issue in Odoo version 14. changing event_open_popup from "true" to "false" navigates me to a totally different form. (Popup form != Full Screen Form)

I also tried to set form_view_id="%(timesheet_grid.timesheet_view_form)d", but this does not work either. 

I've also created a calendar view for account.analytic.line.

아바타
취소
베스트 답변
readonly_form_view_id="%(tabla_work_planning.tabla_work_planner_form_view)s"
event_open_popup="true"
아바타
취소
베스트 답변

Hi Samo:

Change 

event_open_popup="%(tabla_work_planning.tabla_work_planner_form_view)s"

to

form_view_id="%(tabla_work_planning.tabla_work_planner_form_view)d" event_open_popup="true"

and see if that fixes it

아바타
취소
작성자

No it didn't. I still get the wrong form.

관련 게시물 답글 화면 활동
4
9월 17
3188
0
3월 17
3333
1
8월 18
3851
0
7월 20
5088
4
12월 18
6920