Skip to content
Snippets Groups Projects
  1. Sep 01, 2023
    • tong-odoo's avatar
      [FIX] hr_work_entry_contract: work entry timezone issue for attendance · de0bc759
      tong-odoo authored
      
      Steps to reproduce:
      
      - Install Attendances app and Employee app
      - Setup an employee with a contract which work entry source is from
      attendance
      - Change the working schedule to different timezone, for example
      Asia/Hong_Kong
      - By default the working schedule should be start to work from 0800 to 1700
      - Now create an attendance in the first day of the contract, i.e.
      1st May 2023, check in time 0700, check out time 2000
      - The total work hours should be 13
      - However, in the work entry, the genearted work entry is 0800-2000, only
      12 work hours.
      
      Current behaviour:
      The generated work entry mismatches the value of the attendance
      
      Expected behaviour:
      The work entry should match the attendance
      
      Explanation:
      This issue is casued by the timezone issue. When the system generate
      the work entry, it will calculate the date_from datetime and date_to datetime.
      Then it will compare between the attendance and the date_from datetime to choose
      the larger datetime to put inside the work entry as start time.
      
      However, the date_from datetime didn't consider the timezone of the working schedule.
      In the above example, Asia/Hong Kong time is UTC+8 time. Therefore if we convert
      the attendance time back to UTC time. It is check in time 30 April 2023, 2300 to
      check out time 1 May 2023, 1200. In the mean time, if we compare between the date_from
      datetime (1 May 2023, 0000) and the attendance check in time (30 April 2023, 2300).
      The system will take the date_from time and therefore the generated work entry time
      is incorrect.
      
      task-3468012
      
      closes odoo/odoo#133610
      
      Related: odoo/enterprise#46574
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      Co-authored-by: default avatarYannick Tivisse <yti@odoo.com>
      de0bc759
  2. Aug 21, 2023
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr_work_entry_holidays: ensure the consistency of leaves · 57ff5142
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
      -------------------
      - install `hr_work_entry_holidays` module
      - create an employee and add two contracts:
          - from 2023-01-01 to 2023-06-30 with a full time (5/5) resource
            which is expired
          - from 2023-07-01 to 2023-12-31 with a partial time (4/5) resource
            which is running
            (doesn't work on Wednesday)
      - create an allocation with 10 days
      - with the employee, create two leaves:
          - 3 days during the first semester with one Wednesday
          - 3 days during the second semester with one Wednesday
      
      Issue:
      ------
      Leave duration is based on the current contract.
      If we change the type of leave by modifying its days/hours unit,
      we will get inconsistencies between days and hours for leave taken
      in a period belonging to another contract.
      
      Cause:
      ------
      Expired contracts are not taken into account
      when calculating the number of days and hours.
      
      Solution:
      ---------
      Add `close` state to contract search.
      
      opw-3419380
      
      closes odoo/odoo#132097
      
      X-original-commit: 249f8c83
      Signed-off-by: default avatarSofie Gvaladze (sgv) <sgv@odoo.com>
      Signed-off-by: default avatarThomas Lefebvre (thle) <thle@odoo.com>
      57ff5142
  3. Aug 20, 2023
  4. Aug 06, 2023
  5. Jul 30, 2023
  6. Jul 23, 2023
  7. Jul 16, 2023
  8. Jul 14, 2023
  9. Jul 09, 2023
  10. Jul 02, 2023
  11. Jun 18, 2023
  12. Jun 11, 2023
  13. Jun 04, 2023
  14. May 28, 2023
  15. May 07, 2023
  16. Apr 26, 2023
  17. Apr 16, 2023
  18. Apr 09, 2023
  19. Apr 02, 2023
  20. Mar 30, 2023
  21. Mar 12, 2023
  22. Mar 05, 2023
  23. Feb 14, 2023
    • Tommy (tong)'s avatar
      [FIX] hr_work_entry_contract: missing leave_id record on some work entries · 1987984e
      Tommy (tong) authored
      
      Steps to reproduce:
      
      - Add a pubic holiday record, i.e., From 6 Feb 2023 to 7 Feb 2023
      - Add a leave with the date conflicting the public holiday, i.e. From
      3 Feb 2023 to 8 Feb 2023
      - Regenrate the work entries and check the work entry in form view.
      
      Current behaviour:
      Missing leave_id on some work entries
      
      Expected behaviour:
      It should linked to the corresponding leave for the work entries that is
      created by the leave, while public holiday work entries should keep leave_id
      empty.
      
      Explanation:
      
      After calling contract._get_interval_leave_work_entry_type, the leaves should
      be filted out the not related leaves so contract._get_more_vals_leave_interval
      can get the correct vals. Otherwise public holiday will always return
      {'leave_id': false} in contract._get_more_vals_leave_interval which will replace
      the correct leave_id value.
      
      closes odoo/odoo#112633
      
      X-original-commit: 66b65074
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      1987984e
  24. Feb 13, 2023
  25. Feb 08, 2023
    • Rob Coekaerts's avatar
      [IMP] hr: simplify and correct the default data · dcc8bbf0
      Rob Coekaerts authored
      
      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#112173
      
      Related: odoo/enterprise#36796
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      dcc8bbf0
  26. Feb 05, 2023
  27. Jan 29, 2023
  28. Jan 25, 2023
  29. Jan 22, 2023
  30. Jan 15, 2023
  31. Jan 08, 2023
  32. Jan 01, 2023
  33. Dec 25, 2022
  34. Dec 21, 2022
  35. Dec 11, 2022
  36. Dec 04, 2022
  37. Nov 27, 2022
  38. Nov 20, 2022
  39. Nov 13, 2022
  40. Nov 06, 2022
Loading