Daily updates from Odoo
Friday, February 23, 2024
22 changes · master
Enhancements to existing features
Customer portal pages now show discounts when they exist, without depending on an internal discount setting. This keeps sales, field service, rental, and subscription customer-facing information aligned with recent sales system changes.
Original PR description
Also avoid relying on the discount group in portal templates, if there is a discount, it should be displayed to the customer (and there probably won't be any if discounts are not enabled).
Point of Sale JavaScript files across several country-specific and hardware-related modules were reformatted to follow shared code quality rules. This supports more consistent maintenance and automated checks without changing business functionality.
Original PR description
In this commit we format all the js files in the pos codebase, such that they respect the eslint config used by the test added in the correspoding community branch. Task 3750944 https://github.com/odoo/odoo/pull/153055
Worksheet templates now link to a single company instead of multiple companies, aligning them with related business records. This makes company-specific worksheet setup clearer and more consistent across field service, maintenance, and quality workflows.
Original PR description
This commit's purpose is to transform the company_ids field on worksheet template to Many2one to be coherent with the other models. task-3450204
Planning emails now include options to add shared shifts or full schedules directly to Google Calendar, iCal, or Outlook. This makes it easier for employees to save work assignments in their personal calendars and reduces missed shifts or manual entry.
Original PR description
This commit add an 'add to calendar' button to the 'planning: new schedule' and 'planning: new shift' email templates If a single shift is shared: - By clicking the 'add to Google Calendar' button…
This commit add an 'add to calendar' button to the 'planning: new schedule' and 'planning: new shift' email templates If a single shift is shared: - By clicking the 'add to Google Calendar' button the user is redirected to a Google Calendar URL that will allow him to create an event for the shift - By clicking the 'Add to iCal/Outlook' button the PlanningController will send a .ics file If a planning is shared: - By clicking the 'add to calendar' button the PlanningController will send a single .ics file with every shift in the planning --- ## Details about the implementation ### In planning module In the *mail_template_data* added the buttons which redirects to the corresponding routes: - for planning.planning: the route _/planning/<string:planning_token>/<string:employee_token>.ics_ will return the ics file - for planning.slot: either the direct google calendar URL generated in the planning.py model file or the route _/slot/<string:access_token>.ics_ which will return the ics file In the *Controller* we add the 2 routes to get the corresponding .ics files this is done by creating vobject.calendar and filing it with the corresponding slot information In the *models/planning.py* we create the method planning.slot.get_calendar_from_slot() to fill the *planning slot* vobject given by the 'planning: new shift' email we also create the method planning.planning.get_calendar_from_slot_data() method to fill the *planning planning* vobject given by the 'planning: new schedule' email Those two method are separated because information about the shifts present inside a *Schedule* are given under a different form than a sum slot_ids (a dictionary generated by the method _planning_get()) so the methods that extract the data from the slots are different for a complete schedule and an alone slot (but are named the same: *get_ics_description* and *get_ics_summary*) get_ics_description simply fetches the slot *allocated percentage* *note* and *role* from the slot to later put it in the vobject.calendar description get_ics_summary gets the *resource* and *role* from the slot to put in the vobject.calendar Title also modified the relativedelta import for style reasons ### In project_forecast module inherits the get_ics_description and adds the project name in the description inherits the get_ics_summary and adds the project name in the title (only for planning.planning) ### In sale_planning module in the *controller* added 'partner_id' fetch in the _planning_get() method Created a new planning_planning.py *model* file just to inherit the two ics_summary and description function to add the Sale Order Item and Partner data. inherits the get_ics_description in the planning_slot.py model file Task-3434542 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
WhatsApp-related Odoo apps are now assigned to the dedicated WhatsApp category instead of being placed under Hidden or Tools. This makes these apps easier to find and manage in the app list without changing their business functionality.
Original PR description
before this commit, for whatsapp modules the module category is set as Hidden/Tools and also there is a new module category introduced in whatsapp module as Whatsapp after this commit, the module category for whatsapp modules will be updated to whatsapp
Restaurant POS users can now send all items from a selected category to preparation at once using a new Send button. This makes kitchen coordination faster and helps teams organize order preparation by product category instead of handling items one by one.
Original PR description
**Before the change:** The control buttons in the POS restaurant module did not have an option to send orders in preparation by category. Users were only able to send individual orders to preparation without categorization. **After the change:** After the modification, a new button labeled "Send" with a fire icon was added to the control buttons. This button allows users to select a ategory and send all products within that category to preparation. This enhancement provides a more efficient way to organize and prepare orders in the point of sale system, improving workflow and order management. https://github.com/odoo/odoo/pull/154754
Restaurant staff can now send order items to preparation in separate batches instead of all at once. This helps teams pace kitchen or bar preparation while keeping batch details internal to orders and preparation tickets, not customer receipts.
Original PR description
Allow user to sent items for preparation in batches, one at a time. Batch are only for internal use, only displayed on the order and on prep tickets, not on receipts.
Portal and guest users in Knowledge will no longer see other guests' email addresses. This improves privacy by limiting access to guest contact details to internal users only.
Original PR description
This commit hides the email adresses of other portal users when one of them is connected. This way we keep a certain level of privacy to guest users as only internal users will now be able to see their email adress. task-3753758
This update aligns online account synchronization with the platform’s newer error handling, so missing records are reported consistently. It reduces internal complexity and helps avoid confusing technical errors reaching business workflows.
Original PR description
The CacheMiss error is removed in the #153822 the business code should only get MissingError task-3043340
GSTR1 validation now better interprets GST Portal responses, making it easier to understand and resolve reported data issues. This helps businesses using Indian GST reports and POS GST reporting reduce time spent investigating unclear validation errors.
Original PR description
… Traceability Before This Commit: Managing Inaccurate Data Responses from GSTR Portal After This Commit: Simplifying Error Resolution by Enhancing Decoding of JSON Responses task: 3428326
Resolved issues and error corrections
The barcode batch transfer screen now hides the Confirm button when the user opens the settings menu. This prevents users from seeing or using an action that does not make sense in that context, making the workflow clearer.
Original PR description
To reproduce issue: .go to barcode app .click on batch transfers .click on new .click on engine icon Expected result: confirm button hide Actual result: confirm button is not hide I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr When a user navigate from batch transfer and click on a engine icon the confirm button still showing, it's no makes sense for the current view. Now, when the user click on it, the confirm button will be hide and apear when close that menu. task-3525776
Localized invoice report customizations are now isolated so they do not interfere with each other when multiple country-specific modules are installed. This reduces the risk of invoice layout errors and improves reliability for businesses operating across localizations.
Original PR description
A lot of localisations inherit the account.report_invoice_document template to include custom changes, but without primary="True". The issue is that the template is updated for every localisation. This can lead to errors when, for instance, multiple localisation xpath replace the same div, add a t-else (resulting in multiple ones in a row),... This commit makes all the inherited templates primary="True" and calls them by inheriting the report_invoice(_with_payments) templates instead. This is still a temporary solution, needed because of an issue with the editing in Studio. see odoo/odoo#106776 task id=3100225
Code cleanup and technical improvements
List views in reporting, spreadsheets, and Studio now update their visible columns more reliably when related field values change. This reduces the chance that users see outdated or incorrectly hidden columns after data changes.
Original PR description
*account_reports,spreadsheet_edition,web_studio This commit is the counterpart of odoo/odoo#153998, where we stop computing list's columns in onWillUpdateProps. Using this hook is often a mistake, as it is only called when the component is re-rendered via a parent. With the fine-grained reactivity, it may happen that the renderer is re-rendered directly (e.g. because it is subscribed to a reactive object that changes). In this case, onWillUpdateProps isn't called, so we don't recompute the columns. Before this commit, this doesn't seem to be possible, but by removing the evalViewModifier props, which is the other change done by this commit, the problem occurs: if a column has a conditional column_invisible attribute, and a field used to evaluate the expression changes, the renderer is re-rendered, as it is the one who is subscribed, whereas before it was the parent (the one defining evalViewModifier). Preliminary ref for task 3649970
Task forms and shared task forms now use a common structure, reducing duplicate setup and making future updates easier to manage. The shared task view also gains fields and behavior that were previously only available in the regular task view, creating a more consistent experience.
Original PR description
Before this commit project task and project sharing task form views were quit slimier but so different because both views contains their different code and because of that if we want do something on both of those views then we have to write same code twice so sometimes its hard to keep trace of what we need in both place and what we need in only one place also there is lots of redundant code because we need same thing in both places. This commit Make a common view which contains common data which we need both side and use this view in both places and while doing that also found some things that should be in sharing so this change will add all things we need in project sharing task form view. task-3231686
Miscellaneous changes
The aim of this commit is making sure that we don't have inconstancies between the `GROUP BY` in the `_build_query_group` and the intrastat report line generic id. Indeed, before this commit, the `incoterm code`, the transport code and the `invoice_currency_id` were not included in the generic id. It means that we can have several lines with the same generic id but with different values (for example incoterm code). This commit adds a test that check that all elements in the `GROUP BY`
Original PR description
The aim of this commit is making sure that we don't have inconstancies between the `GROUP BY` in the `_build_query_group` and the intrastat report line generic id. Indeed, before this commit, the `incoterm code`, the transport code and the `invoice_currency_id` were not included in the generic id. It means that we can have several lines with the same generic id but with different values (for example incoterm code). This commit adds a test that check that all elements in the `GROUP BY` (except the `system`, type and` region code`) are used in the generation of the generic id. For the excepted keys, `system` and `type` are already separated. Concerning the `region_code`, its value related to the company, it means that this value is not discriminant. opw-3741658 Forward-Port-Of: odoo/enterprise#57180 Forward-Port-Of: odoo/enterprise#57097
Steps to reproduce: - Create a monthly subscription for a customer with a quantity of 1 - Make an invoice and confirm it - Upsell with 2 quantity - Click on preview in new SO - Total quantity is 5 Issue: Total quantity should be 3 opw-3698971 Forward-Port-Of: odoo/enterprise#55329
Original PR description
Steps to reproduce: - Create a monthly subscription for a customer with a quantity of 1 - Make an invoice and confirm it - Upsell with 2 quantity - Click on preview in new SO - Total quantity is 5 Issue: Total quantity should be 3 opw-3698971 Forward-Port-Of: odoo/enterprise#55329
Starting October 2, 2023, SP-API no longer requires the use of AWS Identity and Access Management (IAM) or AWS Signature Version 4, which means ce don't need to sign SP-API requests with AWS Signature Version 4. At first, this change was just a deprecation. But the SPAPI will now ensure this signature isn't present anymore. task-3534880 Forward-Port-Of: odoo/enterprise#57033 Forward-Port-Of: odoo/enterprise#53839 See also: https://github.com/odoo/upgrade/pull/5723
Original PR description
Starting October 2, 2023, SP-API no longer requires the use of AWS Identity and Access Management (IAM) or AWS Signature Version 4, which means ce don't need to sign SP-API requests with AWS Signature Version 4. At first, this change was just a deprecation. But the SPAPI will now ensure this signature isn't present anymore. task-3534880 Forward-Port-Of: odoo/enterprise#57033 Forward-Port-Of: odoo/enterprise#53839 See also: https://github.com/odoo/upgrade/pull/5723
To reproduce: ============= - On a fresh database without demo data, install the timesheet_grid module - Create new user demo with following settings: - Project: User - Timesheet: User : all timesheets - Connect as demo and go to timesheet - Timesheets > All Timesheets - On list view Delete the Admin's "Internal" timesheets - Refresh > Timesheets > All Timesheets -> Receive error Problem: ======= The timesheet_grid module makes ORM calls with sample data, that don't exist in th
Original PR description
To reproduce: ============= - On a fresh database without demo data, install the timesheet_grid module - Create new user demo with following settings: - Project: User - Timesheet: User : all timesheets - Connect as demo and go to timesheet - Timesheets > All Timesheets - On list view Delete the Admin's "Internal" timesheets - Refresh > Timesheets > All Timesheets -> Receive error Problem: ======= The timesheet_grid module makes ORM calls with sample data, that don't exist in the database. Solution: ========= The timesheet_grid module should not make ORM calls with sample data. opw-3747297 Forward-Port-Of: odoo/enterprise#57025
When we copy activities, we should also copy their mailings, otherwise when we run campaign it cancels emails. task-3465452 Forward-Port-Of: odoo/enterprise#54418
Original PR description
When we copy activities, we should also copy their mailings, otherwise when we run campaign it cancels emails. task-3465452 Forward-Port-Of: odoo/enterprise#54418
Before this commit user was getting traceback on unselecting all measures in pivot view on mobile. Steps to reproduce: - switch to mobile view. - open the pivot view of any report (tested with the 'tasks analysis' one here). - unselect all measures, the traceback will appear. Observed behavior: a traceback is generated. Expected behavior: no traceback, the action helper is displayed After this commit user will not get traceback on unselecting all measures in pivot view on mobil
Original PR description
Before this commit user was getting traceback on unselecting all measures in pivot view on mobile. Steps to reproduce: - switch to mobile view. - open the pivot view of any report (tested with the 'tasks analysis' one here). - unselect all measures, the traceback will appear. Observed behavior: a traceback is generated. Expected behavior: no traceback, the action helper is displayed After this commit user will not get traceback on unselecting all measures in pivot view on mobile. Instead of that an action helper will be displayed. Task-3630703 Forward-Port-Of: odoo/enterprise#54051
Steps to reproduce: Make a delivery operation from the United States to Canada or Puerto Rico. Attept to validate the delivery. A traceback appears: ``` File "/home/odoo/src/enterprise/delivery_ups_rest/models/delivery_ups.py", line 154, in ups_rest_send_shipping result = ups._send_shipping( File "/home/odoo/src/enterprise/delivery_ups_rest/models/ups_request.py", line 406, in _send_shipping request['Shipment']['InvoiceLineTotal'] = { KeyError: 'Shipment' ``` To fix the issue we nee
Original PR description
Steps to reproduce:
Make a delivery operation from the United States to Canada or Puerto Rico. Attept to validate the delivery. A traceback appears:
```
File "/home/odoo/src/enterprise/delivery_ups_rest/models/delivery_ups.py", line 154, in ups_rest_send_shipping
result = ups._send_shipping(
File "/home/odoo/src/enterprise/delivery_ups_rest/models/ups_request.py", line 406, in _send_shipping
request['Shipment']['InvoiceLineTotal'] = {
KeyError: 'Shipment'
```
To fix the issue we need to access `request['ShipmentRequest']['Shipment']` instead of `request['Shipment']`.
opw-3710939
Forward-Port-Of: odoo/enterprise#56891The aim of this commit is handling properly intrastat fields in product template. In this commit (https://github.com/odoo/enterprise/commit/175615a7d715d790e9ba5b0addbde1b964164d5d), we change related fields to computed ones but we forgot to add inverse function to handle the case where users want to modify their `product.template` instead of their `product.product`. opw-3755024 opw-3755048 opw-3755048 Forward-Port-Of: odoo/enterprise#57131
Original PR description
The aim of this commit is handling properly intrastat fields in product template. In this commit (https://github.com/odoo/enterprise/commit/175615a7d715d790e9ba5b0addbde1b964164d5d), we change related fields to computed ones but we forgot to add inverse function to handle the case where users want to modify their `product.template` instead of their `product.product`. opw-3755024 opw-3755048 opw-3755048 Forward-Port-Of: odoo/enterprise#57131