تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
5570 أدوات العرض

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
سبتمبر 17
3153
0
مارس 17
3300
1
أغسطس 18
3791
0
يوليو 20
5039
4
ديسمبر 18
6855