Tuesday, January 23, 2024
29 changes
2 changes
New functionality added to Odoo
Adds a balance sheet report for the Nigerian accounting localization, helping businesses in Nigeria view financial position information in a localized format. This supports local reporting needs as part of the new Nigerian localization package.
Original PR description
This commit adds a balance sheet report for a new Nigerian localization. task-3607459
Enhancements to existing features
WhatsApp template editors can now insert the next available variable with a button instead of typing it manually. This makes template setup faster and helps prevent mistakes, with a warning shown when the 10-variable limit is reached.
Original PR description
Add a variable button on the whatsapp template body to facilitate the addition of new variables without the need for the user to enter them manually. Clicking on the button will automatically add the next variable at the cursor position or at the end of the body if there's no cursor. A popover will be displayed in case the maximum of 10 variables are present in the template. Task-3628187
23 changes
New functionality added to Odoo
This update adds support for Lithuanian companies to generate and export their Intrastat reports directly to XML format for submission to Lithuania's official intrastat reporting system. The feature includes region code configuration and settings management, enabling Lithuanian businesses to streamline their intrastat compliance reporting.
Original PR description
This commit add the Lithuanian intrastat report. This comes with the possibility to export that report into an XML file and also adds the country region code. task-3248669 Forward-Port-Of: odoo/enterprise#54655 Forward-Port-Of: odoo/enterprise#46488
Odoo now supports the Bulgarian National Bank (BNB) as a currency exchange rate provider, enabling automatic updates of exchange rates for over 30 currencies against the Bulgarian Lev (BGN). This gives businesses in Bulgaria and those transacting in BGN access to official, reliable exchange rates directly from the national bank.
Original PR description
Objective --------- Add the Bulgarian National Bank (BNB) as a Currency Provider in Odoo. Solution --------- Rates are given against BGN in an XML file of format: ``` <ROWSET> <ROW> <GOLD>1</GOLD>…
Objective
---------
Add the Bulgarian National Bank (BNB) as a Currency Provider in Odoo.
Solution
---------
Rates are given against BGN in an XML file of format:
```
<ROWSET>
<ROW>
<GOLD>1</GOLD>
<NAME_>Currency</NAME_>
<CODE>Code</CODE>
<RATIO>Per unit of currency/gold</RATIO>
<REVERSERATE>Reverse rate for 1 BGN</REVERSERATE>
<RATE>Levs (BGN)</RATE>
<CURR_DATE>Date</CURR_DATE>
<F_STAR>0</F_STAR>
</ROW>
</ROWSET>
```
Source: https://www.bnb.bg/AboutUs/AUFAQ/Contr_Exchange_Rates_FAQ?toLang=_EN
Currencies returned on the 8th of January 2024:
AUD, BRL, CAD, CHF, CNY, CZK, DKK, GBP, HKD, HUF, IDR, ILS, INR,
ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, RUB*, SEK, SGD,
THB, TRY, USD, ZAR, XAU
* Due to the situation on the international financial markets, the Bulgarian National Bank (BNB) is not in a position to set a reference exchange rate for the Bulgarian Lev against the Russian Rouble that is representative of market conditions.
task-3672394
Forward-Port-Of: odoo/enterprise#54825
Forward-Port-Of: odoo/enterprise#53914Enhancements to existing features
This update improves the performance of the website forum module by optimizing how the system retrieves the most recent post for each forum. Previously, the system made a separate database request for each forum, which was slow when viewing multiple forums. Now these requests are batched together into a single operation, making the forum pages load faster.
Original PR description
Computation of the last post shouldn't be done with a db request for each forum but can be batched. Technical note: As it is likely that `post_ids` is not yet fetched when we're accessing `last_post_id` we chose not to early return if no forum in `self` included posts already. Version choice: We chose this version to merge this as it is the one where forum was taken over, and _read_group refactored. A test for this computation is also added. Task-3685002 Forward-Port-Of: odoo/odoo#149376
Resolved issues and error corrections
This update removes outdated export settings from the account reports module and replaces them with the current system. The change ensures that PDF exports and file exports display the correct financial data, particularly when rounding rules are applied. This fix improves the accuracy and consistency of exported financial reports.
Original PR description
This context key isn't used anymore. It has been replaced by options['export_mode']. The former calls with the context key corresponded to the generation of pdf exports, and are all converted to 'print', except the one in integer rounding management, for which we rather wish to use the 'file' value. Indeed, when integer rounding is enabled, the pdf must keep the same content as what was shown in the UI, while a file export will always want the legal standard (hence, rounding) to be applied.
This update fixes a bug in the Documents module where replacing documents was causing incorrect data tracking. The system was using the wrong identifier to check if a document already exists, which led to inconsistencies between what the application displayed and what was actually stored in the database. The fix ensures documents are properly tracked when they are replaced or updated.
Original PR description
**[FIX] documents: validate document existence using `datapoint_id`** Issue: - The existing condition inside the `insert()` method incorrectly identifies the incoming new record (data) as an already…
**[FIX] documents: validate document existence using `datapoint_id`** Issue: - The existing condition inside the `insert()` method incorrectly identifies the incoming new record (data) as an already existing record inside `this.store.Document.records` Reason: - It uses `id` to check for a new document, but the `id` remains the same in the following cases. - In case of replacing a document with a new document. - Replacing the requested document with the new document. - As a result, the records inside the `this.store.Document` remains inconsistent with the records present in the database. After this commit: - We use the `id` of the record (ex- `datapoint_32`) to check for the presence of a new document. link to the issue being tested by the test case in this commit (also the related community PR - https://github.com/odoo/odoo/pull/150257) Task-3489455 Forward-Port-Of: odoo/enterprise#54679 Forward-Port-Of: odoo/enterprise#50098 --- - The test case in this forward port PR is different from its predecessor in the [v16.3 PR](https://github.com/odoo/enterprise/pull/50098) because - It was based on checking the resultant UI changes caused by the call of the `onGlobalClick` method (inside the `DocumentsKanbanRenderer`). - But, the test case here directly checks if the method is called, and does not rely on the UI changes. - Reason to change the test case - - **The functional issue of the inspector losing the focus (as mentioned in https://github.com/odoo/odoo/pull/142807) is not observed for versions 16.4 and above.** - Please take a look at the related community PR for more information.
When a subscription contract is reopened, the system now correctly removes the most recent churn record instead of removing an older one. This ensures accurate tracking of when contracts are cancelled and reactivated, which is important for subscription management and reporting.
Original PR description
Before this commit, when a contract was reopened, the churn log was removed but it was not the last one. After this commit, we make sure to delete the last churn log after sorting by date. taskid: 3651477 Forward-Port-Of: odoo/enterprise#54681 Forward-Port-Of: odoo/enterprise#54056
This fix resolves an access control issue in the Belgian HR salary module where only HR administrators could generate salary offers from contracts. The change now allows appropriate users to generate offers, improving workflow efficiency and reducing unnecessary restrictions on HR operations.
Original PR description
…fers Only hr admins are able to generate offers from contracts, which should not be the case
This fix resolves a problem where users couldn't delete an IoT box device if a POS printer was linked to it. Previously, attempting to delete the IoT box would result in a validation error. Now users can delete IoT boxes directly without having to manually remove linked printers first, improving the user experience when managing POS hardware devices.
Original PR description
Current behavior: You couldn't delete an iot_box if a pos_printer was linked to it. You always get a validation error saying that "Proxy IP cannot be empty" To fix this we are forced to delete the pos_printer first and then the iot_box. Steps to reproduce: - Install pos_iot - Activate preparation printer in POS - Create a printer and link it to an iot_box device - Try to delete the iot_box opw-3597370 Forward-Port-Of: odoo/enterprise#52953
This fix prevents the system from crashing when sending follow-up reports for overdue invoices that are missing a due date. The system now gracefully handles missing dates by filtering them out during the follow-up process, ensuring reports can be sent successfully without errors.
Original PR description
**Current behavior:** Sending a follow-up report to an overdue client with no due date attached will cause a TypeError. --- **Expected behavior:** If no due date is specified in the follow-up report, it will use a fallback date value from elsewhere. --- **Steps to reproduce:** 1. Create an invoice which is passed due 2. In the Follow-up Reports view, delete the due date field value from one of the invoice lines in the report 3. Click 'Follow up' then 'Send & Print' --- **Cause of the issue:** A method _update_next_followup_action_date() tries to update the follow-up date for the next deadline without considering the due date field may be empty. --- **Fix:** Filter the account_move_line objects which do not have legitimate date values from the iteration block where the offending operations take place. --- opw-3666901 Forward-Port-Of: odoo/enterprise#53829
This update corrects a bug where the article edit history was displaying timestamps in universal time instead of the user's local timezone. Now when users restore a previous version of an article, they will see the correct time based on their own timezone, making it easier to identify when changes were made.
Original PR description
**Current behavior before PR:** When a user edits an article and selects the restore button to revert to a previous version, the displayed time is incorrect because it shows universal time instead of the user's timezone. **Desired behavior after PR is merged:** When a user edits an article and utilizes the restore button to revert to a previous version, the timestamp will now reflect the time in the user's current timezone. task-3641579 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix resolves an issue where the Point of Sale system would fail to create invoices when product income accounts were not configured. The system now automatically falls back to using the default journal account from the Point of Sale configuration, ensuring invoices can be created successfully even with incomplete account setup.
Original PR description
Prior to this commit, when the product income account was absent, and the product category income account was also missing, PoS would fail to create an invoice. Now, it correctly utilizes the PoS config journal default account. opw-3615194 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that temporary files created during file uploads are properly closed and released immediately after the upload completes, rather than being held in memory by idle workers. This prevents temporary storage space from being unnecessarily consumed by large uploaded files, reducing the risk of running out of disk space on systems handling infrequent large file uploads.
Original PR description
Currently, when a worker (process/thread) has finished processing a request, it will keep handles on resources held by the werkzeug `Request` object. This includes open filhandles to temporary files,…
Currently, when a worker (process/thread) has finished processing a request, it will keep handles on resources held by the werkzeug `Request` object. This includes open filhandles to temporary files, e.g. those of uploaded files. On platforms supporting `O_TMPFILE`, these files are not visible in the filesystem, but keep using up space in `TMPDIR` until werkzeug finally closes the file handles when the next Request is being handled. In some contexts, e.g. the upgrade platform, it can happen that there are multiple workers that only handle rare requests that upload big files (multiple GiB), kept open after the upload has finished: ```shell lsof -nP | grep -E 'odoo\/tmp.*(deleted)' | grep -vE 'GeoIP' python3 213853 odoo 13u REG 252,3 1064251 926275 /home/odoo/tmp/#926275 (deleted) python3 213853 213865 python3 odoo 13u REG 252,3 1064251 926275 /home/odoo/tmp/#926275 (deleted) ``` This can pose problems, because often the filesystem on `TMPDIR` is not very large and idle workers holding on to large files can increase the chance for ENOSPC. This patch changes the behavior such that the resources held by the werkzeug `Request` object are being closed[^1] after the response has been sent out. This also has the advantage that this work is done at potentially idle time instead of within handling the next request. [^1]: https://werkzeug.palletsprojects.com/en/2.0.x/wrappers/#werkzeug.wrappers.Request.close Forward-Port-Of: odoo/odoo#149904
This fix stops the Odoo service on POS hardware devices before performing system updates. Previously, the service would remain active during updates, which could disrupt the checkout process and make the device unusable. This change ensures smoother and more reliable update operations for point-of-sale terminals.
Original PR description
Actually when we link a DB and the iot need checkout a specific version of Odoo, the service odoo in the iot is still active. This can disrupt the checkout and make the box unusable. So now we stop the odoo service before the checkout. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149825
Users can now properly create new kanban columns by pressing Enter, which was previously broken due to a technical change in the framework. The fix restores the expected behavior where users can either press Enter or click the add button to create a new column.
Original PR description
When creating a new column in kanban view, the user should be able to either hit enter or click the add button. This launched the validation process to add the column. There has been a fix in owl that would force a t-model.trim to be lazy. This was causing problems in this case as the "enter" pressed by the user was detected through the hotkey system. This was causing the change event not to fire, resulting in the behavior of the feature being broken. We fix this by using the t-on-keydown directive instead of the hotkey. We also remove the t-model directive as it is no longer of any use. The trim is done in the validate function. task id 3691208 Forward-Port-Of: odoo/odoo#149939
This fix resolves an issue where clicking on elements within the file preview window was causing the document inspector to lose focus on the selected document. The problem was caused by click events bubbling up and triggering unintended actions. By preventing this event propagation, users can now preview documents without losing their selection in the inspector.
Original PR description
**[FIX] mail: stop the bubbling of various click events** Technical Reason: - The events bound to the specific elements inside the `FileViewer` are propagating/bubbling up and are triggering the…
**[FIX] mail: stop the bubbling of various click events** Technical Reason: - The events bound to the specific elements inside the `FileViewer` are propagating/bubbling up and are triggering the [`onGlobalClick`](https://github.com/odoo/enterprise/blob/eaf40edbbacfc6a8eb9e0137c20e7f94b1f5d723/documents/static/src/views/kanban/documents_kanban_renderer.js#L36-L42) event bound on the [`DocumentsKanbanRenderer`](https://github.com/odoo/enterprise/blob/71dbc617d6fe533c4d0153361f9711bd4c9e4885/documents/static/src/views/kanban/documents_kanban_renderer.xml#L6) After this commit: - Only the events bound to the specific HTMLElements are now triggered. - We successfully prevent the unnecessary call of the `onGlobalClick` method mentioned above. link to the related enterprise PR (contains the test case for this fix)- https://github.com/odoo/enterprise/pull/54752 Task-3489455 Forward-Port-Of: odoo/odoo#150076 Forward-Port-Of: odoo/odoo#142807 --- The issue of the `DocumentsInspector` losing focus on the selected document is not observed in versions saas-16.4 and above because - **Previously (i.e. in versions 16.3 and below),** - The document we click to preview used to get selected, it was then passed to the `DocumentsInspector` as the `selection` prop. - The inspector relied on the [`nbPreviews`](https://github.com/odoo/enterprise/pull/40441/files#diff-2d135414449d55788e2e9449cab08f4d30f006fa009824bb1d17afa00c63d810R19) i.e. `props.selection.length` to evaluate which template to render for the `DocumnetsInspector`. - It is this line --> `this.props.list.selection.forEach(el => el.toggleSelection(false));` inside [`onGlobalClick`](https://github.com/odoo/enterprise/blob/saas-16.3/documents/static/src/views/kanban/documents_kanban_renderer.js#L36-L42) method, which toggles the selection to `false` and now when the inspector appears to lose focus and paints itself with the template when no document is selected. **Now (saas-16.4 and above)** - We use the [`documents`](https://github.com/odoo/enterprise/pull/40441/files#diff-2d135414449d55788e2e9449cab08f4d30f006fa009824bb1d17afa00c63d810R7) prop as a condition to render the inspector. [`documents` prop initiallisation](https://github.com/odoo/enterprise/pull/40441/files#diff-0011f60b4981cbcd7e4c5f6fbee6c682ce7187f8f85d3beb3fac0bb4f07a6c01R101). - The inspector no longer relies on the actual selection of the documents for deciding on which template to render. And hence it doesn't lose focus even if the `onGlobalClick` deselect the selected documents. - Also, the props passed to the inspector are only reset when we close the FileViewer. ref - https://github.com/odoo/enterprise/blob/saas-16.4/documents/static/src/views/hooks.js#L317 PR that introduced the above changes - https://github.com/odoo/enterprise/pull/40441
This fix prevents default taxes from being automatically applied to cut-off entries in the accounting module. Previously, when creating a cut-off entry using an account with default taxes configured, those taxes would be recalculated, which could incorrectly impact tax reports and create confusing auto-balancing lines. Now, cut-off entries are created without these automatic taxes, ensuring cleaner and more accurate accounting records.
Original PR description
When creating a cut-off entry with an account that has a default tax configured on it, we don't want that tax to be computed on the cut-off entry again. Reason is both that we don't want to impact the tax report again with these taxes, and it would also create an auto-balancing line to balance out the computed tax on a suspense account, which is pretty confusing to the user. [task-3650271](https://www.odoo.com/web#id=3650271&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#150009 Forward-Port-Of: odoo/odoo#148479
This fix resolves a crash that occurred when using activity widgets within many2many field subviews in Web Studio. The issue happened because the system was trying to access field selection data that wasn't properly initialized. This fix ensures the activity widget works reliably in these scenarios without requiring workaround configurations.
Original PR description
Example of steps: - Install `web_studio` - add a `many2many` field from res.partner - create a record - add a line by selecting a partner In this case `_parseServerValue` will crash https://github.com/odoo/odoo/blob/29d55e44035b6e6c6aba6fa4a114d555a766b7c7/addons/web/static/src/legacy/js/views/abstract_model.js#L101-L111 Because `field.selection` is undefined this code is getting field from this line https://github.com/odoo/odoo/blob/d3ef5891e8e92636dd61b8f2b7186ad139e8b42a/addons/mail/static/src/web/fields/kanban_activity/kanban_activity.js#L14 Instead of specifying `selection: []` in the fieldDependencies this pr fixes this issue generally and prevents these kind of fixes https://github.com/odoo/odoo/pull/125052 opw-3671417 Forward-Port-Of: odoo/odoo#149930
This update fixes a visual issue where hovering over squashed messages in the mail interface would unexpectedly increase the message height. The fix reverts the time display format from 12-hour to 24-hour format in message sidebars, which resolves the layout problem and improves overall UI consistency. This change ensures a better user experience when interacting with squashed messages in channels.
Original PR description
Before this commit, when a message without bubble layout is squashed (e.g. with `/who` command twice in a channel), mouse-hovering on the squashed message pushed increased the height of the message.…
Before this commit, when a message without bubble layout is squashed (e.g. with `/who` command twice in a channel), mouse-hovering on the squashed message pushed increased the height of the message. This happens because the sidebar of squashed message contains the date and it uses 12-hour format with AM/PM. This design requires cautious use of content in the sidebar, and had 24-hour format to make it work. A recent refactoring changed it to 12-hour format as localization was a better concern. However, the UI is not designed for it, and there's not much value in having 12-hour format rather than 24-hour format. Indeed, users assume AM if no AM/PM is shown, except if hour is greater than 12 which is quite obvious the current time. 12-hour format is best for some users, but we can't have it without overhauling parts of the UI which is not worth it at the time of this commit. Therefore using 24-hour format is the better tradeoff. Also took the opportunity of this PR to better align the date and seen indicator in squashed message sidebar. Task-3637270 Before / After  
This fix corrects how hidden website elements are organized and displayed in the editor. When content is hidden on specific devices (desktop or mobile), the parent-child relationships between elements are now properly shown. This ensures website builders can better understand the structure of their hidden content and manage visibility settings more effectively.
Original PR description
[FIX] web_editor, *: correctly display the hierarchy between elements *website Steps to reproduce: - Drop a "Text-Image" snippet on the website. - Click on a column and hide it on desktop. - Click on…
[FIX] web_editor, *: correctly display the hierarchy between elements *website Steps to reproduce: - Drop a "Text-Image" snippet on the website. - Click on a column and hide it on desktop. - Click on the parent snippet and hide it on desktop. -> The column is not a child of the parent in the invisible entry. Since [1], invisible snippets are shown hierarchically in order to better visualize the "parent-children" relation that could exist between them. To do so, [1] based its logic on the `.o_snippet_invisible` to find the invisible elements. However, since [2], a distinction has been made between elements that are hidden only on desktop, only on mobile or on both depending on some conditions. The goal of this commit is to take the new `o_snippet_mobile_invisible` and `o_snippet_desktop_invisible` classes into account at the creation of the invisible entry. [1]: https://github.com/odoo/odoo/commit/922d3e63b597b1ef7fbbb5ebb4641a3ad8bdf4ed [2]: https://github.com/odoo/odoo/commit/3103e0553011b5c1f4078972d7a88fa3fd4068b2 task-3679823 Forward-Port-Of: odoo/odoo#149222
This update fixes an issue where duplicate images were appearing when searching for images on Unsplash, which was causing the image selection feature to fail. The system now automatically removes duplicate images from search results, ensuring a smoother experience when browsing and selecting images from Unsplash.
Original PR description
When obtaining several batches of images for the same string query on Unsplash, sometimes the same image appears in several batches. Because of this the `t-foreach` in the `web_unsplash.ImagesListTemplate` template fails when duplicate records appear in the list of images. This commit ignores duplicates received from Unsplash to avoid the issue. task-3637756 Forward-Port-Of: odoo/odoo#150183
This fix ensures that when products are scrapped and marked for replenishment in a manufacturing order, the replacement stock is automatically reserved just like stock created during normal order confirmation. Previously, replenished items after scrap weren't being properly linked to the production order, causing delays in multi-step manufacturing workflows.
Original PR description
When ticking 'Replenish' on a scrapping, the created move is unrelated to the production order. This means that in a 2-steps manufacturing flow, validating the move will not automatically reserve the product(s) on the production order as is done when validating the moves created by the MO confirmation. This is because the new move has no move_dest_ids. This fix has 2 parts: - first, add the new move to the already existing procurement group of the MO so that it is easier to find. - second, assign a move_dest_ids to that move so that when it is validated, the quantity is automatically reserved on the MO. opw-3560182 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149054
This fix resolves a problem where users couldn't delete an IoT box device if a point-of-sale printer was linked to it. Previously, the system would show an incorrect validation error about "Proxy IP cannot be empty." The fix properly validates the printer's device connection before allowing deletion, improving the user experience when managing POS hardware.
Original PR description
Current behavior: You couldn't delete an iot_box if a pos_printer was linked to it. You always get a validation error saying that "Proxy IP cannot be empty" To fix this we first want to check that the device_id linked to the printer still exists. To do this we need to move the constraint to the pos_iot module (because the device_id field is defined there) Steps to reproduce: - Install pos_iot - Activate preparation printer in POS - Create a printer and link it to an iot_box device - Try to delete the iot_box opw-3597370 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149186
This update fixes an issue where customer phone numbers with spaces were causing electronic invoice processing to fail in Saudi Arabia. The system now strips unnecessary characters from phone numbers before validation, allowing invoices to be processed successfully while maintaining compliance with international standards.
Original PR description
Steps to reproduce: [l10n_sa_edi] - create a SA customer with phone number e.g.:`+971 56 777 7777` - create an invoice - Zatca Process it Issue: Error: "The Buyer’s contact phone number (BT-57) shall start with “0“ or “+”, followed by a maximum of 15 number and minimum 4 character after the “+“ or “0“ , if exist." Solution: For Saudi Arabia, it is not necessary to have the phone number. For other locations, I assume that stripping the phone number could not harm the process. opw-3666195 Forward-Port-Of: odoo/odoo#148124