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

[FIX] hr_holidays: use api model instead of multi for dashboard #32119

Closed

Conversation

Projects
None yet
4 participants
@d-fence
Copy link
Contributor

commented Mar 26, 2019

Before 1ced3bf, the get_days_all_request method was called with the
context as an argument. As a consequence, because of the api.multi, the
first arg is used as the ids of the record. As the id is not used in
this method, it was not harmful. With the above mentioned fix, there is
no more argument. This causes a traceback when clicking on menu "My Time
Off/Dashboard".

With this commit, the api.model is used instead, that way, the first arg
is not considered as ids.

[FIX] hr_holidays: use api model instead of multi for dashboard
Before 1ced3bf, the get_days_all_request method was called with the
context as an argument. As a consequence, because of the api.multi, the
first arg is used as the ids of the record. As the id is not used in
this method, it was not harmful. With the above mentioned fix, there is
no more argument. This causes a traceback when clicking on menu "My Time
Off/Dashboard".

With this commit, the api.model is used instead, that way, the first arg
is not considered as ids.

@robodoo robodoo added the seen 🙂 label Mar 26, 2019

@d-fence d-fence requested a review from RomainLibert Mar 26, 2019

@C3POdoo C3POdoo added the RD label Mar 26, 2019

@robodoo robodoo added the CI 🤖 label Mar 26, 2019

@RomainLibert

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

Maybe we should also consider changing _get_contextual_employee_id to an api.model method
It seems that it doesn't require the api.multi

I will integrate that in here as I'm currently working on the dashboard (odoo-dev@6ba2bd7)

As this causes a traceback, feel free to merge it

@d-fence

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2019

@robodoo robodoo added the r+ 👌 label Mar 26, 2019

robodoo pushed a commit that referenced this pull request Mar 26, 2019

[FIX] hr_holidays: use api model instead of multi for dashboard
Before 1ced3bf, the get_days_all_request method was called with the
context as an argument. As a consequence, because of the api.multi, the
first arg is used as the ids of the record. As the id is not used in
this method, it was not harmful. With the above mentioned fix, there is
no more argument. This causes a traceback when clicking on menu "My Time
Off/Dashboard".

With this commit, the api.model is used instead, that way, the first arg
is not considered as ids.

closes #32119

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.