2 Commits
Author SHA1 Message Date
Cameron 35017adaa9 [FIX] hr_expense: allow to create expenses via alias for employees not related to a user
Current behavior:
When trying to create an expense using alias, if a `hr.employee` not linked to a user want to, he won't be able

This bug occurs after this [commit](https://github.com/odoo/odoo/commit/fbeb7aebcadbe77ff7774b538550373650b329fe)

Steps to reproduce the error :
- Create an employee not related to a user
- Configure alias for expenses
- Try to send an email to the expense's alias and check at the logs

After this commit:
Employees without a related user will be able to create an expense from an email alias

opw-3892778
opw-3892701
opw-3893319
opw-3893591

closes odoo/odoo#163672

X-original-commit: 1dd67119c27d219eac2b726ef88cc4af3bed2814
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-04-29 08:07:31 +00:00
Cameron ecedbeb7c9 [FIX] hr_expense: select the right employee for an expense created with alias
Current behavior:
When trying to create an expense using alias, if there's several `hr.employee` linked to a user, it select the first one instead of this with the right company

Steps to reproduce the error :
- Create different employee's profiles for a same user
- Put the default one on the user's profile (don't put the first that you created because it will select the first for the expense)
- Try to send an email to the expense's alias and check at the logs

After this commit:
The right employee (this one in the default company) will be selected and no error will be triggered

opw-3754015

closes odoo/odoo#162923

Forward-port-of: odoo/odoo#161853
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Cameron Noupoue (cano) <cano@odoo.com>
2024-04-24 11:16:03 +00:00