Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][MIG] hr_employee_calendar_planning #1086

Conversation

pegonzalezspesol
Copy link
Contributor

@pegonzalezspesol pegonzalezspesol commented Mar 16, 2022

Work done:

  • Fix tests
  • Fix init_hook
  • re-generate README.rst
  • Fix odoo-pylint warnings

@oca-clabot
Copy link

Hey @pegonzalezspesol, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@pegonzalezspesol pegonzalezspesol changed the title 15.0 mig hr employee calendar planning [15.0][MIG] hr employee calendar planning Mar 16, 2022
@pegonzalezspesol pegonzalezspesol changed the title [15.0][MIG] hr employee calendar planning [15.0][MIG] hr_employee_calendar_planning Mar 16, 2022
@pegonzalezspesol pegonzalezspesol mentioned this pull request Mar 16, 2022
28 tasks
@victoralmau
Copy link
Member

Please, cherry pick #1094

@victoralmau
Copy link
Member

Please, cherry pick #1095 (comment)

Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, don't remove tests, It is very important to validate all use cases.

pedrobaeza and others added 23 commits July 7, 2022 17:46
This module allows to manage employee working time with profiles by date
intervals.

The profiles are regular working time calendars, but they are treated as
master ones here, allowing you to compose complexes working times by dates.

Under the hook, a unique working time is created for each employee with the
proper composition for not affecting the rest of the functionality linked to
this model.

Installation
============

During the installation of the module, current working times are split by
start/end dates for having consistent data, and the potential new composed
calendar planning is saved instead on the employee.

Configuration
=============

1. Go to *Employees > Employees*.
2. Open or create a new one.
3. On the "Public Information" page, fill the section "Calendar planning" with:

   * Starting date (optional).
   * Ending date (optional).
   * Working time to apply during that date interval.

Known issues / Roadmap
======================

* Add a wizard for generating next year calendar planning based on current one
  in batch.
* Add constraint for avoiding planning lines overlapping.
* Avoid the regeneration of whole private calendars each time a change is
  detected.
Add _description for model hr.employee.calendar to make it pass runbot.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-13.0/hr-13.0-hr_employee_calendar_planning
Translate-URL: https://translation.odoo-community.org/projects/hr-13-0/hr-13-0-hr_employee_calendar_planning/
- On the module init, existing employee calendar leaves should be linked
to the employee's new autocalendar.
Currently translated at 94.4% (17 of 18 strings)

Translation: hr-14.0/hr-14.0-hr_employee_calendar_planning
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_calendar_planning/fr/
OCA-git-bot and others added 19 commits July 7, 2022 17:46
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-14.0/hr-14.0-hr_employee_calendar_planning
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_calendar_planning/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-14.0/hr-14.0-hr_employee_calendar_planning
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_calendar_planning/
…weeks.

Regenerate automatic calendar correctly when calendars are 2 weeks old (or any of them are 2 weeks old).
TT32425
…r if calendars have been defined in employee creation.

TT32425
Currently translated at 100.0% (22 of 22 strings)

Translation: hr-14.0/hr-14.0-hr_employee_calendar_planning
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_calendar_planning/ca/
…void create employees without calendar planing.

TT35897
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-14.0/hr-14.0-hr_employee_calendar_planning
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_calendar_planning/
Parent is not necessary on context, this returns the next error when you
try to select a calendar planning on the employee:
``Uncaught Error: NameError: name 'parent' is not defined``
@SoporteOperu SoporteOperu force-pushed the 15.0-mig-hr_employee_calendar_planning branch from 32d4edd to 2e89948 Compare July 8, 2022 15:10
@pegonzalezspesol
Copy link
Contributor Author

Please, don't remove tests, It is very important to validate all use cases.

@victoralmau PR rebased with latests 14.0 status. Can you please have a look?

Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review OK.

@pedrobaeza
Copy link
Member

/ocabot migration hr_employee_calendar_planning

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jul 18, 2022
_("%s is used in %s employee(s). You should change them first.")
% (item.name, total_items)
_(
"%(item_name)s is used in %(total_items)s employee(s)."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update at least Spanish translation?

@classmethod
def setUpClass(cls):
super().setUpClass()
super(TestHrEmployeeCalendarPlanning, cls).setUpClass()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need of this diff. It was OK before

@victoralmau
Copy link
Member

Can you apply the latest changes to merge it?

@victoralmau
Copy link
Member

Please, cherry-pick #1128

@victoralmau
Copy link
Member

Superseed by #1138

@pedrobaeza pedrobaeza closed this Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.