Commit Graph
17 Commits
Author SHA1 Message Date
Yannick Tivisse 1191b5733f [IMP] hr: Improve trial onboarding
PURPOSE
=======

When you start a new trial of an app without demo data, you
want to have everything perfect and ready for your own configuration

closes odoo/odoo#122308

Taskid: 3328654
Related: odoo/enterprise#41423
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-06-06 16:22:45 +02:00
Rob Coekaerts 7cd00c0702 [IMP] hr: simplify and correct the default data
Some changes were made to the default/demo/test data to be more
consistent:
  - Duplicates of "Paid Time Off" time off types are consolidated into
    one type (inluding year specific versions, ig "Paid Time Off 2019"
  - Annual Time Off is renamed back to Paid Time Off (both for the
    work entry type as the time off type) to be consistent everywhere.
  - All mentions of years in work entry types and time off types have
    been removed, as this is no longer relevant with the new allocation
    rules.
  - Time off types in the default data have been explicitely made
    company agnostic, in order for them to be available to all companies
    and not just the one company that was select when installing
    hr_holidays. This was already the case for the be_payroll data, but
    not for the standard hr_holidays ones.
  - Various small cosmetic / functional fixes and simplifications
    (eg deduplication of data)
  - expense_other_input has been made country agnostic, in order for it
    to be available in all countries.

task-2978513

closes odoo/odoo#112208

X-original-commit: dcc8bbf
Related: odoo/enterprise#36819
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-02-15 10:14:31 +01:00
Yannick Tivisse 2eda54348d [IMP] resource: Add lunch attendance type
Purpose
=======

Add a new type on the working schedule, adding "Lunch" to Morning and Afternoon. It's mandatory,
because, if you don't do that, you can't assume the difference between a time that should be
recorded as extra hours and a time that should not be counted because it's lunch time.

A company is not another, so to be clear, they will define what are the imposed lunch time
where the employee is not paid during the week.

Specification
=============

Lunch between Morning and Afternoon

When a time period is under Lunch :
- There is no working entry generated for that period of time.
- If you work before the lunch time and after it, it's not considered as extra time.
- The employee is not paid for the Lunch time.

TaskID: 3102363
2023-02-03 10:25:00 +01:00
Kevin Baptiste 2a5b80a6d4 [IMP] hr,resource: automatically compute number of hours
- Automatically compute the average number of hours per day on
   resource.calendar;
 - Don't allow to change the working hours of an employee when they have
   a current running contract;
 - Seperate smart buttons on resources to distinguish Material / Human.

 task-3102517

closes odoo/odoo#109768

Related: odoo/enterprise#35718
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-26 10:16:53 +01:00
Yannick Tivisse 4462386434 [FIX] resource: Avoid "Attendances can't overlap' issue on reinstall 2019-11-05 16:18:10 +01:00
Yannick Tivisse 4f6de10d41 [FIX] resource: Fix typo 2019-09-23 07:56:12 +00:00
Cas Vissers e502423f2b [FIX] resource: Rename 'Evening' into 'Afternoon' in default attendances
Evening is not the common way to describe the second shift of the day.

Closes #28253

Co-authored-by: Cas Vissers <c.vissers@brahoo.nl>

closes odoo/odoo#28950
2018-12-27 13:21:36 +00:00
Xavier Morel de86da2417 [FIX] *: remove id from various function tags 2018-10-11 15:01:04 +00:00
RomainLibert b6642f1b70 [IMP] hr_holidays: add support for taking leaves differently
We would like to be able to take leaves using different units, currently
we only support taking leaves by hours because we use datetimes.

We need to support three units:
 * days
 * half days
 * hours

These units will be defined on the leave type.

Task #40995
Closes #21760
2018-06-06 17:04:07 +02:00
jem-odoo 8386773a5b [IMP] resource: define a conversion factor hour to day on working calendar
Using a working calendar, you might want to know
how much hour correspond a work day. This depends
of you working calendar. This might be usefull to
compute leave duration (half a day is not 8 hours,
but 4).

The hours_per_day field is not computed as the
average of working hour of all work day of calendar
to allow customization. By default, it is 8, as
the default attendances are the one from the
40h/week calendar.

A constant is also available to handle case where
resource calendar is not available.
2018-01-29 10:10:46 +01:00
jem-odoo e6d4bdf72b [FIX] resource: avoid duplicate attendances when updating module
Since some calendar are in data, and their attendances
in an 'eval' with '0' ORM command, we need to put them
in noupdate mode to avoid duplicating attendances when
we update the module.
2017-11-07 08:57:29 +01:00
Jérome Maes 8cda7998ed [IMP] resource: add 35 and 38h/week working hours calendars
This commit proposes to add 35 and 38 hours/week resource calendars.
Those are considered as standard for a lot of countries. This helps
users starting with odoo time tracking.
2017-04-27 10:34:50 +02:00
Thibault Delavallée 857593068e [REM] resource: remove unnecessary demo data
Resource module defines some demo data that are not used anywhere.
Moreover using resource module on its own does not give interesting
results as this is a tool module used in various addons like holidays
or project issue.

Those modules define their own demo data that will have an impact on
resource. It is therefore not necessary to define specific demo data
that does not help the user in any way.
2017-02-16 16:53:54 +01:00
Thibault Delavallée 2b90398cb6 [REF] resource: strengthen link between companies and calendars
Purpose of this commit is to always have a default calendar for each
company and ensure it is correctly set on resources.

Some cleaning is also performed in resource models to remove unused
fields, improve labels and make views a bit more odoo-ish.

 * [REF] res_company: add a m2o to the default calendar to use in the
   company as well as a o2m linking all resource calendars used in the
   company. Some code has been added to correctly update existing
   companies when installing the module;
 * [REF] resource_calendar
  * [REM] manager field on resource.calendar: this field is never used
    and is not necessary anyway
  * [ADD] global_leave_ids: filter leaves on a calendar to see global
    company leaves
  * [IMP] better default company / calendar computation to ensure there
    is always a calendar attached to a resource
  * [IMP] improve resource and calendar views in order to look more like
    other odoo views
2017-01-18 10:26:53 +01:00
Thibault Delavallée 9250cc60e1 [IMP] resource: set default calendar as data
Currently there is no default resource calendar. This leads to calendar
being rarely used as it is not clear how to define them and how to use
them. Moreover some code handle default-like calendar by trying to
use 8-16 work hours; this should be replaced by having a real default
calendar.

This commit replaces the demo calendar by a real data calendar. It will
soon be used as default everywhere a resource calendar can be defined.

Future improvements will come to make resource easier to use and clean
its API. This commit is only the beginning !
2017-01-18 10:24:41 +01:00
Mansi Gandhi a4e57ea16c [MIG] resource: Migrated to new api. 2016-07-13 12:53:34 +02:00
Ravi Gohil 22ef7c15b5 [MOV] resource: Organized/renamed files as per new api guidelines. 2016-07-13 12:53:34 +02:00