Daily updates from Odoo
Monday, February 17, 2025
15 changes
2 changes
Resolved issues and error corrections
Fixed an installation issue in the accounting spreadsheet dashboard caused by a changed dependency order between accounting modules. This helps ensure the dashboard module can be installed reliably without blocking setup due to a missing menu reference.
Original PR description
Since enterprise#77895 the module 'accountant' depends on 'account_reports', whereas it was the contrary before. And so this module installation was raising an error on unknown reference 'accountant.menu_accounting' runbot error 116839
This fix restores reliable drag-and-drop behavior in the Documents folder panel and prevents the folder panel from staying open when selecting documents on mobile. It improves usability and avoids crashes or confusing screen layout issues for users managing documents.
Original PR description
Issue 1, Drag and Drop Reproduce: 1. Try drag & drop in search panel. 2. Either it doesn't work, or it crashes. Issue 2, Reproduce: 1. Go to mobile view 2. Select a document 3. `Folders`, the search panel, is still visible In 0d904521, the `root` property was redefined in document's search panel and overrode the `root` `ref` from the search panel template. Furthermore, if we renamed the property, if at some point we are without selection while in "All", and then open a folder and select a document, the side panel won't be hidden either. This commit then reverts these changes. We also take the opportunity, while in master, to clean some unrelated dead code.
13 changes
Resolved issues and error corrections
The Import Serials/Lots dialog in inventory receipts now displays its fields in the intended two-column layout instead of stacking them incorrectly. This improves usability when entering or importing lot and serial information, especially during purchase receipt processing.
Original PR description
Issue: The grid elements on the import Lots dialog are placed in one column instead of two, which misses up the layout. Reproduction steps: 1. install "purchase_stock" 2. create a product tracked by…
Issue:
The grid elements on the import Lots dialog are placed in one column instead of two, which misses up the layout.
Reproduction steps:
1. install "purchase_stock"
2. create a product tracked by lots
3. make an RFQ for that product and confirm it
4. click on the generated receipt smart button
5. in "Operations" tab, click fa-list icon to open the dialog
6. in the dialog, click "Import Serials/Lots
Reason:
The bug was introduced in [239e75b1385fa023e97396baa0c8d46c50997dda](https://github.com/odoo/odoo/commit/239e75b1385fa023e97396baa0c8d46c50997dda#diff-1377579fdb76de80cd31ca67d798b752a90600ab4c82a3c8799786a130b7a46fR431-R433), where the following style was added
```css
.o_cell:first-child:last-child {
grid-column: span 2;
}
```
which applies for the children of the first and the third grid elements; However, since the first and the third grid elements have `display: contents`, the `grid-column: span 2` of their children messes up the grid layout, and makes it 4x1 instead of 2x2.
The fix:
Remove `display: contents` on the first and third grid elements, as it seems to not be useful. Have tested on web and mobile layouts.
opw-4505725eWallet card histories now correctly show transactions made through Point of Sale when points are added or used. This helps businesses and customers track eWallet balances and activity accurately.
Original PR description
When adding/using point in ewallet program, the loyalty history was not updated correctly. Steps to reproduce: ------------------- * Create a new ewallet program * Create an ewallet card for customer C * Add some points to the ewallet card * Open PoS and make an order that you pay with the ewallet card * Check the history of the ewallet card > Observation: The transaction made in the PoS does not appear Why the fix: ------------ The required data are already present in `couponData` so we should use it instead of computing it. Also the method `getLoyaltyPoints` is not returning the points for ewallet program so it should not be used in this case. opw-4546985
Restaurant kitchen preparation receipts now show the time the order was sent from the point of sale, using the cashier device's current time. This prevents missing times for unsynced orders and avoids showing UTC instead of the local business time.
Original PR description
When printing a preparation receipt the correct time was not shown (It was always UTC time). Also when the order was not sent to the server the time was not shown at all. Steps to reproduce: ------------------- * Setup a kitchen printer for a PoS * Open PoS go on a table and add some products * Click on the Order button > Observation: The time is not shown in the receipt * Leave the table and come back to it to make sure order is sent to the server * Add another product and send the order to the kitchen > Observation: The time is in UTC Why the fix: ------------ Instead of relying on the write date of the order we now rely on the current time of the client to show the time in the receipt. This time will always correspond to the time the order was sent to the kitchen. opw-4454102
Fixed an issue where uploaded quotation header or footer documents could be saved under a user's main company instead of the company currently being used. This helps multi-company sales teams keep quotation documents organized and visible in the right company context.
Original PR description
Versions: --------- 18.0+ Issue: ------ When uploading a document using the `Upload` button, the document is always assigned to the user's main company, regardless of the selected company. Steps to…
Versions:
---------
18.0+
Issue:
------
When uploading a document using the `Upload` button, the document is always assigned to the user's main company, regardless of the selected company.
Steps to Reproduce:
-------------------
1. Create a secondary company that the current user can access.
2. Navigate to Sales / Configuration / Sales Orders / Headers/Footers.
3. Switch the user's current company to the secondary company.
4. Click the `Upload` button and select any document.
- Notice that no document is added to the secondary company's scope.
5. Switch back to the primary company.
- The uploaded document is available under the primary company instead of the secondary one.
Cause:
------
During the upload process, no company-specific information is provided to associate the document with the selected company.
Due to the inheritance of the `ir.attachment` model, it uses `self.env.company` as the default company value for the document[^1]. Because the upload happens via the `HttpDispatcher`, no `allowed_company_ids` context value is provided to the request. Without this context value present, `request.env.company` defaults to the main company of the current user[^2].
Fix:
----
Use the `company_id` associated with the relevant `sale.order.template` (`False` when uploading documents not linked to a template).
opw-4472602
[^1]: https://github.com/odoo/odoo/blob/d99e44f22634ac589a940d85fab84ca2b2e85332/odoo/addons/base/models/ir_attachment.py#L408-L409
[^2]: https://github.com/odoo/odoo/blob/d99e44f22634ac589a940d85fab84ca2b2e85332/odoo/api.py#L680-L681Invoice previews now display headers and footers correctly for Argentina and Hungary electronic invoicing layouts, avoiding cropped fiscal details and duplicate page elements. Portal previews for Bubble and Wave layouts also align cleanly to the page edges, improving the customer-facing document appearance.
Original PR description
[FIX] l10n{latam_invoice_document,hu_edi}: layout header & footer issues Bubble and wave layout footer content of l10n_ar edi invoice qr code was a little bit cut off in preview. In addition when you…
[FIX] l10n{latam_invoice_document,hu_edi}: layout header & footer issues
Bubble and wave layout footer content of l10n_ar edi invoice qr code
was a little bit cut off in preview. In addition when you had both,
`l10n_hu_edi` and `l10n_latam_invoice_document` installed, you would
have a double header/footer. And the header of bubble/wave layout
does not have the bubble/wave. Last, there is some space between the
document and the "shadow" of the document in portal preview which
looks weird when the selected layout is bubble or wave which normally
goes all the way until the margins.
How to reproduce:
- install l10n_latam_invoice_document
- move to (AR) Responsable Inscripto" company
- Switch Document Layout to "Bubble" format
- Create an invoice with B2B customer
- make sure the Document Type is set to "(1) INVOICES A".
- Make sure the Journal is "Electronic Invoice"
- Validate the invoice
- Click on Preview button
What's wrong here:
1. At the bottom of the invoice, the CAE and CAE Due Date fields are
cropped
2. Also if you installed l10n_hu_edi, you will have a double
header/footer
3. The header does not have the bubble
4. The bubble doesn't go all way until the margins in portal preview
Regarding the first issue, this commit fixes it by moving
the custom footer to `o_content_footer` instead of it replacing the
whole footer. This was done for all `l10n_hu_edi` layouts as well as
`l10n_latam_invoice_document` layouts for consistency
For the second double header/footer issue, added a check before
overriding:
- company._name == 'res.company' to avoid breaking Configure Document
Layout wizard (there the `comptany` is of model `base.document.layout`
- only override if fiscal country corresponds to that of the localisation
And for the last issue with header not rendering as expected, this
commit uses another xpath for header overriding as in
[#192650](https://github.com/odoo/odoo/pull/192650)
opw-4411237Fixes an issue where opening certain record links from emails could cause Odoo to crash instead of showing the related record. Users can now follow these email links reliably and land on the correct page with the improved URL format.
Original PR description
Commit c63d14a introduced new nicer urls to get to Odoo. Commit e44d13dfa9f301d7120cdb8441dfc6ca03d3d5d5 adapted the /mail/view controller for it, allowing people to copy a link to a mail.message and be redirected to it and its corresponding record. Although one case was missing: when the model doesn't contain dots, the string is considered an action's path. So, when opening a record from a mail, there was a crash in odoo because the action could not be found. After this commit, there is no crash, and the record is opened correctly with a nice url. see router.js: heuristics to discrimate a model name from an action path is the presence of dots, or the prefix m- for models opw-4564257 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
Invoice and quotation lines no longer show the product name twice when the customer uses a different language. This keeps customer-facing documents clearer and ensures product names appear in the appropriate translated language.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Have a partner using a different language; 2. set up an invoice or quotation for the partner; 3. add a line with a product; 4. click on the line to add a…
Versions -------- - 18.0+ Steps ----- 1. Have a partner using a different language; 2. set up an invoice or quotation for the partner; 3. add a line with a product; 4. click on the line to add a description below the product name; 5. preview the document. Issue ----- The product name is shown twice: once untranslated and once translated. Cause ----- Commit cf7290cbd8cc1 auto-prefixes the product's name to the line's label, and attempts to remove it for display. This only works when user & partner use the same language. As the product name is added to the label in the partner lang, it will no longer match the product name in user lang, leading to duplicate lines getting displayed for the partner, with the first using an inappropriate language. Solution -------- The description is already auto-filled using the product's name, translated to the partner's language. By not prefixing the product's name a second time, users don't have to empty the description first before editing it, and product names are no longer displayed in the wrong language. opw-4496918
The Indian HR holidays module now shows the sandwich leave option for standard time-off types when the company is based in India, even if the type has no country set. This helps single-company Indian businesses configure leave policies correctly for common categories like paid or sick leave.
Original PR description
Steps to Reproduce: - Install the `l10n_in_hr_holidays` module. - Ensure there is only one company, and its country is set to India. - Sandwich leave feature is not available for common time-off types like Paid, Sick, etc. Cause: - Time off types for common categories (e.g., Paid, Sick) have `company_id` and `country_id` set to False. - In a single-company setup, users cannot change the country in these time-off types due to the lack of multi-company access. Fix: - Adjusted the visibility condition for the sandwich leave feature. If the `country_id` for the time-off type is False or India then the sandwich leave feature will now be available. task-4430006
Invoices no longer duplicate product names when a staff member edits a translated product label before printing. Customers now see the correct translated label on the PDF, while internal users can still work with product names in their own language.
Original PR description
When an invoice is created, the system will automatically translate the strings into the customer language: - In the backend the user will see the original product name and the label composed by translated name and translated description. - In the printed pdf the customer will see just the translated label However if the user modify the label in the backend, it will be saved prepending the original product name Steps to reproduce: - Have a user using a language [LANG1] - Have a customer using a language [LANG2] - Make an invoice to the customer, add a product with both name and description with translation available - Make a small change to the product label - Save - Print Issue: The name of the product is duplicated, it appears in user language and customer language opw-4444773
Fixed an issue where invoice PDF documents stored through accounting file centralization could not be found by their indexed content. This makes centralized accounting documents searchable as expected, helping users locate related files reliably.
Original PR description
Issue ----- Attachments are linked to `document.document` with a (`res_model`) and `res_field` By default, searching on `ir.attachment` filters out attachments tied to binary fields (ref.1), by adding `['res_field', '=', False]` to the domain preventing such documents from appearing in searches. Solution -------- This commit skips the filter on `res_field` Steps to Reproduce ------------------- 1. Install `documents` and `accountant` modules. 2. Enable Files Centralization for Accounting and add Customer Invoices to its Journals. 3. Create an invoice → Confirm → Print → Download. 4. Click on the related document. Bug:The PDF cannot be searched by its indexed content. (ref. 1) ---- 1bb61c970ed63eabe3821d21f3ed6f99c4b16daa [ADD] fields: add option to store binary fields into attachments opw-4267371
The subscription portal now shows renewal amounts using the correct currency conversion instead of only changing the currency symbol. This prevents customers in multi-currency setups from seeing or paying an incorrectly low or high amount when extending a subscription.
Original PR description
The recurring subscription amount displayed in the sidebar of the subscription order portal view is incorrect. For companies using multiple currencies, the displayed amount is based on the database's…
The recurring subscription amount displayed in the sidebar of the subscription order portal view is incorrect. For companies using multiple currencies, the displayed amount is based on the database's base currency but is shown with the expected currency symbol. This discrepancy can cause issues when extending a subscription, as clients may not be charged the correct amount. For example, a product priced at €10 EUR should require the customer to pay ¥75.15 CNY. However, due to the previous use of the total_amount field, the customer only needed to pay ¥10 CNY to extend their subscription. The total_amount_currency field resolves this issue by correctly converting and displaying the amount in the expected currency. Before Fix:  After Fix:  Task-4484696
The Executive Summary now calculates net profit margin using the same income basis as the accounting dashboard. This prevents mismatched profitability figures between reports, helping users rely on consistent financial metrics.
Original PR description
Users can access different metrics to evaluate their financial performance, both from the accounting app and from the accounting dashboard in the dashboard app. However, the values to compute the…
Users can access different metrics to evaluate their financial
performance, both from the accounting app and from the accounting
dashboard in the dashboard app.
However, the values to compute the metrics are retrieved independently
and this is causing an issue with the computation of Net profit margin
Steps to reproduce:
- Add an invoice (to have income) and a bill (to have expenses)
- Check Net profit margin in Dashboards > Finance > Accounting
- Check margin also in Accounting > Reporting > Statement Reports > Executive Summary
Issue:
Net Profit margin in executive summary and accounting dashboard differs.
Reason:
Net Profit margin is defined as NEP/INC
- NEP is:
- In dashboard OPINC + OIN - COS - EXP - DEC
(All accounts type income and other incomes minus expenses)
- In executive summary REV + OIN - COS - EXP - OEXP
(Same as above)
- INC is:
- In dashboard OPINC + OIN
(All accounts type income and other incomes)
- In executive summary REV - COS - EXP
(All accounts income type - Account type cost - all expenses)
Solution:
Correct Net profit margin computation in execute summary to use the
income and not the operating income, as in the latter the expenses have
been already deducted
opw-4450678Users now see the correct access-related error when trying to split a PDF in a Documents folder they no longer have permission to use. This avoids a confusing unrelated message and helps users understand that the action is blocked by folder permissions.
Original PR description
## Issue: When we upload a pdf document to a folder and remove access to that folder, if we attempt to split the document it shows an unralted error. ## Steps to reproduce: - install…
## Issue: When we upload a pdf document to a folder and remove access to that folder, if we attempt to split the document it shows an unralted error. ## Steps to reproduce: - install documents_project - Open documents app - Select "Projects" folder - Upload a pdf document - Edits "Projects" folder sharing settins to remove Mitchell Admin and restrict Internal users to None - Select the pdf document and click on "Split" button - Try to split the document - Not possible due to folder access error but the error message is not related to the issue ## Solution: - In the `PdfManager` component, we noticed that inside the `_sendChanges` method, we don't verify whether the response from the `pdf_split` controller is JSON before calling `.json()`. As a result, when we attempt splitting, an access error is raised in the controller, and Werkzeug returns an HTML error response by default. This leads to an error when `.json()` is called, which is eventually caught in `_applyChanges` and displayed in the notification instead of the intended access error. - this fix handles the error response from the `pdf_split` controller better by checking if the reponse is ok before calling `.json()`, and handling the error response accordingly. OPW-4453150