[FIX] hr_contract: demo data to fix uninstall

On install, `hr_work_entry_contract` only associates work entries to
contacts which are open or closed.

However during its execution (?) `hr_work_entry_contract` generates
entries associated with `Mitchell Admin Contract`, which is a draft
contract. As a result, when uninstalling then reinstalling
`hr_work_entry_contract` it is not able to re-associate the entries to
the contract, and thus can't reinstate the `required=True` on
`HrWorkEntry.contract_id` either, which is a "reinstallation failure"
on the CI.

A simple solution is to create the contract closed, though it would
also be a good idea to not be able to create work entries associated
with a draft contract either, maybe?

X-original-commit: 6b7f3f6ec40eb819dd1d94a94722610a63d5697a
Part-of: odoo/odoo#121522
This commit is contained in:
Xavier Morel
2023-05-16 15:55:38 +02:00
parent 7c78bb5e5c
commit 84ad30338d
+1 -1
View File
@@ -15,7 +15,7 @@
<field name="department_id" model="hr.department"
eval="obj().env.ref('hr.employee_admin').department_id.id"/>
<field eval="7540.0" name="wage"/>
<field name="state">draft</field>
<field name="state">close</field>
<field name="kanban_state">normal</field>
<field name="resource_calendar_id" ref="resource.resource_calendar_std_38h"/>
<field name="hr_responsible_id" ref="base.user_admin"/>