Daily updates from Odoo
Tuesday, May 31, 2022
2 changes · master
Resolved issues and error corrections
This change corrects internal timing issues that could cause referral point totals or project-related checks to use outdated information. It helps keep employee referral rewards and project data processing accurate after background email cleanup changes.
Original PR description
# hr_referral: invalidate the cache after creating hr.referral.points Now that the <mail.mail> are removed in a CRON, one test in hr_referral failed. The reason is that the cache of `earned_points` need to be invalidated after creating <hr.referral.points>. Before, after the deletion of the <mail.mail>, the cache was removed and that's why it worked. # project_enterprise: flush before doing SQL query Now that the <mail.mail> are removed in a CRON, one test in project failed. The reason is that we do not flush the model before doing SQL queries on them. Before, after the deletion of the <mail.mail>, everything was flushed and that's why it worked. Task-2587345
Peruvian electronic invoices already include the invoice amount written in words for SUNAT. This fix prevents users from adding the same note a second time, avoiding SUNAT rejections caused by duplicated information.
Original PR description
Since https://github.com/odoo/enterprise/pull/17188, the invoice XML that we send to SUNAT is automatically generated with a `<Note>` that contains the invoice amount in words: `<cbc:Note languageLocaleID="1000">NUEVE MIL CUATROCIENTOS CUARENTA Y 00/100 GOLD</cbc:Note>` SUNAT returns an error if the user manually introduces a duplicate note by setting the `l10n_pe_edi_legend` field to `1000`. See https://github.com/odoo/enterprise/pull/23465 where this was discovered.