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

[MIG][15.0] hr_expense: add migration for 15.0 #3349

Closed
wants to merge 1 commit into from

Conversation

daonamutc1
Copy link

This PR
Migration done

@legalsylvain
Copy link
Contributor

/ocabot migration hr_expense

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jul 1, 2022
Copy link
Contributor

@remi-filament remi-filament left a comment

Choose a reason for hiding this comment

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

Hi @daonamutc1
Thank you for your work !

I found an issue testing this migration script :
The payment_state is not correctly computed here, since in v14 for account_move of type entry it would always end up being False (as per https://github.com/odoo/odoo/blob/20b8453f4cc69caefef8811485f8c8764f19efdb/addons/account/models/account_move.py#L1473).
In v15, the _compute_amount function is modified to call _payment_state_matters function which is inherited by hr_expense here : https://github.com/odoo/odoo/blob/ac81d3b87852f25a753f104007fb4e05be5b522a/addons/hr_expense/models/account_move_line.py#L9

We would probably need to recompute payment_state on account_move first before assigning it to hr_expense otherwise you always get False and therefore not_paid on hr_expense_sheets.

@pedrobaeza
Copy link
Member

Superseded by #3689 to fix the problem reported by @remi-filament

@pedrobaeza pedrobaeza closed this Jan 13, 2023
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.

5 participants