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][FW] [13.0][IMP] hr_holidays_credit: add unit in form selection widget & plurals management #125

Draft
wants to merge 1 commit into
base: 14.0
Choose a base branch
from

Conversation

maisim
Copy link

@maisim maisim commented Jun 5, 2024

Port of #124 from 13.0 to 14.0.

@maisim maisim force-pushed the oca-port-from-13.0-to-14.0-pr-124 branch from a2e46bd to 6a69ef9 Compare June 5, 2024 13:17
@maisim maisim force-pushed the oca-port-from-13.0-to-14.0-pr-124 branch from 6a69ef9 to 4ef4dfc Compare June 5, 2024 13:23
@maisim
Copy link
Author

maisim commented Jun 5, 2024

Maybe not directly related with this module but,

On form loading, the quantity available miss in the input:
image

it's ok in the choices:
image

and once we click on the select and choose an entry, it's ok in the input
image

An idea ?

edit : The problem is not present on 13.0

@maisim
Copy link
Author

maisim commented Jun 5, 2024

The field definition in 13.0:

    holiday_status_id = fields.Many2one(
        "hr.leave.type", string="Time Off Type", required=True, readonly=True,
        states={'draft': [('readonly', False)], 'confirm': [('readonly', False)]},
        domain=[('valid', '=', True)])

in 14:

    holiday_status_id = fields.Many2one(
        "hr.leave.type", compute='_compute_from_employee_id', store=True, string="Time Off Type", required=True, readonly=False,
        states={'cancel': [('readonly', True)], 'refuse': [('readonly', True)], 'validate1': [('readonly', True)], 'validate': [('readonly', True)]},
        domain=[('valid', '=', True)])
    validation_type = fields.Selection(string='Validation Type', related='holiday_status_id.leave_validation_type', readonly=False)
    # HR data

I also realize that we completely replace the name_get method, which may not always be desirable, let's dig deeper.

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.

None yet

1 participant