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

d-fence
Copy link
Contributor

@d-fence d-fence 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.

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.
@C3POdoo C3POdoo added the RD research & development, internal work label Mar 26, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Mar 26, 2019
@RomainLibert
Copy link
Contributor

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
Copy link
Contributor Author

d-fence commented Mar 26, 2019

@RomainLibert thanks
@robodoo r+

robodoo pushed a commit that referenced this pull request 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.

closes #32119

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

robodoo commented Mar 26, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 26, 2019
@fw-bot fw-bot deleted the master-fix-hr-holidays-dashboard-moc branch October 19, 2019 15:47
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 RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants