跳至内容
菜单
此问题已终结
3 回复
5540 查看

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
3148
0
3月 17
3237
1
8月 18
3788
0
7月 20
5016
4
12月 18
6822