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

[14.0][ADD] epa_hr_expense_tier_validation_custom: add new module #50

Merged

Conversation

kaynnan
Copy link
Contributor

@kaynnan kaynnan commented Apr 17, 2024

cc @marcelsavegnago @WesleyOliveira98 @Matthwhy

Customização para ter o comportamente de state_from state_to semelhante ao da v12.0.

Copy link
Contributor

@WesleyOliveira98 WesleyOliveira98 left a comment

Choose a reason for hiding this comment

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

LGTM

_inherit = "hr.expense.sheet"
# Adapting state according to v12.0 usability
_state_from = ["draft"]
_state_to = ["submit", "approve", "post", "done"]
Copy link
Contributor

Choose a reason for hiding this comment

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

isso nao viria de algum modulo de tier validation do hr_expense ? isso pelo jeito nao eh uma customização e sim um modulo novo ?

Copy link
Contributor Author

@kaynnan kaynnan Apr 17, 2024

Choose a reason for hiding this comment

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

Ele é uma customização do hr_expenses_tier_validation eu estou sobrescrevendo o state from e state to para que seja igual ao da v12.0. Na versão 14 o tier.validation somente ocorre quando esta em submit, então a custom seria para ocorrer em draft, aqui o link para comparar https://github.com/OCA/hr-expense/blob/14.0/hr_expense_tier_validation/models/hr_expense_sheet.py#L10

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Subi um novo commit movendo o módulo para incluir a nomenclatura de custom, não tinha me atentado ao nome, o da branch ficou correto mas o módulo em si ficou faltando o _custom hehe

@kaynnan kaynnan force-pushed the 14.0-add-epa_hr_expense_tier_validation_custom branch from 0973f4a to be9f293 Compare April 18, 2024 04:10
@kaynnan kaynnan changed the title [14.0][ADD] epa_hr_expense_tier_validation: add new module [14.0][ADD] epa_hr_expense_tier_validation_custom: add new module Apr 18, 2024
@marcelsavegnago marcelsavegnago merged commit 9fcc1a6 into 14.0 Apr 18, 2024
2 of 4 checks passed
@marcelsavegnago marcelsavegnago deleted the 14.0-add-epa_hr_expense_tier_validation_custom branch April 18, 2024 12:08
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.

4 participants