Daily updates from Odoo
Navigate
Branch
Friday, March 18, 2022
12 changes
Enhancements to existing features
The Barcode App can now recognize GS1 product barcodes when filtering pickings. This makes warehouse searches faster and more reliable for businesses using GS1-standard labels.
Original PR description
In the Barcode App, it's possible to filter on pickings by scanning a product's barcode, but before this commit, it doesn't work with GS1 barcode. Now, it will try to decompose GS1 barcode and then checks if it has a product part on it. If it is the case, the pickings will be filtered. task-2641528
Resolved issues and error corrections
Opening the timesheet pivot view could fail when certain helper content was not available. This fix adds the missing safety check so users can access the pivot view reliably when records are loaded.
Original PR description
When opening the pivot view when records are fetched, the noContentHelper is not present in the view which raises a traceback when trying to call querySelector on its el element which is undefined. 82122c15b42b20d9dcc9b53caa2756941908f07c was indeed missing testing whether this.noContentHelper.el was truthy prior to use it.
The timesheet pivot view now opens correctly after an underlying interface change caused an error. This prevents users from being blocked when analyzing timesheet data in pivot reports.
Original PR description
Prior to this commit: - A traceback was thrown when opening the pivot view in timesheet_grid as it was using a reference to this.el which is no more supported since owl2. After this commit: - The code is mode into the renderer where it can leverage the user of the useRef that is done into PivotRenderer.
Code cleanup and technical improvements
Several automated test files were moved into a standard location for the Approvals, Mail Enterprise, VoIP, and Website Helpdesk Live Chat apps. This is an internal cleanup that helps developers maintain tests more consistently without changing customer-facing behavior.
Original PR description
\* = approvals, voip, website_helpdesk Move tests files into `static/tests`. Task-2759560
Miscellaneous changes
The wages were badly computed because extra time off was never taken into account. TaskId-2786604 Forward-Port-Of: odoo/enterprise#25098
Original PR description
The wages were badly computed because extra time off was never taken into account. TaskId-2786604 Forward-Port-Of: odoo/enterprise#25098
`_clean_records_format_phone` performs a search with leaf: `(field, not in, [False, ''])`. This could lead to a lot of records being fetched from db. If the target model of data_cleaning_model has lots of stored fields, this could overfill the `field_cache` up until triggering a MemoryError. E.g. in a customer DB, the table was res_partner, the records list contained 550k partners and there were 86 fields in `field_pre`. This raised a MemoryError when updating the cache. To avoid th
Original PR description
`_clean_records_format_phone` performs a search with leaf: `(field, not in, [False, ''])`. This could lead to a lot of records being fetched from db. If the target model of data_cleaning_model has lots of stored fields, this could overfill the `field_cache` up until triggering a MemoryError. E.g. in a customer DB, the table was res_partner, the records list contained 550k partners and there were 86 fields in `field_pre`. This raised a MemoryError when updating the cache. To avoid that, add prefetch_fields=False before looping through records. Since format phone returns a dict with only `record.id`, we don't need to prefetch all the record fields as they won't be used after the function returns. Forward-Port-Of: odoo/enterprise#24909
Step to reproduce: - Create task - Add a Planned Date - Create a subtask - Try to access forecast Current behaviour: - Traceback We use `min` on a list that may contain `False` Behaviour after PR: - Filter False value before and check if there is at least one non-False value in the lot else fallback on default action opw-2792373 Forward-Port-Of: odoo/enterprise#25350
Original PR description
Step to reproduce: - Create task - Add a Planned Date - Create a subtask - Try to access forecast Current behaviour: - Traceback We use `min` on a list that may contain `False` Behaviour after PR: - Filter False value before and check if there is at least one non-False value in the lot else fallback on default action opw-2792373 Forward-Port-Of: odoo/enterprise#25350
Steps : Install subcription and contact. Create a contact A, add an invoice address (contact B). Create a quotation with a monthly subscription and confirm. On the new subscription S, make sure the subscription template creates draft invoices. Archive contact B or delete the field parent_id (contact A). Back on S, create invoice. Issue : See generated invoice's partner is contact B. Cause : partner_invoice_id and partner_shipping_id only update when we change partner_id on the sub
Original PR description
Steps : Install subcription and contact. Create a contact A, add an invoice address (contact B). Create a quotation with a monthly subscription and confirm. On the new subscription S, make sure the subscription template creates draft invoices. Archive contact B or delete the field parent_id (contact A). Back on S, create invoice. Issue : See generated invoice's partner is contact B. Cause : partner_invoice_id and partner_shipping_id only update when we change partner_id on the subscription. Fix : When changed on the partner, change it in the subscription opw-2760139 Forward-Port-Of: odoo/enterprise#25089 Forward-Port-Of: odoo/enterprise#24701
Forward-Port-Of: odoo/enterprise#25108
Original PR description
Forward-Port-Of: odoo/enterprise#25108
Since v15, default avatars are generated based on the user name's initials using SVG. Sadly, mobile platforms (Android & iOS) doesn't support SVG in native image UI components (ie. ImageView on Android). A first fix was made (cf. odoo/mobile@80a4d38538aab7a20030943ae7a3ae5924da7cc0) to avoid a crash and fallback to a default icon. This commit fixes it further by converting the avatar's image to PNG before sending it to the native `updateAccount()`. This method is called at the init
Original PR description
Since v15, default avatars are generated based on the user name's initials using SVG. Sadly, mobile platforms (Android & iOS) doesn't support SVG in native image UI components (ie. ImageView on Android). A first fix was made (cf. odoo/mobile@80a4d38538aab7a20030943ae7a3ae5924da7cc0) to avoid a crash and fallback to a default icon. This commit fixes it further by converting the avatar's image to PNG before sending it to the native `updateAccount()`. This method is called at the initial Session load (aka. load of `/web`). Note: only the `updateAccount` call can be fixed this way; the initial avatar fetch when registering an account in the mobile app is a independent HTTP request. task-2766273 Forward-Port-Of: odoo/enterprise#25053
In the Android mobile app, in the UserMenu, clicking on the "Add to Home Screen" results into a crash as the native code receives a full data URL for the icon instead of only the base64 encoded image. This commit fixes it by properly trimming the prefix to keep only the base64 encoded image. Also, by creating the related test, another issue was detected when a notification is triggered when the "Add to Home Screen" button is clicked on the HomeMenu. task-2766273 Forward-Port-Of: o
Original PR description
In the Android mobile app, in the UserMenu, clicking on the "Add to Home Screen" results into a crash as the native code receives a full data URL for the icon instead of only the base64 encoded image. This commit fixes it by properly trimming the prefix to keep only the base64 encoded image. Also, by creating the related test, another issue was detected when a notification is triggered when the "Add to Home Screen" button is clicked on the HomeMenu. task-2766273 Forward-Port-Of: odoo/enterprise#25137
latam 684 / adhoc 46826 --- * 4946 Error: If the users try to validate a Debit Note Mipyme (202) they receive the 4946 error that saids that if we create a DN or CN of type Mipyme we need to inform optionals with the cancellation information. We were informing optionals only for invoices types 201 206. We have updated the logic to inform optionals also for the DN and CN. * 4886 Error: For Fiscal Bound Wenbservice if we were sending debit/credit notes it is required to send the related or
Original PR description
latam 684 / adhoc 46826 --- * 4946 Error: If the users try to validate a Debit Note Mipyme (202) they receive the 4946 error that saids that if we create a DN or CN of type Mipyme we need to inform optionals with the cancellation information. We were informing optionals only for invoices types 201 206. We have updated the logic to inform optionals also for the DN and CN. * 4886 Error: For Fiscal Bound Wenbservice if we were sending debit/credit notes it is required to send the related original invoice info. We have adapted the WSFE method in order to return the related original document when this one exists. Forward-Port-Of: odoo/enterprise#22726