Skip to Content
Menu
This question has been flagged
3 Replies
4632 Views

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>



Avatar
Discard
Best Answer

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.

Avatar
Discard
Best Answer
readonly_form_view_id="%(tabla_work_planning.tabla_work_planner_form_view)s"
event_open_popup="true"
Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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

Related Posts Replies Views Activity
4
Sep 17
2577
0
Mar 17
2638
1
Aug 18
2857
0
Jul 20
4052
4
Dec 18
6032