Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
5550 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore
readonly_form_view_id="%(tabla_work_planning.tabla_work_planner_form_view)s"
event_open_popup="true"
Avatar
Abbandona
Risposta migliore

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
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
4
set 17
3149
0
mar 17
3255
1
ago 18
3789
0
lug 20
5023
4
dic 18
6826