Daily updates from Odoo
Thursday, August 22, 2024
7 changes · 17.0
Resolved issues and error corrections
Fixed a bug where WhatsApp messages were not triggering browser push notifications. Users who have WhatsApp configured and enabled notifications will now receive push alerts when WhatsApp messages arrive, improving communication visibility and responsiveness.
Original PR description
Performs test of a related commit in communiy: [FIX] mail: include whatsapp in webpush notifications There are couple of components in the notification architecture. For the sake of illustration let's simplify it with the following: Sender -> Queuer -> Receiver Queuer is an FMC backend, so we should only be concerned about the other two. Receiver which is just a frontend service worker that will generate notifications as soon as he receives an event. The issue (before this commit) was in the Sender part, which was skipping whatsapp type message generation. [Reproduce] - Configure Whatsapp account, include user A in "Notify users" - Allow notifications in your browser (chat icon/ OdooBot suggestion) - Send a whatsapp message to the configured whatsapp number - BUG: Push notification not showing up opw-3720699
This fix ensures that employee service rates are properly adjusted based on customer tax settings, just like product prices. Previously, when a customer had a fiscal position that changed tax treatment (e.g., from tax-inclusive to tax-exclusive), the service charges would calculate incorrectly while product charges calculated correctly. Now both are handled consistently.
Original PR description
### Steps to reproduce: - Create a fiscal position that converts 19% tax-inclusive into 19% tax-exclusive. - Create a product with 19% tax inclusive. - Create a contact and assign the above fiscal…
### Steps to reproduce: - Create a fiscal position that converts 19% tax-inclusive into 19% tax-exclusive. - Create a product with 19% tax inclusive. - Create a contact and assign the above fiscal position. - Navigate to a field service project and add an employee with a tax-included rate in the employee mapping. - Create a new field service task for the customer with the assigned fiscal position and add one hour for the employee in the mapping. - Add the product with 19% tax included to the task. - Mark the task as done. #### Current Behavior: - The product unit price is calculated excluding tax. - The service unit price remains calculated as tax-included. #### Expected Behavior: Both product and service unit prices should be calculated consistently as tax-excluded when the tax is set to 19% exclusive. ### Cause of the issue: When creating a new sale order line if the unit price is not specified "product_id_change" is called which set the correct unit price after applying the fpos by calling `_update_taxes` on the line: https://github.com/odoo/odoo/blob/a09e0c651ea54faa3b41e6012b6d62f143519f07/addons/sale/models/sale_order_line.py#L617-L628 But in our case we are setting the `unit_price` to the employee rate here: https://github.com/odoo/enterprise/blob/e23e01337faeec652d400618cf14aaf3d6d47ef2/industry_fsm_sale/models/project_task.py#L408-L412 and the taxes are not taken into account. ### Fix: The unit price of the employee rate should be updated to reflect the changed taxes from fpos. However, since `_update_taxes` relies on the unit price of the product rather than on the one given to the line: https://github.com/odoo/odoo/blob/a09e0c651ea54faa3b41e6012b6d62f143519f07/addons/sale/models/sale_order_line.py#L685 we can not call the `_update_taxes` directly to update the sol. opw-3853196 Co-authored-by: waha <waha@odoo.com> Forward-Port-Of: odoo/enterprise#67730
This fix resolves an issue where employee identification numbers (INSZ) for people born after 2000 were incorrectly rejected as invalid. The validation logic has been updated to properly handle the different calculation method required for post-2000 birth dates, ensuring all employees can have their identification numbers correctly registered in the system.
Original PR description
If you were born after 2000 your insz number wouldn't be recognized as valid. Steps to reproduce: ------------------- * Install pos_blackbox_be module and HR module * Create an employee with a birth date set after 2000 * Generate an insz number for a person born after 2000 https://www.rsolution.be/rijksregister-nummer-generator.RSolution * Set the number on the employee and remove all `.` and `-` > Observation: When saving the insz wouldn't be recognized as valid Why the fix: ------------ When trying to validate a insz number for a person born after 2000, the calculation is a bit different. You need to add a `2` before `partial_number` to make it work. Explanation can be found on wikipedia here: https://fr.wikipedia.org/wiki/Num%C3%A9ro_de_registre_national opw-4077545
This fix resolves an error that occurred when updating quantities in manufacturing work order steps on the shop floor. The issue was caused by operation notes not being properly recognized in the system, leading to crashes. The fix ensures operation notes are correctly registered so users can update work order information without encountering errors.
Original PR description
## Analysis Since a recent commit (https://github.com/odoo/enterprise/commit/25f72c0b716d5fdc15493b74375106e3d6f580fa), the operation_note is fetched independently from the other fields to avoid…
## Analysis
Since a recent commit (https://github.com/odoo/enterprise/commit/25f72c0b716d5fdc15493b74375106e3d6f580fa), the operation_note is fetched independently from the other fields to avoid performance issues.
This causes issues as, when computing data context (e.g. during `onChange`), we assume that all fields in data are available in config:
```
_computeDataContext() {
...
const data = toRaw(this.data);
for (const fieldName in data) {
const value = data[fieldName];
const field = this.fields[fieldName]; // field == undefined
if (field.relatedPropertyField) { // traceback
continue;
}
...
}
```
## Steps to reproduce
- Create a product "TEST"
- Create a BoM For product "TEST", with a new product "TEST Component".
- Add 1 Operation OP1 (keep default value), set a description
- Add 1 step to OP1, with type "Register Production"
- Create MO for "TEST", Confirm, Plan,
- Start operation OP1
- On ShopFloor, go to MO, select workcenter, open step
- Update quantity: Error
## Solution
We make a way for manually fetched fields (most probably, all HTML fields which can contain base64 images) and add it to the fields to avoid them being undefined and causing tracebacks.
## References
opw-4103712
--
I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr)Fixed a bug where sales and purchase receipts were not being included in Spanish VAT Record books reports, causing the system to crash when generating these reports. Receipts are now treated the same as invoices, ensuring complete and accurate VAT reporting for Spanish companies.
Original PR description
Currently, receipts are not take into account when generating the VAT Record books ### Steps to reproduce * install `l10n_es_reports` * switch to a Spanish company * enable sales (or purchase) receipts in the settings * create and confirm a sales receipt * open the generic tax report * select the dates for the receipt. * attempt to generate the VAT Record books You will be met with a traceback. ### Fix Include receipts and treat them as invoices. (confirmed with JCO) opw-4053187 Comunity PR: odoo/odoo#175002
This update fixes a bug in the Knowledge module where rapidly clicking to expand articles in the sidebar could cause errors and display duplicate articles. The fix prevents multiple simultaneous requests from loading the same child articles, ensuring a smoother and more reliable user experience when navigating the article hierarchy.
Original PR description
Purpose: ------- Currently, clicking several times quickly on the caret to unfold an article in the sidebar may throw an error and show the child articles several times in the sidebar. This commit fixes the issue by preventing to make a new request to load the child articles if one has already been made. Task-4099133
Fixed an issue that prevented users from signing field service reports when no worksheet template was configured. Now users can sign and send reports as long as they contain products and timesheets, making the worksheet template optional rather than required.
Original PR description
### Steps to Reproduce: - Create a field service task > switch the worksheet template to false > add products and timesheets > sign report > error because there is no worksheet template set. ### After this PR: - Allow signing the report when there is no worksheet template, it will be possible to sign and send the report as long as there is content to populate the report with ( products and timesheets). task-3974170