Daily updates from Odoo
Navigate
Branch
Thursday, July 7, 2022
17 changes
Enhancements to existing features
Appointment availability slots can now be configured to end exactly at midnight, instead of requiring a workaround ending at 23:59. This makes scheduling clearer and more accurate for businesses offering late-day or full-day availability.
Original PR description
Previously, midnight couldn't be set as end of a slot, 23:59 was used instead. With this change, 00:00 can be used as 00:00 of the next day. Technical note: - method AppointmentSlot._end_hour_24_get has been added to facilitate checks and computation. We haven't converted it as a computed field because it is merely used in compute and checks which would have required to add not straightforward dependencies to those methods (end_hour_24). Task-2810493
Approval request product lines now automatically use the selected product's description and unit of measure. This makes integrations and automated request creation easier, especially when units of measure are not actively managed in the database.
Original PR description
Convert the onchange on `product_id` to compute fields This allows to create a `approval.product.line` record without the need to specify the description or uom during the creation nor calling the onchange method. The description and uom defaults from the product. This way, if the database is not configured to use multi uom, the users do not have the specify the UOM to use. For instance during an XMLRPC call to create an approval request with a product line.
Resolved issues and error corrections
This fixes a test setup issue by setting an employee's creation date correctly when the employee is created. It helps ensure project scheduling tests use the employee's own working schedule instead of incorrectly falling back to the company schedule.
Original PR description
Before this commit, the `create_date` field of the employee used in the unit test is updated via a sql query after creating that employee. By doing that, the cache is not invalidated and so the `create_date` still remains the current date and so the schedule will not based to the working schedule of that employee since it will be considered as not working to the company before the current date, and so the working schedule of the company will be used instead. This commit updates the `create_date` directly during the creation of that employee and avoid doing a sql query for that. By doing this, the employee will be considered as working on the company since the `create_date` is before the dates to plan the tasks and so the working schedule will not be used.
This update makes automated checks for Field Service task analysis more reliable when values include extra decimal places. It reduces false test failures caused by tiny rounding differences, helping maintain confidence in reporting accuracy.
Original PR description
Before this commit, the test to compare the values in Fsm Task Analysis with the values stored in the task sometimes fails because a float value could have more than 2 decimals and so it will consider as is not equal to the other value. This commit replaces the `assertDict` by `assertEqual` for each key value in the both dictionary and in that assertEqual the `float_compare` is used to compare the both value until the 2 first decimals. X-original-commit: 1245fe41670f7
This fix ensures Studio applies the correct styling to its current kanban views and report screens. Users opening Studio from kanban views or reports should see a properly arranged layout instead of visual inconsistencies.
Original PR description
https://github.com/odoo/odoo/pull/95387
Code cleanup and technical improvements
Odoo Enterprise was updated to use a newer Bootstrap interface framework, modernizing the look, behavior, and browser support across many accounting and related screens. This matters because users may see small visual changes in forms, buttons, badges, tables, dropdowns, and reports, while the system benefits from reduced legacy dependencies and better accessibility-oriented contrast handling.
Original PR description
Migrate Bootstrap to version 5.1.3 some highlights of BS5 changes: - Browser support: Internet Explorer is definitely gone (Goodbye! We won't miss you) ; not a huge change on the backend as we didn't…
Migrate Bootstrap to version 5.1.3
some highlights of BS5 changes:
- Browser support: Internet Explorer is definitely gone (Goodbye! We won't miss you) ; not a huge change on the backend as we didn't supported it anymore anyway.
- Bootstrap's Javascript components doesn't use jQuery anymore! A compatibility layer is present but with some quirks, so avoid to use it if possible ; less jQuery is less overhead!
- The color contrast system in BS5 relies directly on WCAG 2.0 contrast algorithm (https://www.w3.org/TR/WCAG20-TECHS/G18.html). Some visual elements (like texts/buttons/...) may have a slightly different contrast than before.
- Background color classes ('bg-') only set the background color and don't change the foreground (aka. text) color anymore. We backported the '.text-bg-' from Bootstrap 5.2 to restore the previous behavior ; or use separate background ('.bg-') and foreground ('.text-') depending on your usecase.
- Media Breakpoint's usage has changed
- More and more CSS utility classes are introduced: use them in your templates instead of adding more custom CSS rules.
- Bootstrap still provides a quite powerful grid system, but please use it as intended by the framework (I'm looking at you '.col' without its parent '.row'). Also while keeping the same API, it was internally changed ; the main issue that you can encounter is that columns no longer apply 'position: relative', which could be solved by adding the '.position-relative' class when needed.
- BS5 doesn't allow to use multiple components on the same element (ie. adding a tooltip on a dropdown). It generates this kind of error: "Bootstrap doesn't allow more than one instance per element. Bound instance: bs.tooltip" (cf. https://github.com/twbs/bootstrap/issues/33940#issuecomment-838454777).
- Badge usage has changed a bit: '.badge' still exist but is now extended using utility classes (text and background colors, border-radius for pills) instead of specific '.badge-*' classes.
- '.input-group-{append,prepend}' are gone! You can now just add buttons and '.input-group-text' as direct children of the '.input-group'.
- Popover/alert components' close button use the new class '.btn-close'.
- Dropdown: the '.show' class is not added anymore to the parent group of dropdown ; some CSS selectors may still need some love.
- All data attributes of BS5 are now prefixed by 'bs-' (ie. 'data-toggle' is now 'data-bs-toggle').
Bootstrap documentation
https://getbootstrap.com/docs/5.1/migration
Task ID: 2766483Miscellaneous changes
The issue was that the patch of `_process_fvg` must be active when calling the `__init__` function of `Form` as `_process_fvg` is called during the initialization. Before this commit, the patch was declared, but not active when creating the `Form` instance. Forward-Port-Of: odoo/enterprise#29186 Forward-Port-Of: odoo/enterprise#29143
Original PR description
The issue was that the patch of `_process_fvg` must be active when calling the `__init__` function of `Form` as `_process_fvg` is called during the initialization. Before this commit, the patch was declared, but not active when creating the `Form` instance. Forward-Port-Of: odoo/enterprise#29186 Forward-Port-Of: odoo/enterprise#29143
Due to an oversight, the "Save my payment details" checkbox was shown on the inline payment form of SEPA Direct Debit acquirers, which should never happen because the transaction is *always* tokenized with those. With this commit, the `_is_tokenization_required` method is slightly refactored to read the provider from the current `payment.acquirer` record rather than from the kwargs. This conveniently fixes the issue and prevent it from happening again elsewhere. See also: - https://g
Original PR description
Due to an oversight, the "Save my payment details" checkbox was shown on the inline payment form of SEPA Direct Debit acquirers, which should never happen because the transaction is *always* tokenized with those. With this commit, the `_is_tokenization_required` method is slightly refactored to read the provider from the current `payment.acquirer` record rather than from the kwargs. This conveniently fixes the issue and prevent it from happening again elsewhere. See also: - https://github.com/odoo/odoo/pull/95457 Forward-Port-Of: odoo/enterprise#29201
Downloading odoo spreadsheet in list view gives unusable binary content instead of .xlsx file as in kanban view. It happens because spreadsheet is detected by value of `handler` field, which is not available in tree view. Fix it by adding invisible field `handler` to the spreadsheet tree view. STEPS: * Create Odoo Spreadsheet * Switch to list view, select the file and click download button opw-2888594 Forward-Port-Of: odoo/enterprise#28928
Original PR description
Downloading odoo spreadsheet in list view gives unusable binary content instead of .xlsx file as in kanban view. It happens because spreadsheet is detected by value of `handler` field, which is not available in tree view. Fix it by adding invisible field `handler` to the spreadsheet tree view. STEPS: * Create Odoo Spreadsheet * Switch to list view, select the file and click download button opw-2888594 Forward-Port-Of: odoo/enterprise#28928
Before this fix, no filter (date or journal) was taken into account when exporting the rapport in xlsx format. The aml “_query_get()” method checks the context, not the options dict. When exporting the xlsx, the context did miss the filters info. Ticket: 2867359 Forward-Port-Of: odoo/enterprise#29109
Original PR description
Before this fix, no filter (date or journal) was taken into account when exporting the rapport in xlsx format. The aml “_query_get()” method checks the context, not the options dict. When exporting the xlsx, the context did miss the filters info. Ticket: 2867359 Forward-Port-Of: odoo/enterprise#29109
Adapt for changes in `account` on community. Related to https://github.com/odoo/odoo/pull/94852 Forward-Port-Of: odoo/enterprise#29202 Forward-Port-Of: odoo/enterprise#28957
Original PR description
Adapt for changes in `account` on community. Related to https://github.com/odoo/odoo/pull/94852 Forward-Port-Of: odoo/enterprise#29202 Forward-Port-Of: odoo/enterprise#28957
The new development for l10n_it_edi reverse charge checks breaks down when the partner comes from the US and the invoice mixes services and goods. Task: https://www.odoo.com/web#id=2823646&model=project.task Community: https://github.com/odoo/odoo/pull/94406 opw-2823646 Forward-Port-Of: odoo/enterprise#29128 Forward-Port-Of: odoo/enterprise#28798
Original PR description
The new development for l10n_it_edi reverse charge checks breaks down when the partner comes from the US and the invoice mixes services and goods. Task: https://www.odoo.com/web#id=2823646&model=project.task Community: https://github.com/odoo/odoo/pull/94406 opw-2823646 Forward-Port-Of: odoo/enterprise#29128 Forward-Port-Of: odoo/enterprise#28798
Steps to reproduce: - use demo data - Install sign - Log in as admin and send a document to sign to Marc Demo and check the checkbox that allow refusal - Log in as Marc Demo and refuse to sign the document - Enter a reason and refuse - Log back into admin and check the detail of the sign request - The reason is 'None' Issue: The reason for refusal is not recorded for internal sign request Cause: A jquery selector is applied to 'this' limiting the scope to the div with cla
Original PR description
Steps to reproduce: - use demo data - Install sign - Log in as admin and send a document to sign to Marc Demo and check the checkbox that allow refusal - Log in as Marc Demo and refuse to sign the document - Enter a reason and refuse - Log back into admin and check the detail of the sign request - The reason is 'None' Issue: The reason for refusal is not recorded for internal sign request Cause: A jquery selector is applied to 'this' limiting the scope to the div with class o_action. Meanwhile the textarea where the reason is written is not in that scope. Solution: Remove the this before the jquery selector in order to be able to search the whole page for that class. opw-2894231 Forward-Port-Of: odoo/enterprise#28943
Before this commit, all tests in the TestFsmFlowSale class are launched during the installation of the module. However, one of those tests creates some invoices and so a journal has to be defined in the company. This commit moves the others tests in new class to continue to launch thoses during the installation of the module and the change the tests execution of TestFsmFlowSale (containing only the `test_fsm_flow` method in which an invoice is created) to launch this test after installi
Original PR description
Before this commit, all tests in the TestFsmFlowSale class are launched during the installation of the module. However, one of those tests creates some invoices and so a journal has to be defined in the company. This commit moves the others tests in new class to continue to launch thoses during the installation of the module and the change the tests execution of TestFsmFlowSale (containing only the `test_fsm_flow` method in which an invoice is created) to launch this test after installing all modules. Forward-Port-Of: odoo/enterprise#29154
We used to check whether the generic line id of a grouped by partner line was included in a set of partner ids to know whether or not to inject additional lines into the BOE. This was wrong, as generic line ids and model ids are different concepts ('-res.partner-12' != 12). Because of that, partners who had already received a value because of the content of the report could receive a second line if they were required in the file (for example if a line had been manually added to the mod 347 BO
Original PR description
We used to check whether the generic line id of a grouped by partner line was included in a set of partner ids to know whether or not to inject additional lines into the BOE. This was wrong, as generic line ids and model ids are different concepts ('-res.partner-12' != 12).
Because of that, partners who had already received a value because of the content of the report could receive a second line if they were required in the file (for example if a line had been manually added to the mod 347 BOE wizard for them). This was wrong.
Forward-Port-Of: odoo/enterprise#29055The payroll tour was not properly deleted. By importing the payroll module, we ensure that the tour is properly loaded before the code gets executed. Forward-Port-Of: odoo/enterprise#29191
Original PR description
The payroll tour was not properly deleted. By importing the payroll module, we ensure that the tour is properly loaded before the code gets executed. Forward-Port-Of: odoo/enterprise#29191
The xmlid of the main menu for the Data Cleaning apps was changed in odoo/odoo#89312 but not adapted in the `_send_notification()` code. Forward-Port-Of: odoo/enterprise#29181
Original PR description
The xmlid of the main menu for the Data Cleaning apps was changed in odoo/odoo#89312 but not adapted in the `_send_notification()` code. Forward-Port-Of: odoo/enterprise#29181