Daily updates from Odoo
Thursday, February 1, 2024
18 changes · master
Enhancements to existing features
Warehouse teams can now decide whether barcode users may add unreserved products during picking operations. Batch picking can also group similar product lines together, helping pickers work faster when handling batches for the same destination.
Original PR description
This PR adds two fields on `stock.picking.type`: - `barcode_allow_extra_product`: True by default, when it's disabled it prevents to add unreserved product while processing an operation in the Barcode App; - `group_lines_by_product`: False by default, when active batch pickings will group move lines if they have the same product (and source/destination in case multi-locations is enabled), like we already do for tracked product. Task-3650361
Smart scheduling now prioritizes tasks that have deadlines and schedules earlier-deadline tasks first. This helps teams focus on time-sensitive work and creates a more practical schedule without relying on project grouping details.
Original PR description
When smart scheduling, prioritize tasks with a deadline over no deadline, then tasks with a shorter deadline over longer ones. Don't group by project (not possible anymore + not very useful) to get the tz, calendar and company. Rather, take the one of the user, or the project you're in the context of, or the env. task-3349377
The planning calendar now shows more complete information on employee schedule entries, including project, sales order, sales line, and allocated hours where relevant. This makes the calendar easier to read and helps managers understand planned work without opening each entry.
Original PR description
Before this commit: -in title sale line name was showing but sale order name was not -if sale line id and project both available then only sale line show and project was not showing -after time event allocated hours was not showing Imp after this commit: -improved the _planning_get method to enhance the display of employee slots in the calendar view. improved event title by incorporating project and sale information -displaying allocated hours alongside event times in the calendar -created dynamic elements to display allocated hours within event time entries. -these changes aim to improve the overall user experience and readability of the calendar view while providing valuable information task-3502106
A new automated check verifies that document details, such as the document name and customer, are correctly carried over when related tasks are created. This helps reduce the risk of task records missing important context for project teams.
Original PR description
This commit will add a test to check that the name and the partner of the document is propagated to its tasks on creation. task-3231698
Financial reports now format values only after the final visible lines are known, avoiding unnecessary work on large reports and improving load times. Integer rounding is also available more consistently across standard and custom dynamic reports, making report presentation easier to control.
Original PR description
[IMP] account_reports: Delayed formatting of values When displaying a report, all the values need to be formatted in order to display the right number of decimal places, currency symbols, ... So far,…
[IMP] account_reports: Delayed formatting of values
When displaying a report, all the values need to be formatted in order to display the right number of decimal places, currency symbols, ...
So far, this was done line by line, before prefix groups were possibly applied. On very big reports needing to be trimmed by a prefix group setup, this was a bit stupid, since we formatted all the values, then decided whether to show them or not (then replacing them with prefix lines). In extreme cases (a few thousands of lines), this could even end up with the report taking entire seconds to just format values uselessly.
This commit gets rid of this behavior, and instead does the formatting after generating the lines, when we're sure they need to be displayed.
--------------------------------
[IMP] {account,l10n_fr,l10n_nl}_reports: generalize integer rounding to dynamic lines
The integer rounding feature was only available on reports computed from expressions so far, not on custom reports relying on dynamic lines. This was due to the fact this feature had to be introduced in stable, and further refactoring was needed in order to make it work for real.
Now that the formatting of the values has been delayed for all lines (static and dynamic) to the end of the _get_lines, we can add support for integer rounding after the generation of dynamic lines. Since the feature is now available on every report, we also make the integer rounding feature a "real" option, with a field controlling it on the report, and a proper _init_options function.
---------------------------------
Task 3059062Planning shifts are changed to represent the exact working periods rather than broad multi-day blocks that are later adjusted against schedules. This makes planning clearer and overlap checks more reliable, with a new split option to turn long shifts into schedule-based working segments.
Original PR description
Currently, it is possible to create a shift for, say, a whole week. When your shift expands from su 00:00 to sa 23:59, we find its intersection with your schedule and deduce the allocated time.…
Currently, it is possible to create a shift for, say, a whole week. When your shift expands from su 00:00 to sa 23:59, we find its intersection with your schedule and deduce the allocated time. Typically, 40h. In my opinion, a planning app should be used to know exactly when you will be working on what. So, in an overall functional perspective, it doesn't make a lot of sense to have a 168h long shift when you work 40h a week. Now, from a technical perspective, I also think the current state complexifies the code. Say that you want to check if 2 shifts are overlapping (which, obviously, is one of the main questions you ask yourself when planning) -for now, let's forget about `allocated_percentage`. In theory, it should be trivial. However, when the start/end to consider is in fact the start/end of the work interval that is inside the shift (let alone the lunch break), what could have required 1 LOC now requires to search in other tables, asking again, essentially, "when is the resource actually working?". And if you have to do it in a SQL query (see `_compute_overlap_slot_count`), well you just don't because it is too complex, and you end up with an uncorrect result. The same question is asked and answered not very elegantly when trying to assign shifts automatically (see `auto_plan_ids`). My sense is that we should keep it simple and stupid: `allocated_hours = (end_datetime-start_datetime) * allocated_percentage` Now, in order not to force the user to create 10 shifts for a week where is used to only create one of them, I suggest adding a button "scissors" on the from view that instead of saving one big shift, would fragment it once and for all into the 10 desired shifts, taking into account the resource's schedule. Technical downsides: - (Way) more records in DB. Functional downsides: - I think Odoo consultants are used to creating, say, 3 one-week shifts whose sum of percentages is 100%. With this commit, their gantt view will be clogged with 6 shifts per day. But again, my point is: it doesn't sound like the proper way to use a planning app. - If you have a one week shift, and you fall sick on tuesday, we now have to reassign all the following shft, rather than splitting it and reassigning the 2nd part. task-?
Resolved issues and error corrections
Sample data styling is now applied more consistently in cohort and Gantt-style planning views. This prevents visual styling from affecting unrelated buttons and makes empty or sample screens clearer for users.
Original PR description
This commit corrects how the sample data styling is applied to the cohort view by removing a duplicate rule and make it so that the styling only concerns the table and not the view buttons. related to https://github.com/odoo/odoo/pull/148138 task-3650135
Website cards such as appointment or event cards can no longer be edited directly by visitors or editors when they should be locked. This prevents unintended changes to card content and keeps published website pages more stable.
Original PR description
Commit fixes the issue that allows people to write on cards (event card, appointment cards, etc) The class `o_editable` is automatically added to the card styles. In order to fix this I decided to add `o_not_editable` to the card styles, so that it prevents adding `o_editable`. task-3481761
Miscellaneous changes
This commit renames the l10n_dk_edi module name to avoid naming confusion between this module and the other DK edi modules. Forward-Port-Of: odoo/enterprise#55441
Original PR description
This commit renames the l10n_dk_edi module name to avoid naming confusion between this module and the other DK edi modules. Forward-Port-Of: odoo/enterprise#55441
Steps to reproduce: - first install bridge module 'project_account_budget' - open any project and go to project updates - in right side panel you see 'Add Budget' button - add some budget plan and switch to mobile Issues: - heading of table are not vertically centered Solution: - Add style to vertically align center of heading Task: 3633405 Forward-Port-Of: odoo/enterprise#55460 Forward-Port-Of: odoo/enterprise#52525
Original PR description
Steps to reproduce: - first install bridge module 'project_account_budget' - open any project and go to project updates - in right side panel you see 'Add Budget' button - add some budget plan and switch to mobile Issues: - heading of table are not vertically centered Solution: - Add style to vertically align center of heading Task: 3633405 Forward-Port-Of: odoo/enterprise#55460 Forward-Port-Of: odoo/enterprise#52525
Issue: ====== When having a product with duration variant and they have different temporal units, it will only display the temporal unit of the first selected variant in ecommerce product page. Steps to reproduce the issue: ============================== - Create a recurring product , add duration variant - Add pricing for each variant using different periods - Go to the product page in website and change the current variant , the temporal unit doesn't change. Origin of the issue: =
Original PR description
Issue: ====== When having a product with duration variant and they have different temporal units, it will only display the temporal unit of the first selected variant in ecommerce product page. Steps to reproduce the issue: ============================== - Create a recurring product , add duration variant - Add pricing for each variant using different periods - Go to the product page in website and change the current variant , the temporal unit doesn't change. Origin of the issue: ==================== It seems that the current code isn't reachable , and the function isn't updated. While debugging , this override of the function is never called but the website_sale_stock one is called. Solution: ========= I copied the same format of code done in website_sale_stock/static/src/js/variant_mixin.js and it solved the issue. opw-3618345 Forward-Port-Of: odoo/enterprise#52154
In the tour, we navigate from the registration form and then go back to it. Steps are done fast and the new registration form does not manage to be loaded (and/or old form is not unmounted) by the time the registration fields are filled from the tour steps. As a result registration form is not properly filled and final 'Check in' button fails. To fix this, we add step_delay when running the tour. Forward-Port-Of: odoo/enterprise#55346
Original PR description
In the tour, we navigate from the registration form and then go back to it. Steps are done fast and the new registration form does not manage to be loaded (and/or old form is not unmounted) by the time the registration fields are filled from the tour steps. As a result registration form is not properly filled and final 'Check in' button fails. To fix this, we add step_delay when running the tour. Forward-Port-Of: odoo/enterprise#55346
"l10n_fr_reports.account_financial_report_line_02_0_6_fr_bilan_passif_balance" doesn't exist for databases in 16.0 or higher, made or migrated after this [change](http://tinyurl.com/yrf8hf2r). Also, in some cases, it is being removed by the upgrade script, https://github.com/odoo/upgrade/pull/5358, which was reverted, but some databases were still able to migrate at that time; same problem for those databases as well. TBG-1042 upg-1247501, 1240637, 1203984, 1250604 Forward-Port-Of: o
Original PR description
"l10n_fr_reports.account_financial_report_line_02_0_6_fr_bilan_passif_balance" doesn't exist for databases in 16.0 or higher, made or migrated after this [change](http://tinyurl.com/yrf8hf2r). Also, in some cases, it is being removed by the upgrade script, https://github.com/odoo/upgrade/pull/5358, which was reverted, but some databases were still able to migrate at that time; same problem for those databases as well. TBG-1042 upg-1247501, 1240637, 1203984, 1250604 Forward-Port-Of: odoo/enterprise#55397
This commit resolves an issue where loading table orders would fail due to a refactor (commit: https://github.com/odoo/odoo/commit/01b3a2e4c24fe24bb7b8bb74fc6d2e2edaa96e87). The "l10n_de_fiskaly_time_start" field was correctly added in the 'export_for_ui' method. opw-3706454 Forward-Port-Of: odoo/enterprise#55423
Original PR description
This commit resolves an issue where loading table orders would fail due to a refactor (commit: https://github.com/odoo/odoo/commit/01b3a2e4c24fe24bb7b8bb74fc6d2e2edaa96e87). The "l10n_de_fiskaly_time_start" field was correctly added in the 'export_for_ui' method. opw-3706454 Forward-Port-Of: odoo/enterprise#55423
This reverts the commit: https://github.com/odoo/enterprise/commit/b67b9e432f2de936ab6c2c68e23cb8f0b2aca76d Purpose ======= The payroll payment file is rejected on Isabel platfrom due to a bank account that was outside of the European Union, because the BIC wasn't mentioned. The commit was originally made to avoid posting 'NOTPROVIDED' as BIC, which was rejected by some banks. Now, we skip if there is not BIC on the bank https://github.com/odoo/enterprise/blob/17.0/account_sepa/mod
Original PR description
This reverts the commit: https://github.com/odoo/enterprise/commit/b67b9e432f2de936ab6c2c68e23cb8f0b2aca76d Purpose ======= The payroll payment file is rejected on Isabel platfrom due to a bank account that was outside of the European Union, because the BIC wasn't mentioned. The commit was originally made to avoid posting 'NOTPROVIDED' as BIC, which was rejected by some banks. Now, we skip if there is not BIC on the bank https://github.com/odoo/enterprise/blob/17.0/account_sepa/models/account_journal.py#L336 It wasn't like that in the original version of that function; only got fixed recently: https://github.com/odoo/enterprise/commit/3c06ce695b80dec0c336ac2133594d9eaa07e3ba So, we can remove the context key in 16.4+. TaskID: 3710072 Forward-Port-Of: odoo/enterprise#55440
Forward-Port-Of: odoo/enterprise#55340
Original PR description
Forward-Port-Of: odoo/enterprise#55340
999001 and 999002 are no longer used for extraordinary income/expenses. This commit removes them from the domains of the corresponding report. Task ID: 3672294 Forward-Port-Of: odoo/enterprise#55081 Forward-Port-Of: odoo/enterprise#54491
Original PR description
999001 and 999002 are no longer used for extraordinary income/expenses. This commit removes them from the domains of the corresponding report. Task ID: 3672294 Forward-Port-Of: odoo/enterprise#55081 Forward-Port-Of: odoo/enterprise#54491
Before this PR: ----------------------------- - It is possible to add a step to an operation in the tablet view if it already has any steps, but it is not possible if it doesn't have any steps initially. After this PR: ----------------------------- - The issue has been resolved by adding a pop-up button that appears upon clicking for worksheet improvement. - If there are no steps initially assigned, the button will prompt the addition of steps. - If steps are already assigned, i
Original PR description
Before this PR: ----------------------------- - It is possible to add a step to an operation in the tablet view if it already has any steps, but it is not possible if it doesn't have any steps initially. After this PR: ----------------------------- - The issue has been resolved by adding a pop-up button that appears upon clicking for worksheet improvement. - If there are no steps initially assigned, the button will prompt the addition of steps. - If steps are already assigned, it will function as before. task_id : 3551582 Forward-Port-Of: odoo/enterprise#53742 Forward-Port-Of: odoo/enterprise#49703