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: Migration to 15.0 #1138

Merged

Conversation

victoralmau
Copy link
Member

Superseed #1086

Migration to 15.0

Please @pedrobaeza and @CarlosRoca13 can you review it?

@Tecnativa TT36463

pedrobaeza and others added 26 commits August 29, 2022 08:52
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.

[UPD] README.rst
[UPD] Update hr_employee_calendar_planning.pot
Add _description for model hr.employee.calendar to make it pass runbot.

[UPD] Update hr_employee_calendar_planning.pot
[UPD] Update hr_employee_calendar_planning.pot

[UPD] README.rst

Update translation files

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.

hr_employee_calendar_planning 13.0.1.0.1
[UPD] Update hr_employee_calendar_planning.pot

[UPD] README.rst
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/
…r when is related to some employee

[UPD] Update hr_employee_calendar_planning.pot

hr_employee_calendar_planning 14.0.1.0.2

Update translation files

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/
… field in to show only allowed records according to company. Add constraint to prevent change avoid changing the company when the calendar is linked to an employee of another company.

[UPD] Update hr_employee_calendar_planning.pot

hr_employee_calendar_planning 14.0.1.1.0

Update translation files

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/
…even when calendar is not active.

TT31606

[UPD] Update hr_employee_calendar_planning.pot

[UPD] README.rst

Update translation files

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

[UPD] README.rst
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
hr_employee_calendar_planning 14.0.1.3.1

Update translation files

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``

hr_employee_calendar_planning 14.0.1.4.0
Currently translated at 100.0% (23 of 23 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/es_AR/

hr_employee_calendar_planning 14.0.1.4.1
@victoralmau victoralmau force-pushed the 15.0-mig-hr_employee_calendar_planning branch from 6f02959 to 9d8b78c Compare August 29, 2022 07:24
@pedrobaeza
Copy link
Member

/ocabot migration hr_employee_calendar_planning

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Aug 29, 2022
@OCA-git-bot OCA-git-bot mentioned this pull request Aug 29, 2022
28 tasks
@OCA-git-bot
Copy link
Contributor

The migration issue (#1036) has been updated to reference the current pull request.
however, a previous pull request was referenced : #1086.
Perhaps you should check that there is no duplicate work.
CC : @pegonzalezspesol

hr_employee_calendar_planning/i18n/es.po Outdated Show resolved Hide resolved
hr_employee_calendar_planning/i18n/es.po Outdated Show resolved Hide resolved
@victoralmau victoralmau force-pushed the 15.0-mig-hr_employee_calendar_planning branch 2 times, most recently from 99bfc13 to 1745434 Compare August 29, 2022 07:47
@victoralmau
Copy link
Member Author

Changes done.

<field name="calendar_ids" context="{'default_company_id': company_id}">
<field
name="calendar_ids"
context="{'default_company_id': parent.company_id}"
Copy link
Member

Choose a reason for hiding this comment

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

Why the parent? It was removed on other PRs company_id is already a field from hr.employee so it should not be necessary.

You can check that it does not work following this steps:

  • Create a company
  • Select both companies on your view
  • Create a new employee for company B and create a calendar from the widget. The calendar created will be from company A not B.

Copy link
Member Author

@victoralmau victoralmau Aug 31, 2022

Choose a reason for hiding this comment

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

Sorry, following the steps you indicate I see that it was not working correctly.

The change that I have applied work fine, right?
ejemplo-v15

@victoralmau victoralmau force-pushed the 15.0-mig-hr_employee_calendar_planning branch from 1745434 to c62547b Compare August 31, 2022 14:51
Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

Yeah!!! Now seems to work fine! Thanks! 😄

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-1138-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0716e7b into OCA:15.0 Sep 1, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at b029b76. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 15.0-mig-hr_employee_calendar_planning branch September 6, 2022 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.