Daily updates from Odoo
Tuesday, April 14, 2026
50 changes · saas-19.2
Resolved issues and error corrections
This update resolves an error preventing customers from successfully connecting or refreshing their Shopee accounts through the `sale_shopee` module. The fix corrects a technical issue within the module's code that was causing an error during the authorization process. New automated tests have been added to ensure this functionality remains stable.
Original PR description
Currently, customers report errors when connecting or refreshing a Shopee account through the `sale_shopee` module. **Steps to reproduce:** - Install and configure the `sale_shopee` module - Attempt…
Currently, customers report errors when connecting or refreshing a Shopee account through the `sale_shopee` module. **Steps to reproduce:** - Install and configure the `sale_shopee` module - Attempt to connect a Shopee account via the onboarding flow - Complete the authorization process **Observed behavior:** An error is raised during the authorization callback, preventing the Shopee account from being connected or refreshed. **Root cause:** In `onboarding.py`, the `shopee_return_from_authorization` controller incorrectly uses `utils.with_context(authorization_code=code)`. Since `utils` is an imported Python module, calling `with_context` on it attempts to set the context on the module itself rather than on a model instance, which raises an error. **Solution:** Move the `with_context` call from the `utils` module to the `temp_shop` record, which is the appropriate model instance that needs the context. Additionally, this commit adds regression tests for the controller to prevent future regressions, as this functionality was previously untested. opw-6092524 Forward-Port-Of: odoo/enterprise#113081
This update creates a direct link between Documents and Project Tasks, resolving a previous issue where attachments and saved documents weren't automatically connected. Now, documents created from Project Tasks will have a clear link back to the task, improving organization and workflow efficiency.
Original PR description
Previously, there was no connection between the Documents app and Project Tasks (`project.task`). Attachments added to a task via the chatter were not synced to the Documents app, and documents manually saved from the chatter lacked a link back to the corresponding task. This commit introduces a link between them by posting a message in the created document's chatter, linking it back to the task. This solution is specifically for stable versions. On `master`, we introduce a proper bridge. task-5941719 Forward-Port-Of: odoo/enterprise#111996
This update resolves a visual issue where text in the payroll view would split and misalign with checkboxes when the browser window was resized. The fix ensures all text remains on a single line, maintaining a consistent and professional appearance for users. This improves the user experience and data readability.
Original PR description
Step to reproduce: play with the width of the window, at some point text splits and item are unaligned. Cause: with some window width, the text is splitted on 2 lines, which makes it unaligned with the checkbox. Solution: force text on same line using style="white-space: nowrap". Task: 6069017 Forward-Port-Of: odoo/enterprise#113570 Forward-Port-Of: odoo/enterprise#113386
This update fixes an issue where the FAIA report was incorrectly showing only the first product ID when multiple products lacked a required internal reference. Now, the report accurately displays all products with missing internal references, ensuring accurate reporting for Luxembourg accounting. This resolves a previous data discrepancy.
Original PR description
This is one of several commits fixing the FAIA xml export. The internal reference must be set for all products reported in the FAIA report. When there are multiple products missing this field, our previous code only reported the first ID to the customer. This commit shows the customer all incorrectly configured products. opw-5427296, opw-6113665 Forward-Port-Of: odoo/enterprise#113563 Forward-Port-Of: odoo/enterprise#113452
This update resolves a crash that occurred when users double-clicked 'Add Custom Field' within a list view's optional fields dropdown in Odoo Studio. The fix prevents Studio from opening multiple times simultaneously, ensuring a stable user experience. This improves reliability for users working with list views.
Original PR description
On a list view, open the optional fields dropdown. Click twice on "Add Custom Field" Before this commit there was a crash, because opening studio while it is already opening was not protected. After this commit, there is no crash. Forward-Port-Of: odoo/enterprise#113299
This update ensures that CSV files are now correctly recognized and viewable within Odoo's list views, mirroring the behavior in the Kanban view. This improves usability by allowing users to directly access and work with CSV data from the standard list view interface.
Original PR description
Current behavior before PR: - CSV files were viewable from the Kanban view, and opened the spreadsheet conversion dialog - In list view, CSV files were not considered viewable - Same issue for trashed CSV files in list view Desired behavior after PR is merged: - Consider CSV files as viewable in list view - Align behavior with the Kanban view Task: 6052134 Forward-Port-Of: odoo/enterprise#113586 Forward-Port-Of: odoo/enterprise#112869
This update fixes an issue where search filters applied in the MRP Planning section (MPS) would disappear when users navigated away and returned via the breadcrumb. The fix ensures that search filter state is correctly maintained, providing a smoother and more reliable user experience for planning.
Original PR description
Issue: In the MPS view, when the user sets a search filter, navigates away and then returns via the breadcrumb, the search filters that were applied are gone. This happened because the MPS client action was not passing `globalState` to the `WithSearch` component. Fix by passing `globalState` in `withSearchProps`. task-5368078 Forward-Port-Of: odoo/enterprise#113183 Forward-Port-Of: odoo/enterprise#113125
This update resolves an issue where certain holiday types were incorrectly being treated as working time, leading to inaccurate time tracking. The change allows administrators to exclude holidays that should be considered as fully paid time off, ensuring accurate payroll and reporting. This improves the reliability of our time management features.
Original PR description
…orking time We can't take leaves considered as working time. We should be able to task-6089849
This update resolves an issue where prompts within email templates weren't being evaluated correctly. The fix ensures that all prompt containers are wrapped in a `<div>` to prevent errors during evaluation, guaranteeing prompts are processed as intended. This improves the functionality of AI-powered email templates.
Original PR description
Note: In 18.4, the editor inserts a space before and after the prompt container, in which case the following steps won't cause an error because the container won't be the only html element. Steps to…
Note: In 18.4, the editor inserts a space before and after the prompt container, in which case the following steps won't cause an error because the container won't be the only html element. Steps to reproduce: - Create a new email template. - Insert a prompt by using the '/prompt' command. - Type any prompt like 'Say Hello'. - Save the email template. - Click on preview. - The prompt isn't evaluated. The '_eval_ai_prompts' method creates a root element from the passed html content. When the passed content represents a single prompt container html element, the root will become that prompt container. The method will try to evaluate the prompt and replace the prompt container and then return the root. The returned root won't contain the evaluation of the prompt in this case because the whole root should be replaced by the evaluation given that there is no other elements. To fix this, the html content will always be wrapped in a `<div>` to avoid the need for replacing the whole root element. Forward-Port-Of: odoo/enterprise#111645 Forward-Port-Of: odoo/enterprise#110247
This update fixes an issue where appointment booking descriptions were displayed in the user's language instead of the website's language (French). The fix ensures that appointment details are shown in the correct website language, regardless of the user's language settings, improving the user experience and consistency across the Odoo website.
Original PR description
When booking an appointment, the cart shows the date/time in the partner's language instead of the website's language. `_prepare_order_line_values` uses `self.partner_id.lang`, ignoring the website language and using the user's language instead. Steps to reproduce: 1. Have a website language different than the user's language 2. Go to the website appointment page 3. Book an appointment 4. Check the booking For this case: - Website language: French - User language: English => You will find, "xxx at xx:xx to yyy at yy:yy" instead of "xxx à xx:xx au yyy à yy:yy" Ticket [link](https://www.odoo.com/odoo/action-4043/5931610) opw-5931610 Forward-Port-Of: odoo/enterprise#113208 Forward-Port-Of: odoo/enterprise#107698
This update corrects a bug where ticket submissions with emails using different capitalization would incorrectly create a new partner. Now, the system correctly identifies and uses the submitted email address to create the ticket, preventing the creation of unintended partner records. This ensures consistent and accurate ticket assignment.
Original PR description
**Steps to reproduce** - Create a first partner (name: "Partner", email: "partner@mail.com", phone: "123"). - Go to the website form of a helpdesk team, and submit a ticket using "Partner@mail.com"…
**Steps to reproduce**
- Create a first partner (name: "Partner", email: "partner@mail.com", phone: "123").
- Go to the website form of a helpdesk team, and submit a ticket using "Partner@mail.com" as email (notice the different capitalization) and "456" as phone number.
Behavior without this fix: a new partner is created, but the ticket is assigned to the orignal partner ("partner@mail.com") and its phone number is updated.
Behavior after this fix: no partner is created.
**Causes**
- the partner search was case sensitive
- the created partner was not used as the `partner_id` of the ticket as it was added to the params but needs to be in the kwargs passed to `handle_website_form` in order to be found used by `extract_data`. The original partner was found in `_find_or_create_partner` by the call to
`_mail_find_partner_from_emails` (case-insensitive)
Note: this commit also ensures consistency between the partner's company and the ticket's company (same as in `_find_or_create_partner` of `helpdesk.ticket`).
Also, avoid allowing modifying existing partner's phone via this form.
opw-5914064
Forward-Port-Of: odoo/enterprise#109393This update resolves a problem where embedded PDF previews in XML invoices (like UBL files) were not displaying correctly in the Documents app. The issue stemmed from a recent update to the PDF viewer, which required a specific flag to correctly extract the PDF data. This fix restores this flag, ensuring accurate PDF previews are shown.
Original PR description
Steps to reproduce: 1. Upload an XML invoice (e.g., UBL) containing an embedded PDF into the Documents app. 2. Select the document to open the preview panel. 3. The viewer opens but shows a…
Steps to reproduce: 1. Upload an XML invoice (e.g., UBL) containing an embedded PDF into the Documents app. 2. Select the document to open the preview panel. 3. The viewer opens but shows a grey/empty PDF viewer. Context: Commit odoo/odoo@5035107e introduced an updated PDF viewer.js. Subsequently, commit d3481a5e removed the `download=0` query parameter from the viewer route to prevent `new URL()` parsing errors on relative paths. However, the backend specifically relies on the `download=0` flag to intercept the request, extract the Base64 data, and serve the raw PDF binary. Without this parameter, the backend serves the raw XML string directly to the PDF viewer, causing the parser to crash. Fix: Restore the `download=0` parameter by using the core `url` utility to construct a safe, absolute URL before encoding it for the viewer. This satisfies the strict `new URL()` parsing in the updated PDF viewer while ensuring the backend correctly triggers the PDF extraction. Task-6065246 Forward-Port-Of: odoo/enterprise#112007
This update removes a restriction that prevented users from accessing tax returns when the GST e-filing feature was disabled. Previously, users were redirected to enable the feature, which wasn't ideal for all returns. Now, users can access all tax returns regardless of the GST e-filing setting.
Original PR description
BEFORE: - Before this commit, when we disable the gst e-filing feature from the configuration and try to access the tax return view, we are getting blocked by the redirect warning, which suggests…
BEFORE: - Before this commit, when we disable the gst e-filing feature from the configuration and try to access the tax return view, we are getting blocked by the redirect warning, which suggests enabling the gst e-filing feature from the configuration. - Which is not desirable, as there might be some returns that are not related to gst e-filing, which should be accessible by the user. AFTER: - After this commit, removed the RedirectWarning when accessing the tax return view with gst e-filing feature disabled. So now the user can access tax returns without enabling gst e-filing feature. - At the time of setting the fiscal year(generating/refreshing returns automatically), the GSTR returns will not be created. - And at the time of manual GSTR return creation, we are raising UserError to instruct the user about enabling the gst e-filing feature. Related Com PR: https://github.com/odoo/odoo/pull/247216 Task-5486586 Forward-Port-Of: odoo/enterprise#113741 Forward-Port-Of: odoo/enterprise#105983
This update resolves a technical issue within the web_studio report editor where unwanted placeholders were automatically inserted between layout sections. This prevented reports from printing correctly, and the fix ensures that reports are generated without these formatting errors. The change improves the reliability of report creation.
Original PR description
… sections Before this commit, the html_editor automatically put placeholders between hearder, article and footer nodes (identified with classes) This is caused by odoo/odoo@edf7f7bb0c62978640c181eccb4934855d5d872d. This caused issues because at print time those cracks are not printed because of base/ir_actions_report.py:def _prepare_html (which separates header, footer, and articles to pass them to wkhtmltopdf) After this commit, those placeholders are not present in those cracks. opw-6048955 Forward-Port-Of: odoo/enterprise#113708 Forward-Port-Of: odoo/enterprise#112458
This update resolves an issue where the 'Details' button was causing errors when users initiated the signing process. The fix ensures the button is hidden during signing mode, preventing runtime errors and improving the user experience. This change enhances stability and reliability for internal users.
Original PR description
Version: - saas-19.2 Steps to reproduce: - Create sign request for internal user. - Open document. - Start Signing and click on 'Details' button in contoll panel. Issue: - Clicking this button during signing causes a traceback error. Cause - The button is defined in `sign.SignRequestControlPanel` and is always rendered. In signing mode, the template is reused via XML inheritance (sign.SignSignableRequestControlPanel), but the corresponding JS component (SignableRequestControlPanel) does not implement the openFormView method. As a result, clicking the button leads to a runtime error. Solution - Control the visibility of the "Details" button using a getter. The getter returns true in SignRequestControlPanel (normal mode) and false in SignableRequestControlPanel (signing mode), ensuring the button is hidden when the required method is not available. task-6074593
This update resolves a test failure related to currency differences in DIAN move detection. The system now ensures that all test moves use the same currency, aligning with updated duplicate move detection logic. This ensures accurate testing and reliable functionality for DIAN tax compliance.
Original PR description
Following [PR](https://github.com/odoo/odoo/pull/248421), duplicate move detection now also checks the currency of both moves. Consequently, the `test_validate_duplicate_cufe` test case is failing because the moves in the test use different currencies. This commit ensures both moves use the same currency to fix the test. task-5916255
This update fixes an issue where subscription discounts were incorrectly calculated due to how the base plan price was being used. The fix ensures discounts are accurately applied by dividing the base plan price by its unit (e.g., month or year), resulting in more precise pricing on the website. This improves the accuracy of subscription offers for customers.
Original PR description
### Steps to reproduce: - Install Subscriptions and eCommerce modules - Create 3 recurring plans (3 months, 6 months, Yearly) - Create a service subscription product with the created recurring plans - Check the product's page on website - Notice each pricing has a discount tag and with incorrect numbers ### Cause: When calculating the discount we normally use the fixed price of the base plan as the price to compare with. This sometimes introduce inconsistencies if the base plan is not just one unit from the period (>1 week/month/year) ### Fix: We divide the base_plan_price by the unit of the plan so we can get the price of just one plan unit. opw-6048278 Forward-Port-Of: odoo/enterprise#112305
This update corrects a problem where overridden group names within the accounting module weren't being properly translated into the Odoo localization files. The fix adds specific identifiers to the accounting module, ensuring that translated names are exported and used correctly, preventing inconsistencies between the English source strings and the translated versions.
Original PR description
The `account_accountant` module overrides the English name of several `res.groups` records owned by `account`. Without `account_accountant`-scoped XMLIDs for those records, the overridden names are never exported into this module's POT file. At runtime, `account`'s translations are loaded instead, which no longer match the overridden English source strings. We fix this by registering additional XMLIDs under `account_accountant` so the overridden names get translated independently. Forward-Port-Of: odoo/enterprise#113470 Forward-Port-Of: odoo/enterprise#112898
This update ensures that when a section with 'Hide Composition' is enabled, the corresponding products are also hidden in the portal's preview view, matching the behavior in the PDF report. Previously, subscription products within hidden sections were still visible, creating a discrepancy in how orders were presented.
Original PR description
**Problem:** Currently, when 'Hide Composition' is enabled on a section containing at least one product, while the order have subscription product, the recurring lines within that section are still…
**Problem:** Currently, when 'Hide Composition' is enabled on a section containing at least one product, while the order have subscription product, the recurring lines within that section are still visible in the portal's 'preview' view, whereas they are correctly hidden in the PDF report. **Expected behavior:** As observed in pdf format, in preview, the hidden section should hide the components and only view the name of the section. **Steps to reproduce:** - Create quotation with One Goods type product - Add section with Hide composition - Add service type product in the section - Preview it and section products will be hidden - Confirm the quotation and now preview the sales order - Now the hidden section products will be visible **Solution:** - We need to separate the logic of displaying lines and invoiceable lines (since _get_invoiceable_lines doesn't necessarily return the sections/subsections) - The filtering in sale subscription module wasn't considering the `collapse_composition` boolean field, which why hidden sections content were displayed. - We need to hide any product with a parent (section or subsection) collapsed, hide any subsection with a parent section collapsed. opw-5868148 Forward-Port-Of: odoo/enterprise#106287
This update fixes an issue where vendor bills created in the Documents module incorrectly defaulted to the company's currency instead of the vendor's. Now, when a vendor is selected in Documents, the bill automatically uses the vendor's currency, ensuring accurate financial reporting. This improves data consistency and simplifies reconciliation.
Original PR description
**Issue:** When creating a vendor bill or vendor refund through the Documents module after selecting a supplier, the currency defaults to the company's currency instead of the vendor's. However, if the supplier is selected later in the Accounting module, the correct supplier currency is applied. **Steps to reproduce:** - In Documents, upload a bill. - Click on the bill and assign a vendor (whose supplier currency is different from the company's currency). - Click on "Create Vendor Bill". The used currency isn't that of the supplier. opw-4406074 Forward-Port-Of: odoo/enterprise#100846 Forward-Port-Of: odoo/enterprise#78380
This update resolves a problem where portal users were receiving an error message when viewing invoice payment information. The issue stemmed from the system attempting to access payment details, which portal users didn't have permission to view. This change prevents the error and ensures accurate payment information is displayed in the portal.
Original PR description
Steps to produce: --- - Install `Accounting` module. - Create a new customer. - From the gear icon, `grant Portal Access` to the customer. - Create an invoice for this customer. - Log in using the…
Steps to produce: --- - Install `Accounting` module. - Create a new customer. - From the gear icon, `grant Portal Access` to the customer. - Create an invoice for this customer. - Log in using the customer’s portal account. - Navigate to `My Invoices`. Issue: --- ``` You are not allowed to access 'Payment' (account.payment) records. ``` Root cause: --- - After the [commit], the system attempts to compute the next payment values for display in the portal. - This computation is triggered via `_get_invoice_portal_extra_values()`, which calls `_get_invoice_next_payment_values()`. - During this process, the method iterates over `reconciled_payment_ids`. Accessing this field triggers its computation (`_compute_reconciled_payment_ids`), which depends on `matched_payment_ids`. - Both `reconciled_payment_ids` and `matched_payment_ids` are relational fields pointing to `account.payment` records. - Since portal users do not have read access to the `account.payment` model, attempting to access these fields results in an AccessError [commit]: https://github.com/odoo/odoo/commit/b76836680540eb7687021f48b3532e8a495e771a opw-6042693 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where sale orders were incorrectly using the analytic account from Company A instead of Company B when multiple companies were involved. The change ensures that the correct company's project and analytic distribution account are used, resolving potential discrepancies in financial reporting across different company environments. This improves the accuracy of sales data analysis.
Original PR description
Pre-requisites: ------------------------------------------ 1. Install `sale_project` and `project_account_budget` modules 2. Have two companies configured in the system 3. Enable Timesheets from the…
Pre-requisites:
------------------------------------------
1. Install `sale_project` and `project_account_budget` modules
2. Have two companies configured in the system
3. Enable Timesheets from the Settings app
4. Create two projects (one for each company)
5. Ensure the following settings are enabled on both projects:
* Timesheets
* Billable
Steps to Reproduce:
------------------------------------------
1. Switched to Company A
2. Create a product with:
* Type: Service
* Create on Order: Task
* No company restriction
3. Set the product's `project_id` to Company A's project
4. Switch to the newly created company (Company B)
5. Set the product's `project_id` to Company B's project
6. Enable Analytic Distribution from SOL Optional
7. Create a sale order with the configured product, and delete the auto-fetched
Analytic Distribution account for the sale order (Company B's project)
8. Now confirm the sale order
Observation:
----------------------------------------
The SOL's analytic distribution uses the analytic account from Company A's project instead of Company B
Issue:
----------------------------------------
The `project_id` field on `product.template` is `company_dependent=True`, meaning it stores different values per company. However, in `_compute_analytic_distribution()`, the code accesses `line.product_id.project_id` without calling `with_company`, so it resolves the field using the wrong company context
Solution:
----------------------------------------
using `with_company()`, the correct company context is applied when accessing
`project_id`, preventing inconsistencies in multi-company environments and
ensuring the appropriate project is used for the corresponding company.
opw-5864452
Forward-Port-Of: odoo/odoo#257776This update resolves a memory issue that caused server crashes when calculating cumulated balances for large accounting systems. By optimizing the query to process only relevant move lines, the fix dramatically reduces memory usage and processing time, leading to a more stable and efficient system. This improves performance for users with extensive transaction data.
Original PR description
The _compute_cumulated_balance() method performs a query over every existing move lines to get a dict associating the record id with the cumulated sum at this point. When there is a lot of move…
The _compute_cumulated_balance() method performs a query over every existing move lines to get a dict associating the record id with the cumulated sum at this point. When there is a lot of move lines, the result returned by fetchall() hits the memory limit and the server crashes. We propose to encapsulate the original query to only return the result for the account move lines present in self. Benchmarks --------------- The following benchmarks were generated with a customization of the account.move.line list view to display the cumulated_balance field. Memory usage during the self.env.cr.execute and the dictionary population: | Operation | Before the fix | After the fix | |---------------|----------------|---------------| | populate dict | 1.5 GB | 17.1 MB | | execute query | 430 MB | 8.3 MB | 100 000 lines were displayed at the same time to get a significant size. So the number of records in self is more than 7 000 000 without the fix and 100 000 with the fix. Time spent in the _compute_cumulated_balance method: | No of AML | Before the fix | After the fix | |-----------|----------------|---------------| | 7 000 000 | 10.4 s | 6.8 s | opw-6053720 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258207 Forward-Port-Of: odoo/odoo#255780
This update fixes an issue where users received access errors when clicking on notifications for records they couldn't view. Now, users are automatically redirected to their inbox instead, providing a smoother user experience. This enhancement ensures notifications are always accessible, even for records with restricted permissions.
Original PR description
Currently, when a user clicks on a notification in the messaging menu relating to a record they don't have access to, an access error occurs. This PR changes this behavior so that the user is redirected to the inbox instead. task-5374528 Forward-Port-Of: odoo/odoo#258745 Forward-Port-Of: odoo/odoo#258126
This update fixes a technical error in the HR reporting module that prevented certain financial constraints from being properly enforced. The issue stemmed from a missed correction during a recent update, impacting how financial moves were processed. This change ensures accurate reporting and compliance.
Original PR description
In 18.0, the `_check_move_constraints()` method contained a typo - `_check_move_constrains()` - and the module was developed with this in mind. The typo was fixed in 19.0, but this was missed during the forward port of this module, leading to additional constraints not triggering properly. ticket-6036500 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257492
This update resolves an issue where COGS calculations were incorrect when products were partially delivered or held as consignment stock. The fix ensures that consigned quantities are properly accounted for, leading to accurate COGS values for sales invoices. This improves inventory valuation and reporting.
Original PR description
This forward port merges [PR1](https://github.com/odoo/odoo/pull/255043) (original PR from this forward port) and forward port of [PR2](https://github.com/odoo/odoo/pull/256383) which is improving…
This forward port merges [PR1](https://github.com/odoo/odoo/pull/255043) (original PR from this forward port) and forward port of [PR2](https://github.com/odoo/odoo/pull/256383) which is improving the fix. **Problems:** 1) cogs don't adapt to partially consigned quantities 2) no cogs at all if product partially delivered **Steps to reproduce:** Problem 1) - enable 'consignment' setting - create a tracked product with perpetual category (bug happens with avco, fifo and standard price category) - set a cost of 10 - add a quantity of 1 without owner and a quantity of 1 with an owner - create a sale order for a quantity of 2 of your produce - confirm, validate picking and confirm invoice -> the cogs is 20 -> the cogs should be 10 because the consigned quantity shouldn't be taken into account in the cogs Problem 2) - set the warehouse as 2 steps delivery - create a tracked product avco perpetual - set a cost of 10$ and a positive quantity - create and confirm a SO for 1 quantity - validate only the first picking - create and confirm the invoice -> there is no cogs lines in the invoice -> there should be cogs line for a cost of 10$ **Cause of the issue:** Problem 1) to compute the cogs line amount, we multiply the quantity of the line (2 in our case) by the price unit of the cogs. To compute the price_unit we call _get_cogs_value() https://github.com/odoo/odoo/blob/0dbc1c01c6b48d0a765391d5b6ab03b555440aef/addons/stock_account/models/account_move.py#L122-L123 In our case the price_unit (so the 'price per cogs unit') should be 5 because we have 2 units, 1 valued at 10 and 1 valued at 0 (the consigned one). But the value returned by _get_cogs_value() is 10. The reason for this is that _get_cogs_value uses the return value of _get_cogs_price_unit() because the delivery is validated. https://github.com/odoo/odoo/blob/0dbc1c01c6b48d0a765391d5b6ab03b555440aef/addons/stock_account/models/account_move_line.py#L67-L68 Inside get_cogs_price_unit, we use _get_valued_qty() to sum the valued quantity of each move. https://github.com/odoo/odoo/blob/0dbc1c01c6b48d0a765391d5b6ab03b555440aef/addons/stock_account/models/stock_move.py#L251 But inside get_valued_qty() for our second move, when calling get_out_move_lines(), no lines will be returned because should_exclude_for_valuation() will return True as the owner of the line is not the user. So total qty will be 1. https://github.com/odoo/odoo/blob/0dbc1c01c6b48d0a765391d5b6ab03b555440aef/addons/stock_account/models/stock_move.py#L529 If the product is fifo, we return the total value of the moves (10 + 0) divided by total quantity (1). If the product is standard or avco we return the standard price. In both cases the return value is 10. But in both cases it should be 5. https://github.com/odoo/odoo/blob/0dbc1c01c6b48d0a765391d5b6ab03b555440aef/addons/stock_account/models/stock_move.py#L251-L255 Problem 2) Inside _get_cogs_value(), because there is done moves, we use _get_cogs_price_unit() https://github.com/odoo/odoo/blob/5fd80a1fb8ef33cfa9261967cf14f6f0c421d45a/addons/stock_account/models/account_move_line.py#L67-L68 But because there is no valued quantity (because the done moves are internal), the return value will be 0. https://github.com/odoo/odoo/blob/5fd80a1fb8ef33cfa9261967cf14f6f0c421d45a/addons/stock_account/models/stock_move.py#L251-L253 So the cogs will have an amount of 0 and no line will be created https://github.com/odoo/odoo/blob/5fd80a1fb8ef33cfa9261967cf14f6f0c421d45a/addons/stock_account/models/account_move.py#L125-L126 **fix** Prob 1) The first thing to change is to not use the standard price when some quantities are consigned. The other thing is to add the quantities that would have been used if they weren't consigned because in this case we need them in the computation. Indeed these quantities are included in the invoice line quantity. At the end we are multiplying the unit price by the invoice line quantity which includes consigned quantity, so we need to take them into account also when computing the price per cogs quantity. Prob 2) If there is no quantity to value (consigned + not consigned) we fallback on the standard price (just as if there is no move). This solves the issue of partially delivered order because no moves are valued moves in this use case. If there is a quantity to value (and we're in a case where we want the average move value), we use the average move value (which will be 0 if all the moves are consigned, so the consigned use case is also ok) opw-6030161 opw-6001694 Forward-Port-Of: odoo/odoo#256231 Forward-Port-Of: odoo/odoo#255043
This update fixes a bug where countdown snippets weren't visible in the website builder's preview dialog. The change ensures the necessary interaction is loaded within the preview environment, allowing countdown timers to function correctly when creating custom website snippets. This improves the user experience for website builders.
Original PR description
The content of the countdown snippet did not appear in snippets preview dialog, because the interaction that fills it was not loaded for preview. This commit adds the interaction in the registry for loading it inside the iframe of the snippets preview dialog. Steps to reproduce: - Open website builder - Drop a `s_text_image` snippet - Drop a `s_countdown` snippet inside - Save the first one as a custom snippet - Click on "Custom" snippets category - Bug: the countdown does not appear task-6088029 Forward-Port-Of: odoo/odoo#258916 Forward-Port-Of: odoo/odoo#257480
This update resolves an issue where clicking on records within the 'Forecasted' report in the product catalog didn't function correctly. The fix allows users to open and view the detailed records associated with forecasted products, improving the report's usability and providing access to critical sales data.
Original PR description
Steps to reproduce ================== - Install sale_stock - Go to Products - Open the "Acoustic Bloc Screens" record - Click on the Forecasted smart button - Click on "three quotations" - Click on a record => Nothing happens opw-6095229 Forward-Port-Of: odoo/odoo#258157
This update resolves an issue where multiple attachments were incorrectly included in vendor bills when posting expenses with multiple employees. The fix ensures that each bill accurately reflects the attachments associated with the specific expense, preventing data duplication and improving accuracy in financial reporting. This improves the reliability of expense tracking.
Original PR description
Steps to reproduce: 1. Create two expenses for different employees (e.g., Expense A for Employee 1, Expense B for Employee 2). 2. Upload different attachments to each (e.g., 2 files for A, 3 files…
Steps to reproduce:
1. Create two expenses for different employees (e.g., Expense A for Employee 1, Expense B for Employee 2).
2. Upload different attachments to each (e.g., 2 files for A, 3 files for B).
3. Select both expenses and use the 'Post' action to open the posting wizard.
4. Click 'Post' in the wizard.
5. Check the generated journal entries (vendor bills).
Result: Both vendor bills contain all 5 attachments (copies of A's files and copies of B's files).
Issue:
In `_prepare_bills_vals`, `self.attachment_ids` is collected before the
`grouped('employee_id')` loop (see: https://github.com/odoo/odoo/blob/6b7fff433335edf7459f7a6eb5c274c0f4d5d1df/addons/hr_expense/models/hr_expense.py#L1572-L1578).
Since `self` refers to the full expense recordset, `self.attachment_ids` returns
the union of all attachments across every expense. This combined list is then
assigned to every bill created inside the loop, causing attachments from one
employee's expenses to leak into another employee's journal entry.
opw-6056590
Forward-Port-Of: odoo/odoo#258784
Forward-Port-Of: odoo/odoo#256031This update resolves an issue where printing surveys designed without answer capture (scoring_without_answers) would leave out participant responses. Now, all survey data is consistently included when printing, ensuring complete and accurate reports for participant inputs. This improves the reliability of survey data collection and reporting.
Original PR description
Previously, printing surveys of type scoring_without_answers omitted participants' answers, resulting in incomplete and inconsistent reports. This commit ensures answers are always included, regardless of survey type. Task-5407701 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258616
This update resolves an issue where users could encounter access rights errors when creating email campaigns with dynamic fields. The fix prevents a style attribute from being incorrectly applied to 't' nodes during the email conversion process, ensuring proper access controls and campaign functionality.
Original PR description
This commit fixes an unexpected access rights error when users try to add simple dynamic fields allowed by mail_allowed_qweb_expressions to mass_mailing emails. During the convert_inline process, the…
This commit fixes an unexpected access rights error when users
try to add simple dynamic fields allowed by mail_allowed_qweb_expressions
to mass_mailing emails.
During the convert_inline process, the <t t-out=""/> placeholder element
has its style inlined, and attributed to its style attribute.
This style attribute was not filtered out during the safety
check process, resulting in the templating engine believing a disallowed
directive was used.
Steps to reproduce:
- On a fresh 18.0+ install with demo data, login as Marc Demo
- Access the Email Marketing app
- Create a new mailing campaign
- Set sending to Newsletter or Mailing Contact
- Type /field to add a dynamic value
- Set it to Name
- Save the mailing
- An access rights error is raised due to the user not having
group_mail_template_editor permissions and the dynamic placeholder
node having a style attribute
Fix:
T nodes are no longer granted a style attribute during style inlining.
Forward-Port-Of: odoo/odoo#257992
Forward-Port-Of: odoo/odoo#226111This update fixes an issue where portal users couldn't edit messages within the project chatter. The fix prevents a technical error that occurred when attempting to edit a message, ensuring portal users have the full functionality to manage project communications. This improves usability for all users.
Original PR description
## Issue When logged as a portal user, clicking the *Edit* button on a message in the chatter does not do anything. ## Steps to reproduce 1. Install *Project* (`project`) 2. Create a Project P and a…
## Issue When logged as a portal user, clicking the *Edit* button on a message in the chatter does not do anything. ## Steps to reproduce 1. Install *Project* (`project`) 2. Create a Project P and a Task T 3. In the Setting of Project P, click *Share Project* and select a portal user 4. Logged as a portal user, open Task T, send a message in the chatter, then try to edit it by clicking the *Edit* (pencil) button. 5. **Nothing happens, but a traceback appears in the console: _Caused by: TypeError: Cannot read properties of null (reading 'id')_** ## Cause The condition causing this error is the following: https://github.com/odoo/odoo/blob/5cfdc9260653a2b22eb79b16702769928d450932/addons/project/static/src/project_sharing/chatter/composer_patch.js#L9-L13 where `this.thread` is not defined yet. Other conditions in this patch check for `this.thread` before trying to read its `id` [[1](https://github.com/odoo/odoo/blob/5cfdc9260653a2b22eb79b16702769928d450932/addons/project/static/src/project_sharing/chatter/composer_patch.js#L25), [2](https://github.com/odoo/odoo/blob/5cfdc9260653a2b22eb79b16702769928d450932/addons/project/static/src/project_sharing/chatter/composer_patch.js#L32)], which leads to believe that the check was simply forgotten in this condition. opw-6072570 Forward-Port-Of: odoo/odoo#258234
This update resolves an issue where searching for tags on tasks within the portal caused a system crash. The fix ensures that the search functionality correctly applies the necessary domain logic, preventing errors related to missing data fields in the task tag model. This improves the stability and usability of the task management feature for portal users.
Original PR description
Steps to reproduce: -------------------------- 1. Install Project and create a portal user. 2. Create a project and a task with tags added to it. 3. Share the project with the portal user (Edit…
Steps to reproduce:
--------------------------
1. Install Project and create a portal user.
2. Create a project and a task with tags added to it.
3. Share the project with the portal user (Edit access).
4. Log in as the portal user and open the task.
5. Click on the 'Tags' field and select 'Search More'
Issue:
----------
A traceback occurs:
```ValueError: Invalid field project.tags.display_in_project in condition ('display_in_project', '=', True)```
Cause:
----------
The [ProjectTaskRelationalModel](https://github.com/odoo/odoo/blob/75fd7b05766c6789bf311f6a8257b89ecf4f86de/addons/project/static/src/views/project_task_relational_model.js#L4-L7) calls `_processSearchDomain.`
This method automatically appends a domain when 'showSubtasks' is not enabled.
https://github.com/odoo/odoo/blob/75fd7b05766c6789bf311f6a8257b89ecf4f86de/addons/project/static/src/views/project_task_model_mixin.js#L5-L12
When clicking 'Search More' on the 'Tags' field, the same domain is
applied to the **project.tags** model. However, since **project.tags**
does not have the `display_in_project` field, the ORM raises a ValueError.
In portal, only `project.webclient` assets are loaded, causing
ProjectTaskRelationalModel to be used for all relational fields.
In contrast, internal users use the standard RelationalModel, so the
issue does not occur.
Solution:
-------------
Restrict the domain modification in _processSearchDomain to apply only
when the current model is `project.task` and `report.project.task.user`.
opw-5930427
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#258656
Forward-Port-Of: odoo/odoo#249282This update resolves an issue where Point of Sale users were unable to refresh their Viva.com payment tokens, leading to payment processing failures. The fix allows the system to automatically refresh the token, ensuring Viva.com payments continue to function correctly for POS users without requiring administrative privileges.
Original PR description
Point of Sale users only have read access on pos.payment.method. When the stored Viva.com bearer token expires or the API returns invalid credentials, _bearer_token() fetches a new token . That write ran as the POS user and raised an AccessError, although the user was only paying—not editing configuration. Steps to reproduce: ------------------- * Configure Viva.com as payment method. * Open the POS as a user with only Point of Sale / User (not Administrator). * Pay with Viva until the OAuth token must be refreshed (e.g. after expiry or after Viva rejects the current token). > Observation: AccessError: You are not allowed to modify 'Point of Sale Payment Methods' (pos.payment.method) records. Why the fix: ------------ Persist the refreshed viva_com_bearer_token with sudo().write() so the ORM does not require write ACL on pos.payment.method for that internal side effect of an already authorized Viva RPC. opw-6078131 Forward-Port-Of: odoo/odoo#257842
This update fixes an issue where duration calculations were incorrectly rounding minutes and seconds, sometimes resulting in durations being displayed as '60 minutes' instead of '1 hour'. The change ensures durations are accurately formatted for display, improving the user experience.
Original PR description
Before this commit, when the minutes of a duration go through Math.round, it can return 60 minutes in the duration instead of 1h. The same issue go for the seconds too. Now, the formatDuration check if this cases happen and and ajust the result of the rounding if necessary. TASK-6107266 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A recent update to the MRP module introduced a test failure in our builds. This change was caused by a new field (`backorder_ids`) added in the `stock_barcode_mrp` module. This fix ensures the test runs correctly without requiring the enterprise module, maintaining stability and preventing potential disruptions.
Original PR description
The test `test_basic_flow_with_minimal_access_rigths` fails in builds without `stock_barcode_mrp` since the `backorder_ids` mrp.production field is introduced in that module: https://github.com/odoo/enterprise/blob/92c584cc1426ac70f6f77aa8216c17004fa42d35/stock_barcode_mrp/models/mrp_production.py#L10 runbot-242465 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258837
This update resolves an issue where kit products were incorrectly rounding purchase order values due to how the cost share was calculated. The fix ensures that kit product costs are distributed accurately, preventing valuation discrepancies and improving the reliability of purchase order calculations. This impacts how kit products are valued during the ordering process.
Original PR description
### Steps to reproduce: - Create a kit product with 6 bom lines (with a `cost_share` of `0.0%`) - Create + confirm a purchase order for 1 unit of the kit product at 60 - Validate the delivery #### >…
### Steps to reproduce: - Create a kit product with 6 bom lines (with a `cost_share` of `0.0%`) - Create + confirm a purchase order for 1 unit of the kit product at 60 - Validate the delivery #### > 6 layers were created with values 9.99, 10, 10, 10, 10 and 10 There are two issues with purchased kit valuation addressed in this PR: ### Issue 1: Since 8c199f7783527735b35c9fbda334cbdcd55a004f, the product price unit is not supposed to be rounded anymore. However, kit products rely on the rounded `cost_share` field of the `mrp.bom.line` to determine which part of the price of the kit product is handled by which component: https://github.com/odoo/odoo/blob/591102ff37fef1f0b9a946fee3f9d85789653e65/addons/mrp/models/stock_move.py#L245-L246 https://github.com/odoo/odoo/blob/591102ff37fef1f0b9a946fee3f9d85789653e65/addons/purchase_mrp/models/stock_move.py#L28 https://github.com/odoo/odoo/blob/591102ff37fef1f0b9a946fee3f9d85789653e65/addons/purchase_mrp/models/stock_move.py#L38 This leads to inevitable rounding issues where `60/6` does not match `10`: https://github.com/odoo/odoo/blob/591102ff37fef1f0b9a946fee3f9d85789653e65/addons/purchase_mrp/tests/test_purchase_mrp_flow.py#L1273-L1275 simply because 1/6 is represented as `16.67%` and not by `16.66666666666666%`. However, values such as 1/6 can be obtained if you do not set any `cost_share`, since the kit explosion will equidistribute its cost share: https://github.com/odoo/odoo/blob/591102ff37fef1f0b9a946fee3f9d85789653e65/addons/purchase_mrp/models/mrp_bom.py#L42-L48 ### Fix of this issue: We set the digits to `False` for stability reason as the columns have been initiallised as "numeric" values and needs to stay numeric: https://github.com/odoo/odoo/blob/b007b0a4f7e56f6dc44df3154e13745c9981eae3/odoo/fields.py#L1627-L1650 Note that when the digit is Falsy on the field, the field value is formatted to the second digit by the front end: https://github.com/odoo/odoo/blob/3542c542eac5b204e69a8dd6ae1907cfcef60af3/addons/web/static/src/views/fields/float/float_field.js#L58-L76 https://github.com/odoo/odoo/blob/12e453302a950df4d9ee45954f54bdf610888eda/addons/web/static/src/core/utils/numbers.js#L214-L227 In particular, when we create the bom and set the `cost_share`, all possible values will be rounded to the second decimal just as before. This change will therefore only alter the rounding behavior in the DB for equidistributed values such as `16.66666666666666%`. ### Issue 2: While the value of the kit product is exploded and distributed among components, the values of each individual `stock.valuation.layer` are themselves rounded before creation based on the company currency: https://github.com/odoo/odoo/blob/4188436a9e800b062bf9f3b0055cad86acc47e19/addons/stock_account/models/product.py#L240-L255 https://github.com/odoo/odoo/blob/4188436a9e800b062bf9f3b0055cad86acc47e19/addons/stock_account/models/stock_valuation_layer.py#L30 Now, this is problematic since the sum of the values of the layers is expected to match the total value of the purchase order line (that is, the non-rounded value of the components of the purchased kit). ### Fix of this issue: We compute and distribute the rounding error among layers corresponding to the purchased kit product before creation (since layer values are not expected to be modified afterwards), based on the non-rounded computation, since this value should now be exact (as the unit cost is not rounded anymore). opw-5085457 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257411 Forward-Port-Of: odoo/odoo#252034
This update fixes an issue where stock lot generation incorrectly used the standard product UoM (Unit) instead of the sales packaging UoM (Pack of 6). The change ensures that lots are created with the correct quantity based on the product's sales packaging, improving inventory accuracy. This resolves a discrepancy in lot quantities.
Original PR description
Steps to reproduce the issue:
- Enable "Units of Measure" and "Lots & Serial Numbers" in the inventory settings
- Create a storable product "P1":
- Tracking: Lot
- UoM: Unit
- Sales tab: Packagings > Pack of 6
- Create a receipt with 3 packs of 6 of P1
- Mark it as "To Do"
- Open the detailed operations and click on the "Generate Serials/Lots" button:
- First lot: Lot 1
- Quantity per Lot: 3 packs of 6
- Quantity received: 3 packs of 6
- Click on "Generate"
Problem:
A stock move line is created with 3 units instead of 3 packs of 6, because the UoM is not passed from the JavaScript side to the Python side. As a result, the default product UoM (Unit) is used.
opw-5933277
Forward-Port-Of: odoo/odoo#258392This update corrects a technical issue preventing proper import of Nilvera electronic invoices. The team renamed a method in the core Odoo system to align with a recent change. This fix ensures that Nilvera invoices are now correctly processed and imported into Odoo.
Original PR description
# Description of the issue/feature this PR addresses The parent class `account.edi.xml.ubl_20` renamed `_import_fill_invoice_form` to `_import_fill_invoice`. The override in `l10n_tr_nilvera_einvoice` was not updated to match, causing the override to be silently ignored. # Current behavior before PR The `_import_fill_invoice_form` override in `l10n_tr_nilvera_einvoice` is never called because the parent method no longer exists under that name. # Desired behavior after PR is merged The override is renamed to `_import_fill_invoice` to match the parent class, restoring correct behaviour for Nilvera invoice imports. task-id: None --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258752 Forward-Port-Of: odoo/odoo#258097
This update resolves an issue where spreadsheet list views were showing technical field names instead of user-friendly labels. The change ensures that all fields, including list headers, are correctly fetched and displayed in the spreadsheet. This improves the overall user experience and data clarity.
Original PR description
The `ODOO.LIST.HEADER` formula will display the technical name of the field instead of its albels if there are no `ODOO.LIST` formulas for that same field. Since the introduction of chaining fields in list formulas, the fields we want to fetch should be added to `fieldPathsToFetch` in the data source. But this was only done for the `ODOO.LIST` formula, not for `ODOO.LIST.HEADER`. Task: [5900769](https://www.odoo.com/web#id=5900769&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) 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#258400 Forward-Port-Of: odoo/odoo#257087
This update ensures that receipt images, such as the logo and QR codes, are always correctly printed. Previously, images were sometimes missing due to a timing issue where the receipt was generated before the images had fully loaded. This change uses a utility to wait for images to load, guaranteeing a complete and accurate receipt.
Original PR description
The receipt logo (and other images like QR codes) was sometimes missing from the printed ticket. This happened intermittently because the receipt image was being generated (captured from an iframe) before the browser had finished decoding and rendering the logo image within that iframe. This commit updates PosTicketPrinterService to use the waitImages utility, ensuring that all images in the receipt's iframe are fully loaded and rendered before returning the iframe for further processing (printing or canvas capture). --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a previous restriction in how the system identifies Spanish freelancers. Specifically, it now recognizes 'Comunidades de Bienes' (CBs) – entities taxed as freelancers – which were previously excluded due to a limited regex. This ensures accurate fiscal categorization and reporting for these businesses.
Original PR description
In Spain, "Comunidades de Bienes" (VAT starting with 'E') are entities without legal personality that tax via income attribution to their members. For accounting and tax reporting purposes, they must be treated as individuals/freelancers rather than corporations. The current _l10n_es_freelancer logic was too restrictive, only matching standard DNI (8 digits + letter) or NIE (starting with X, Y, Z). This caused CBs to be excluded from freelancer-specific logic, leading to incorrect fiscal categorization in reports and tax modules. The regex has been updated to optionally allow the 'E' prefix while ensuring the rest of the string maintains a valid format, effectively broadening the scope of what the system considers a Spanish freelancer. task-6014192 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258474 Forward-Port-Of: odoo/odoo#253087
This update resolves an issue preventing the creation of product feeds when only one website is enabled in the database. The fix ensures a default website ID is assigned, allowing the system to correctly link product feeds with the appropriate language. This ensures all merchants can utilize product feeds, regardless of their website setup.
Original PR description
Issue: --- Due to this issue, we cannot create a `product.feed` record in single website db. Steps to reproduce: 1- Create a fresh db with single website. 2- Enable Google Merchant Center. 3- Try to create a `website.feed` record. It's not possible to create the record due to language field. Cause: --- `website_id` is only shown in `group_multi_website`. When there is only one website set, there is no default value for the website. `lang_id`'s domain is also `website_id.language_ids`, as a result record creation will fail. opw-6110843 Forward-Port-Of: odoo/odoo#258653
This change removes a restriction that prevented users from accessing tax returns when the GST e-filing feature was disabled. Previously, a warning forced users to enable the feature, which wasn't always necessary. Now, users can access all tax returns regardless of the GST e-filing setting.
Original PR description
BEFORE: - Before this commit, when we disable the gst e-filing feature from the configuration and try to access the tax return view, we are getting blocked by the redirect warning, which suggests…
BEFORE: - Before this commit, when we disable the gst e-filing feature from the configuration and try to access the tax return view, we are getting blocked by the redirect warning, which suggests enabling the gst e-filing feature from the configuration. - Which is not desirable, as there might be some returns that are not related to gst e-filing, which should be accessible by the user. AFTER: - After this commit, removed the RedirectWarning when accessing the tax return view with gst e-filing feature disabled. So now the user can access tax returns without enabling gst e-filing feature. - At the time of setting the fiscal year(generating/refreshing returns automatically), the GSTR returns will not be created. - And at the time of manual GSTR return creation, we are raising UserError to instruct the user about enabling the gst e-filing feature. Related Ent PR: https://github.com/odoo/enterprise/pull/105983 Task-5486586 Forward-Port-Of: odoo/odoo#259029 Forward-Port-Of: odoo/odoo#247216
This update resolves an issue where hidden fields within form blocks added to Masonry blocks were still visible. The fix involves applying a higher priority CSS rule to ensure the 'display: none' style is consistently applied, preventing it from being overridden. This ensures that hidden fields truly disappear as intended.
Original PR description
# How to reproduce - Go to the website editor - Add a Masonry block - Add a Form inner block in the Masonry block - Select any fields of the form - Set it's visibility to Hidden - Save # The problem…
# How to reproduce - Go to the website editor - Add a Masonry block - Add a Form inner block in the Masonry block - Select any fields of the form - Set it's visibility to Hidden - Save # The problem The field is still visible. # Cause When a field has its visibility set to hidden, it is applied the `.s_website_form_field_hidden` CSS class which applies `display: none`. https://github.com/odoo/odoo/blob/995629db3231de944710751c3184bf1b8b1355c7/addons/website/static/src/snippets/s_website_form/001.scss#L26-L28 But that CSS rule is overriden by the masonry's `.s_masonry_block[data-vcss='001'] .row > div` CSS class. https://github.com/odoo/odoo/blob/995629db3231de944710751c3184bf1b8b1355c7/addons/website/static/src/snippets/s_masonry_block/001.scss#L1-L3 https://github.com/odoo/odoo/blob/995629db3231de944710751c3184bf1b8b1355c7/addons/website/static/src/scss/website.scss#L3246 # Proposed solution We set `display: none` with `!important` to prevent it from being overidden. We also need to add `!important` to its edit mode counter-part so that the field is still visible in that mode. opw-6038955 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256100
This update resolves an issue where a task created without a project would trigger an error due to a required field. The fix ensures that widgets correctly handle task creation without unintended dependencies, improving the user experience when creating tasks without a project association.
Original PR description
Example of steps: - Install todo module - Create a todo task (it will be created without project_id) - Go to project -> my task - You can see your previously created todo task (with project set as) -…
Example of steps:
- Install todo module
- Create a todo task (it will be created without project_id)
- Go to project -> my task
- You can see your previously created todo task (with project set as)
- This todo task is marked as Private (since no project)
- Refresh page
- There is now an error because project is now required and you cannot save the current task
This problem is caused by `addFieldDependencies` from `relational_model/utils` Let's simplify the case with this view for example:
```xml
<form>
<field name="foo" widget="my_widget"/>
<field name="name" />
<field name="child_ids">
<list editable="top">
<field name="foo" widget="my_widget"/>
<field name="name" required="1"/>
</list>
</field>
</form>
```
my_widget is defined with these fieldDependencies:
```js
[
{
name: "name",
type: "char",
}
]
```
We have twice the same group of fields (name + foo with my_widget), one in the form view and the other one in the subview list (child_ids).
Currently, we firstly process subviews in `addFieldDependencies`. As "name" field is used in dependencies of `my_widget` and name is already use in the same view (subview list) with required="1" we will change `my_widget` dependencies to be required too by mutating `widget.fieldDependencies`.
And after, we will do the same with the main form view, but as fieldDependencies object from fieldInfo is the same for every instances of the widget everywhere (from form arch parser), we should not alter it because we might accidentally add attributes to certain fields (for example, in our case, making the “name” field in the main view required when it shouldn't be).
This commit fix this case by using a spread operator to shallow copy fieldDependencies items.
opw-6008266
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#258654This update fixes an issue where newly created stock move lines in the picking view would disappear after a refresh. The fix dynamically updates the view to always show all move lines associated with a specific picking, ensuring accurate inventory tracking and preventing data loss.
Original PR description
**Problem:** When creating a new stock.move.line in the moves view (accessed via smart button from a picking), the newly created line disappears after any refresh action (manual refresh or triggering…
**Problem:**
When creating a new stock.move.line in the moves view (accessed via smart button from a picking), the newly created line disappears after any refresh action (manual refresh or triggering "Put in Pack").
**Steps to reproduce:**
1. Open a receipt/picking operation
2. Click on the "Moves" smart button to open the detailed operations view
3. Create a new stock.move.line record
4. Click "Put in Pack" or manually refresh the page
5. Observe that the newly created line disappears
**Current behavior:**
The newly created stock.move.line disappears from the view after refresh, and only reappears if you navigate back to the picking and then return to the moves view.
**Expected behavior:**
The newly created stock.move.line should remain visible in the view after refresh or any action that triggers a view reload.
**Cause of the issue:**
The action_detailed_operations method uses a static domain [('id', 'in', self.move_line_ids.ids)] that captures a snapshot of move line IDs at the moment the action is opened.
https://github.com/odoo/odoo/blob/22ac818970f104a732cc7d24afc440cf0e6d74bd/addons/stock/models/stock_picking.py#L1204-L1212 When a new stock.move.line is created in this view, its ID is not included in the original static list. Any refresh (manual or triggered by operations like "Put in Pack") re-applies this static domain, filtering out the newly created lines because their IDs weren't captured in the initial list.
**Fix:**
Using a dynamic domain based on picking_id ensures all move lines belonging to the picking are always visible, regardless of when they were created. This aligns with the expected behavior of showing "all move lines for this picking" rather than "only the move lines that existed when the view was opened". The relational lookup [('picking_id', '=', self.id)] is re-evaluated on each refresh, automatically including any newly created lines that have the correct picking_id set.
opw-5398620
Forward-Port-Of: odoo/odoo#251619
Forward-Port-Of: odoo/odoo#247170This update fixes an issue where sales orders with fully delivered and returned products incorrectly displayed as 'Fully Invoiced'. The fix ensures the invoice status accurately reflects zero delivered and invoiced quantities after a customer returns a product, preventing incorrect invoicing and improving order accuracy. This resolves a potential discrepancy in reported sales data.
Original PR description
### Issue before this commit: When a sales order with a product invoiced on delivered quantities is fully delivered and then completely returned the delivered quantity is reset to zero. In this…
### Issue before this commit: When a sales order with a product invoiced on delivered quantities is fully delivered and then completely returned the delivered quantity is reset to zero. In this situation, where nothing has been invoiced and nothing remains to be invoiced, the invoice status of the sales order line is incorrectly set to "Fully Invoiced" instead of "Nothing to Invoice". ### Steps to reproduce the issue: 1. Create a new quotation for a storable product. 2. Confirm the order. 3. Validate the delivery of the product. 4. Perform a return for the product 5. Validate that return to simulate a customer return. 6. The sales order details correctly reflect that the delivered quantity and invoiced quantity are both zero. Despite these values—which indicate there is nothing to invoice—the invoice status on the quotation erroneously displays as "fully invoiced". ### Cause of the issue: The invoice status computation includes a fallback logic that marks a sales order line as "invoiced" when all related stock moves are either done or cancelled. However, this logic does not verify whether any quantity remains effectively delivered. As a result, after a full return, even when qty_delivered = 0, the condition is still met and the line is incorrectly marked as fully invoiced. ### Reason to introduce the fix: A fully returned sales order line with no delivered and no invoiced quantity should not be considered fully invoiced. The fix ensures that the fallback to "invoiced" only applies when there is a strictly positive delivered quantity, preventing incorrect invoice status after full customer returns. opw-6014772 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258589 Forward-Port-Of: odoo/odoo#254871
This update resolves a stability issue in the spreadsheet pivot feature. Previously, the system incorrectly relied on a single field property, leading to crashes when encountering certain field types (like JSON). The fix ensures the system correctly identifies unsupported field types, preventing errors and improving the overall reliability of the spreadsheet pivot functionality.
Original PR description
Spreadsheet pivots only do not support all field types. But we were relying only on `field.groupable` to determine if a field could be grouped, which is wrong (eg. JSON fields can be groupable but are not supported). It leads to crashes for fields that were groupable, but didn't have an entry in `pivotNormalizationValueRegistry`. Added a test for all of the field types to ensure we have a correct behavior. Task: 6036075 Task: [6036075](https://www.odoo.com/odoo/2328/tasks/6036075) 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#258883 Forward-Port-Of: odoo/odoo#255571
This update corrects a previous issue where delivery slip prices were incorrectly displayed in the company currency instead of the customer's order currency. The change ensures that commercial invoices and delivery slips accurately reflect the price of goods in the correct currency, improving financial reporting and customer billing. This was caused by a bug introduced in a previous update.
Original PR description
The product value reported on delivery slips may incorrectly use the company currency instead of the order currency. Steps to reproduce: - Enable multi-currency and create a foreign currency - Create a pricelist in the foreign currency - Create and confirm a Sale Order using that pricelist - Add a delivery via carrier (eg. Fedex) - Confirm the delivery and generate the commercial invoice. Issue: The 'sale_price' on the stock move lines is taken in company currency rather than order currency. opw-6104130 Forward-Port-Of: odoo/odoo#259020 Forward-Port-Of: odoo/odoo#258875