Wednesday, September 18, 2019
2 changes
Resolved issues and error corrections
Saving mail templates now ignores rendering errors caused by information that is only available when the email is actually sent. Users will still be warned if a template would render as empty, preventing blank emails without blocking valid template updates.
Original PR description
Commit a094095 introduced a change that would test that template rendering worked for mail templates when they were being saved, this however introduced an issue: when saving from the UI or when updating a module containing mail templates, the context might not contain the elements that are available when sending the e-mail, thus making the rendering crash. However, commit a094095 was supposed to only raise a UserError in case the rendered template was empty, if the rendering itself crashes we should ignore it since it will be handled when sending the mail anyway. This commit makes it so any rendering errors are ignored (like missing keys from the context) and only empty rendered mails will raise a UserError. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes incorrect warning messages shown during Time Off allocation. Users now see the right guidance when allocation rules or limits need attention, reducing confusion for HR teams.
Original PR description
Description of the issue/feature this PR addresses: Issues https://github.com/odoo/odoo/issues/31892 Current behavior before PR: See https://github.com/odoo/odoo/issues/31892 Desired behavior after PR is merged: Correct warning messages for Time off allocation. Closes: https://github.com/odoo/odoo/issues/31892 Cc: @tivisse (Can someone please confirm if this is the correct way to edit .pot ?) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr