summaryrefslogtreecommitdiff
path: root/addons/hr_contract/data
diff options
context:
space:
mode:
authorLucas Lefèvre <lul@odoo.com>2018-12-19 12:32:05 +0000
committerYannick Tivisse <yti@odoo.com>2019-02-01 12:16:54 +0000
commit20bc2bbab5839bdbbf6b86972e677e10102e5bac (patch)
treeed25aeb7b0619c5779032abd1d02e905853ad618 /addons/hr_contract/data
parentf5bca867ac7f7d8dd8d530f0df740d0931d18e0b (diff)
[IMP] hr_payroll: add multi contract support
Purpose ======= We would like to be able to manage multi contracts payslips and contract transitions. Specification ============= General flow: 1/ Benefits are generated based on contracts's calendar. 2/ When validating additionnal benefits, calendar.attendances are created in the contract's calendar 3/ Create one payslip per contract in state [open|pending|close] 4/ For each payslip, generate worked day lines based on the contract's calendar New Constraints: 1/ An employee cannot have more than one contract at the same time (excluding draft, closed and cancelled contracts). 2/ A leave cannot overlap multiple contracts. 3/ A contract cannot have starting and ending dates such that a leave become in the middle of two contacts. New state for a contract: Incoming. It means it's ready and will be running soon. An incoming contract automatically becomes 'Running' if the start date is passed (cron) Number of hours and days are always correct (according to the contract's calendar) on payslips as the flow starts from the contract's calendar. However, it is not correct in the Time Off app because it's counted based on the employee's calendar. The number of days/hours for hr.leaves should be computed according to the contract at the time of the leave. e.g. If I currently work full time and I request 2 weeks off next month where I'll be working only 3 days/week and 5hours/day (other contract), It should count 6 days and 30 hours. - in hr.benefits form view show the contract (below employee field) TaskID: 1903483 closes odoo/odoo#30181
Diffstat (limited to 'addons/hr_contract/data')
-rw-r--r--addons/hr_contract/data/hr_contract_demo.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/hr_contract/data/hr_contract_demo.xml b/addons/hr_contract/data/hr_contract_demo.xml
index 6e8326a0203..eef59fd9813 100644
--- a/addons/hr_contract/data/hr_contract_demo.xml
+++ b/addons/hr_contract/data/hr_contract_demo.xml
@@ -11,7 +11,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">open</field>
+ <field name="state">draft</field>
</record>
<record id="hr_contract_al" model="hr.contract">
@@ -64,7 +64,7 @@
<field name="department_id" model="hr.department"
eval="obj().env.ref('hr.employee_qdp').department_id.id"/>
<field eval="3750.0" name="wage"/>
- <field name="state">open</field>
+ <field name="state">draft</field>
</record>
<record id="hr_contract_han" model="hr.contract">