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] payroll #81

Merged
merged 118 commits into from
Nov 10, 2022
Merged

[15.0][MIG] payroll #81

merged 118 commits into from
Nov 10, 2022

Conversation

mtelahun
Copy link
Contributor

Fixes: #19
cc: #78

@mtelahun
Copy link
Contributor Author

It looks like there's a build problem. Probably a stale config somewhere. Can someone take a look please?
@nimarosa @pedrobaeza

@mtelahun
Copy link
Contributor Author

I mean the build failures. I'll take care of the pre-commit failures.

@mtelahun
Copy link
Contributor Author

@nimarosa @pedrobaeza Sorry. It was my own fault for not checking the migration went properly.

@nimarosa
Copy link
Contributor

@mtelahun i think contract views changed a bit in v15.0 that's why build error is about a xpath not found.

@nimarosa nimarosa added this to the 15.0 milestone Oct 13, 2022
@nimarosa
Copy link
Contributor

/ocabot migration payroll

@OCA-git-bot OCA-git-bot mentioned this pull request Oct 13, 2022
6 tasks
@OCA OCA deleted a comment from oca-clabot Oct 13, 2022
@nimarosa
Copy link
Contributor

@mtelahun Please before finishing this do a rebase with 15.0 version since i pushed updated dotfiles to have v15.0 up to date.

@norlinhenrik
Copy link
Contributor

Can we replace hr.rule.parameter & hr.rule.parameter.value with a dependency on base_time_parameter?

@nimarosa
Copy link
Contributor

@norlinhenrik Hello Henrik, I think adding a dependency to a server-tools module will be bad for payroll.

Most people don't download all oca repos in his instances so it will end up with an dependency error when trying to install payroll and not having the other module. I think it's good to maintain the less dependencies required here.

Also, and this one is more personal, the way I see it the user who uses rule parameters expect to have the view inside payroll module. Doing this with an inherited module will be a little tricky because we need to filter all views by domain and add again the module field in base_time_parameter and think of a way to integrate it in payroll the way it's done now.

In my instances I use time parameter to store specific payroll data that has to be easily changed by the user and also have some custom implementations around this model and no time to migrate them now to a new behavior or module.

If you have a good way of doing this by leaving the current functionality intact you can propose a PR on the 14.0 branch and it will be migrated to 15.

I'm not a fan of introducing big changes in migrations because it causes confusion and errors and will requiere migration scripts, that's why I wanted to do the big changes in 14.0 so we make modules maintenance more easy and straightforward.

Hope you understand and feel free to suggest a PR if you can do it without affecting current functionality.

@mtelahun mtelahun force-pushed the 15.0-mig-payroll branch 4 times, most recently from 358748c to 29f9870 Compare October 14, 2022 07:12
@mtelahun
Copy link
Contributor Author

@nimarosa All is green now. Sorry for the noise. This was the first migration I did in a long time.

During my migration I noticed that Odoo has removed the code field from hr.leave.type. So, I have reverted the payroll module to using the name instead.
Maybe, starting from 15.0 onward we need a new model to map hr.leave.type to a code in worked days. What do you think?

@mtelahun
Copy link
Contributor Author

Can we replace hr.rule.parameter & hr.rule.parameter.value with a dependency on base_time_parameter?

I think this is a separate issue and belongs in a different PR

@nimarosa
Copy link
Contributor

During my migration I noticed that Odoo has removed the code field from hr.leave.type. So, I have reverted the payroll module to using the name instead.

Maybe, starting from 15.0 onward we need a new model to map hr.leave.type to a code in worked days. What do you think?

Hello @mtelahun. I hate when odoo changes things like this, but I think is has to be because enterprise payroll module didn't use that code because enterprise module is different (our module is better un my opinion).

What do you think about inheriting hr.leave.type here in the payroll module and adding this field again? That way we can maintain current functionality that is key for the module, at least for me. I think using name in salary rules will generate problems.

If you think that adding this field to leave type will fix it we can include it in this PR.

@nimarosa
Copy link
Contributor

nimarosa commented Oct 14, 2022

@mtelahun also noticed you removed all string="" of a lot of fields. Why is that?

@mtelahun
Copy link
Contributor Author

mtelahun commented Oct 14, 2022 via email

@mtelahun
Copy link
Contributor Author

mtelahun commented Oct 14, 2022 via email

@nimarosa
Copy link
Contributor

@mtelahun yes but you are removing string in model creation not on tree view. Correct me maybe I didn't understand

@mtelahun
Copy link
Contributor Author

mtelahun commented Oct 14, 2022 via email

@mtelahun
Copy link
Contributor Author

@nimarosa @apps2grow Please review and let's merge. This incorporates the latest changes.

@nimarosa
Copy link
Contributor

@mtelahun for me it's okay. Just done a code review and commit history looks okay.

Did you tested it yet? Like functional.

@nimarosa nimarosa requested review from a user and norlinhenrik November 10, 2022 17:02
Copy link
Contributor

@norlinhenrik norlinhenrik left a comment

Choose a reason for hiding this comment

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

I successfully computed a payslip for Marc Demo.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@nimarosa
Copy link
Contributor

Okay let's go.

I have a few PRs that I might add to 14.0 but we can migrate them later.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-81-by-nimarosa-bump-nobump, awaiting test results.

@OCA-git-bot
Copy link
Contributor

@nimarosa The merge process could not be finalized, because command git push origin 15.0-ocabot-merge-pr-81-by-nimarosa-bump-nobump:15.0 failed with output:

To https://github.com/OCA/payroll
 ! [rejected]        15.0-ocabot-merge-pr-81-by-nimarosa-bump-nobump -> 15.0 (fetch first)
error: failed to push some refs to 'https://***@github.com/OCA/payroll'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

@OCA-git-bot OCA-git-bot merged commit fd97f54 into OCA:15.0 Nov 10, 2022
@OCA-git-bot
Copy link
Contributor

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

@mtelahun
Copy link
Contributor Author

mtelahun commented Nov 11, 2022 via email

@mtelahun mtelahun deleted the 15.0-mig-payroll branch November 12, 2022 08:11
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.

9 participants