[FIX]hr_negative_leave:fix leave types available when creating a leave request #17
Reference in New Issue
Block a user
No description provided.
Delete Branch "16-fix-hr-negative-leaves"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://elabore.coop/web#id=760&cids=1&menu_id=916&action=1476&model=helpdesk.ticket&view_type=form
@@ -7,3 +7,3 @@<xpath expr="//field[@name='holiday_status_id']" position="attributes"><attribute name="domain">['|','|', '|', '|',Je trouve les effets de bord de ce domaine assez compliqué à identifier, du coup j'ai demandé à notre ami Claude.
Est-ce que tu es d'accord avec sa suggestion ? (moi je suis plutôt d'accord)
hello,
pour allows_negative, c'est voulu, on veut pouvoir sélectionner le type de congé même en cas de solde négatif
pour has_valid_allocation, c'est en effet trop permissif, j'ai repris le domain initial qui est :
if requires_allocation == 'no':
ok
elif has_valid_allocation and virtual_remaining_leaves > 0 and max_leaves > 0:
ok
else:
refuse
que j'ai changé pour
if requires_allocation == 'no': ok
elif has_valid_allocation and virtual_remaining_leaves > 0 and max_leaves > 0: ok
elif allow_negative == True: ok
else: refuse
Top, et merci pour le pseudo code en commentaire 😍