[FIX] hr_holidays: fix traceback when clicking schedule next activity

Issue

	- Time Off
	- Managers > All > Time Off
	- Any form > Schedule Activity > Any activity > Schedule
	- Mark as Done > Done & Schedule Next

	Traceback "field can_reset does not exist"

Cause

	In ir.ui.view the postprocess_and_fields tries
	to return an architecture and a description of all the fields
	of mail model (with view=False) but as we have a context
	key 'form_view_ref' with value hr_holidays.hr_leave_view_form_manager

	It loads the field of this view's model too and then it compare
	them to the mail model fields.

Solution

	Move the view ref into view_ids

OPW-2205031

closes #46150

closes odoo/odoo#46552

X-original-commit: 88104afaa07f80261d3198abd71b7bea7c1cf3f4
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
This commit is contained in:
jvm-odoo
2020-02-28 12:22:22 +00:00
parent 7fa9aa9f7d
commit e29e2e31f6
+7 -1
View File
@@ -642,7 +642,13 @@
<field name="res_model">hr.leave</field>
<field name="binding_model_id" eval="False"/>
<field name="view_mode">tree,kanban,form,calendar,activity</field>
<field name="context">{'form_view_ref': 'hr_holidays.hr_leave_view_form_manager'}</field>
<field name="context">{}</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree'}),
(0, 0, {'view_mode': 'kanban'}),
(0, 0, {'view_mode': 'form', 'view_id': ref('hr_holidays.hr_leave_view_form_manager')}),
(0, 0, {'view_mode': 'calendar'}),
(0, 0, {'view_mode': 'activity'})]"/>
<field name="domain">[]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">