-
Notifications
You must be signed in to change notification settings - Fork 2
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
[14.0][ADD] epa_hr_expense_tier_validation_custom: add new module #50
Conversation
There was a problem hiding this 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"] |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
0973f4a
to
be9f293
Compare
cc @marcelsavegnago @WesleyOliveira98 @Matthwhy
Customização para ter o comportamente de state_from state_to semelhante ao da v12.0.