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

[FW][FIX] hr_holidays: allocation multi-company #48753

Closed

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 1, 2020

As Mitchell Admin:

  • Install timeoff
  • General Settings > Multi Company
  • Create companies A
  • Switch to company A
  • Go to timeoff > Managers > All > Allocations > Create a record

An AccessError is raised from _onchange_type because
we try to access employee_ids[:1].id and it may gives employee of another company.
we have already compute field employee_id, it will gives employee of curren company.

After this AccessError is solved.

task - 2179571

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #45381

…mpany

Current Behaviour:
As Admin:
- Install timeoff and enable Multi company
- Create new company and switch to that company
- Go to timeoff > Managers > All > Allocations > Create a record
An AccessError is raised from `_onchange_type` because it try to
access `employee_ids[:1].id` and it may gives employee of another company.

Expected Behaviour:

After this commit, it will not raise the AccessError. if employee of
that company is exist then and then set on leave allocation.
so we have already compute field `employee_id`, it will gives employee
of current company.

Taskid: 2179571
Closes: odoo#45381
X-original-commit: 73b3d11
@robodoo robodoo added forwardport This PR was created by @fw-bot seen 🙂 labels Apr 1, 2020
@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 1, 2020

This PR targets 13.0 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Apr 1, 2020
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 1, 2020
@tivisse
Copy link
Contributor

tivisse commented Apr 7, 2020

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Apr 7, 2020

I'm sorry, @tivisse. This PR is already reviewed, reviewing it again is useless.

@fw-bot fw-bot deleted the 13.0-saas-12.3-work-entries-yti-41YA-fw branch April 21, 2020 09:47
immontilla pushed a commit to immontilla/odoo that referenced this pull request Apr 26, 2020
…mpany

Current Behaviour:
As Admin:
- Install timeoff and enable Multi company
- Create new company and switch to that company
- Go to timeoff > Managers > All > Allocations > Create a record
An AccessError is raised from `_onchange_type` because it try to
access `employee_ids[:1].id` and it may gives employee of another company.

Expected Behaviour:

After this commit, it will not raise the AccessError. if employee of
that company is exist then and then set on leave allocation.
so we have already compute field `employee_id`, it will gives employee
of current company.

closes odoo#48753

Taskid: 2179571
Closes: odoo#45381
X-original-commit: 73b3d11
Related: odoo/enterprise#9588
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants