Friday, April 7, 2023
46 changes · master
Security fixes and vulnerability patches
Point of Sale receipt header and footer fields now accept plain text only instead of rendering embedded HTML. This removes a security risk while still allowing businesses to add custom receipt formatting through approved add-on customization.
Original PR description
Currently, the "receipt_header" and "receipt_footer" text fields of the 'pos.config' model can be rendered as html in the receipt screen. We are now removing this feature because it poses some security issues. After this commit, only regular string can displayed as receipt and footer headers. If user wants to introduce custom markup in the headers, they can properly do so by extending the OrderReceipt template from other addons. TASK-ID: 3256208 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
Kanban views now avoid loading tooltip details until a user actually opens a tooltip. This reduces unnecessary background data reads, helping grouped kanban pages load more efficiently without changing the user experience.
Original PR description
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
Resolved issues and error corrections
This fixes an internal database classification issue where certain PostgreSQL system tables could be mistaken for temporary tables. The change improves reliability of core database handling and reduces the risk of incorrect behavior during model or table checks.
Original PR description
17c4f47b0ae7a0eec78b5555d52eeb0bb5e3cc5a updated table_kind to return `pg_class.relkind`, however the semantics are *not* the same, and that was ignored: `relkind = t` is for *toast* tables, not *temporary* tables. In `pg_class` the temporary-ness is instead signaled by `relpersistence` (which applies to both tables and sequences), temp (and unlogged) tables have `relkind = r`. `existing_tables` does that correctly, possibly unwittingly. While at it, upgrade `table_kind` to return an `enum` (whose value is the old discriminant, except for the previously unclassified values which all get shoved into `Other` for now, maybe they should error instead?).
Code cleanup and technical improvements
This update replaces older helper code with standard JavaScript in several Odoo apps. It should make the codebase easier to maintain while keeping existing business features and user workflows unchanged.
Miscellaneous changes
Steps to reproduce: - activate Purchase Receipt - Create a Purchase Receipt Issue: - the edit tax total is not displayed as it is in Bill opw-3253060 Forward-Port-Of: odoo/odoo#117489
Original PR description
Steps to reproduce: - activate Purchase Receipt - Create a Purchase Receipt Issue: - the edit tax total is not displayed as it is in Bill opw-3253060 Forward-Port-Of: odoo/odoo#117489
Odoo now combines similar related-record search conditions into a single database lookup. This reduces duplicated work in the database and can make affected searches faster without changing user-visible results.
Original PR description
Rational -------- Given the following domain: ['|', ('company_id.name', 'like', 'BE'), ('company_id.city', 'like', 'Brussels')] The ORM would generate the following SQL query: SELECT p.id FROM…
Rational
--------
Given the following domain:
['|',
('company_id.name', 'like', 'BE'),
('company_id.city', 'like', 'Brussels')]
The ORM would generate the following SQL query:
SELECT p.id FROM res_partner AS p
WHERE p.company_id IN (
SELECT c.id FROM res_company AS c WHERE name like 'BE'
) OR p.company_id IN (
SELECT c.id FROM res_company AS c WHERE city like 'Brussels'
)
Which is sub-optiomal as the WHERE clause of the two subqueries could be regrouped inside of a single query like so:
SELECT p.id FROM res_partner AS p
WHERE p.company_id IN (
SELECT c.id FROM res_company AS c WHERE (
name like 'BE' OR city like 'Brussels'
)
)
Postgres-wise, it is faster to execute the latter query than the former one. This commit is about optimizing the ORM so that it generates queries where the WHERE clause of compatible subqueries are grouped together.
Technical solution
------------------
The solution explored by this work is to replace the regular relational field accesses (over a dotted path) by a new `any` operator that look as follow:
(relational_field, 'any', domain)
For instance, the above `('company_id.name', 'like', 'BE')` leaf becomes `('company_id', 'any', [('name', 'like', 'BE')]` using `any`.
Having a domain as right-hand-side allow for the combination of the domains of same compatible relations:
[('company_id', 'any', ['|',
('name', 'like', 'BE'),
('city', 'like', 'Brussels')])
Having a combined domains allow for generating optimized SQL queries with minimal changes to the expression parsing algorithm which can only translate a single leaf at a time to SQL. With the new `any` operator, it is still a single leaf but the right-hand-side contains the optimized domain, thus the combined SQL WHERE clause is immediately generated.
Misc
----
About `test_logic`, the new query is equivalent to the former one. We verified it using a truth-table.
task-id-3234671Task boards now only show column creation options where they make sense, preventing users from adding columns that disappear after refresh. Example task stages are also improved so completed-style stages can be folded by default, making project boards clearer and less confusing.
Original PR description
[IMP] project: Improve UX Before this commit: - project tasks view: when we group by company, milestone, customer, worksheet template or any m2o field, the KanbanColumnQuickCreate is displayed for…
[IMP] project: Improve UX Before this commit: - project tasks view: when we group by company, milestone, customer, worksheet template or any m2o field, the KanbanColumnQuickCreate is displayed for that field, we can add a new one or apply examples, but thoses examples are stages. That doesn't make any sens to add them in a project or milestone context, then if you add a new column manually or via the apply examples, it will disappear once refreshing the page. To summarize, stage is the only valid group by that can have the KanbanColumnQuickCreate. - all tasks view: same problem as the previous point + quick creating is also not valid for group by stage as we are in all tasks context that are linked to different project and the examples are mainly applied for a specific project, if you try to add manually or via the examples and refresh they are going to disappear as they are not linked to any project. - my tasks view, same problem for previous point + quick creating when grouping by personal stage is valid but apply examples button is displayed to show stages and if used, it will not add anything, so it should be hidden. - Project Kanban examples stages are all created as not folded. Some users don't know that 'folded in kanban' option is available on the stages, and that tasks in a folded stage are considered as done. After this commit: - project tasks: KanbanColumnQuickCreate and applying examples are only available when grouping by stage. - all tasks: KanbanColumnQuickCreate is not available. - my tasks: KanbanColumnQuickCreate is only available when grouping by personal stages. applying examples is not available. - some example stages are folded.. task-3092925
This update removes a repeated setup instruction in the Website Profile module. It is a small internal cleanup that helps keep the codebase simpler without changing user-facing behavior.
Original PR description
before this commit, the controllers directory is imported twice in the init file. after this commit, the duplicated import is removed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves how Odoo's web interface loads field information used by filters, selectors, and views. It should make these shared interface components easier to maintain and more consistent, with limited direct impact on day-to-day users.
Project burndown chart legends now follow the intended stage order, making progress trends easier to understand. When creating tasks from a stage-grouped view, users now only see projects that use that stage, reducing mistakes and confusion.
Original PR description
Before this commit: - The burndown chart displayed the stage in order of the data fetching which wasn't logical especial for a chart that supposed to represent the evolution of the tasks in the…
Before this commit: - The burndown chart displayed the stage in order of the data fetching which wasn't logical especial for a chart that supposed to represent the evolution of the tasks in the project - When sorting all/my tasks by stage, It was possible to select any project in any quickcreate of the stages which didn't make much sense After this commit: The burndown chart legend is now ordered according to the stage sequence (previously was ordered randomly by comming data) Modified the burndownChartModel, simply makes a RPC to get the stages and sequences then sort the legend elements (one by stage) with it Display only the projects which uses the stage in the dropdown menu of the task kanban quickcreate (when grouping by stage) When sorting by all/my tasks by stage, the quickcreate now only display the projects which contains the stage selected done by adding a domain in the quickcreate form (shoutout to LTU and AUON who actually found the fix) Task-3067445 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The project onboarding guide is now covered by automated testing so changes that could break the user walkthrough are detected earlier. This helps keep the onboarding experience reliable for users learning the project workflow.
Original PR description
This will improve the testing of the onboarding tour - earlier when we change the class and don't update the class in the tour it goes unnoticed - to prevent failure of the tour we called onboarding tour from python to test the flow - Because it helps users to understand the flow so we can let the tour fail task-3235684
Users can now open a menu to see who reacted to a message and which reactions were used. This makes message feedback easier to understand, including on mobile through a long press.
Original PR description
This commit adds a menu to see reaction on a message. It can be accessed from message options or from long press in mobile. Task-2641441
The activity popover in Mail now makes assignees easier to identify by always showing their name and using their avatar instead of a generic icon. Time information is emphasized in bold, helping users scan activity details more quickly.
Original PR description
1. always show the name of the assignee. 2. replace the icon with avatar 3. bold the time info. task-3142628 before:  after:  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now create a task directly from documents in the default Project workspace when the document is not already linked to a task or project. This streamlines turning project-related files into actionable work, matching similar behavior already available in the Internal workspace.
Original PR description
This PR adds a "Create a task" action for the default "Project" workspace. This action, similar to the one in the "Internal" workspace, allows creating a task from a document that is not already linked to a task or a project. Task-2721462
The Planning app now makes the Resources column in role configuration easier to scan. User resources show their avatar, while material resources show a wrench icon, helping planners quickly distinguish resource types.
Original PR description
Before this commit: When displaying Configuration -> Roles in Planning app, the Resources column only displays the name of the resource After this commit: Now if the resource is a user it'll also display it's icon, if it's a material it'll display the wrench icon --- Need a custom modification from web _Many2XAutocomplete_ When the resource is a 'material' not a 'user' i need to be able to display an `fa wrench` icon in place of the employee image in the option dropdown. I need another ORM call than a simple *name_search*. Thus the creation of the function _createPromise_ that will allow me to fetch the **resource.resource** 'resource_type' see https://github.com/odoo/odoo/pull/115943 Task-3072858 ---
Documents Spreadsheet and Web Studio were updated to work with Odoo's newer shared field handling service. This keeps these tools aligned with the core platform change and helps maintain reliable spreadsheet filters and Studio view editing.
This change updates website links across several Odoo Enterprise areas so they use secure HTTPS addresses instead of older HTTP links. It improves trust and consistency when users or customers open documentation, templates, localization references, or timesheet-related links.
Original PR description
update url to https
The field service onboarding tour is now better tested so changes to the guided flow are caught earlier. This helps keep the user onboarding experience reliable, especially when running without demo data.
Original PR description
This will improve the testing of the onboarding tour - earlier when we change the class and don't update the class in the tour it goes unnoticed - to prevent failure of the tour we called onboarding tour from python to test the flow - Because it helps users to understand the flow so we can let the tour fail task-3235684
Grouped kanban views were updated to use a newer shared header component, reducing unnecessary data loading behind the scenes. This keeps social and Studio kanban displays aligned with the latest platform behavior while preserving the user experience.
Planning shifts are now shared and displayed more consistently for employees who do not have user accounts, reducing mismatches between what the back office publishes and what employees can see. The separate Publish action has been removed because Publish & Send covers the same publishing need while also notifying employees by email.
Original PR description
In this commit we change the way that we share the planning slots to non-user employees and the way that we read those slots from the front-end. Prior to this commit, there could be asynchronisities between the back-end and the front-end planning which could lead to slots being visible to some employees and not to others. Also in this commit, we removed the "Publish" button and its functionality from all the view of the planning app. The button was removed as it's functionality was nearly identical to the "Publish & Send" button, which in addition to publishing shifts, also sends an email notification. task-3117580
Helpdesk screens and reports have been refined to make ticket creation, analysis, and mobile dashboard use clearer and easier. These updates improve labels, defaults, visibility of filters, and mobile navigation so support teams can work with less friction.
Original PR description
In this PR following improvements have been made: - add placeholder for the ticket description: Add details about this ticket... - rename 'subject' into 'ticket title' in ticket kanban view quickcreate - unstack the data by default in tickets analysis - remove the group by team in sla status analysis - add scrollbar to mobile ticket overview dashboard - invisible my teams filter according auto assignment is disable on team Task-3052920
Web Studio was adjusted to align with an updated table configuration API. This helps keep customization tools compatible with the wider platform changes, reducing the risk of disruption for users managing apps through Studio.
Original PR description
Cf odoo/odoo#117444
This fixes an unreliable guest messaging scenario where a returning guest could receive a chat notification before the messaging system was ready. The change helps prevent failed automated checks and improves confidence in the stability of public chat channel behavior.
Original PR description
This PR fixes the `19916` issue on the `test_mail_channel_public_page_as_guest` test. The messaging service subscribes to bus notifications before it is fully initialized. This test is composed of two tours. In the first one, the guest joins the channel and receives the "guest has joined the channel" message. Then, the second tour starts and the local storage is cleared. Since the local storage has been cleared, the guest receives this message again, potentially before messaging has been initialized which leads to a `channel_pin` rpc. This RPC fails with `SessionExpired` error and the tour is stuck and eventually, fails.
The mail app no longer automatically opens an OdooBot chat window when a user logs in. This prevents an unnecessary pop-up and keeps the login experience cleaner and less distracting.
Messages without a linked author now display the email sender instead of leaving the sender information blank. This helps users identify who sent a message and reduces confusion when reviewing communications.
The web interface can now customize how related records are fetched for autocomplete dropdowns. This allows business-specific details, such as showing a tool icon for material resources instead of an employee image, making choices clearer for users.
Original PR description
Adding a hook on the promise so it is possible to fetch more specific data on a record, not only the name and id --- Need a custom modification from web Many2XAutocomplete When the resource is a 'material' not a 'user' i need to be able to display an fa wrench icon in place of the employee image in the option dropdown. I need another ORM call than a simple name_search. Thus the creation of the function createPromise that will allow me to fetch the resource.resource 'resource_type' See https://github.com/odoo/enterprise/pull/38027 Task-3072858 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Problem: Indian edi doesn't take into account the round off. Cause: It is looking for rounding lines in `invoice_line_ids`, but since v16, rounding lines are no more invoice lines. `invoice_line_ids` is a subset only consisting of move lines having a `display_type` in `('product', 'line_section', 'line_note')` and a rounding line is a move line with a `display_type == 'rounding'`. Fix: Rounding lines must be searched in `line_ids` and not in `invoice_line_ids`. opw-3202845 Forward
Original PR description
Problem:
Indian edi doesn't take into account the round off.
Cause:
It is looking for rounding lines in `invoice_line_ids`, but since v16, rounding lines are no more invoice lines.
`invoice_line_ids` is a subset only consisting of move lines having a `display_type` in `('product', 'line_section', 'line_note')`
and a rounding line is a move line with a `display_type == 'rounding'`.
Fix:
Rounding lines must be searched in `line_ids` and not in `invoice_line_ids`.
opw-3202845
Forward-Port-Of: odoo/odoo#117517Steps to reproduce: - install website_sale; - with web editor add a language selector to the top bar menu; - go to the page '/shop/cart'; - click on the cart. Issue: A traceback appears. Cause: We use the property of a HTML element without checking its presence. opw-3246545 Forward-Port-Of: odoo/odoo#117880
Original PR description
Steps to reproduce: - install website_sale; - with web editor add a language selector to the top bar menu; - go to the page '/shop/cart'; - click on the cart. Issue: A traceback appears. Cause: We use the property of a HTML element without checking its presence. opw-3246545 Forward-Port-Of: odoo/odoo#117880
[FIX] web_editor: fix some grid layout mistakes/oversights This commit fixes some mistakes that were found in the code of the grid layout option. More precisely: - When a column was dropped near a grid dropzone (so not inside it), and if its height was bigger than the grid, the `rowCount` attribute of the row was not updated to the correct number of rows => there was one extra row. - When we start dragging a grid item, if we do not go over the starting grid at all (it happens if th
Original PR description
[FIX] web_editor: fix some grid layout mistakes/oversights This commit fixes some mistakes that were found in the code of the grid layout option. More precisely: - When a column was dropped near a…
[FIX] web_editor: fix some grid layout mistakes/oversights This commit fixes some mistakes that were found in the code of the grid layout option. More precisely: - When a column was dropped near a grid dropzone (so not inside it), and if its height was bigger than the grid, the `rowCount` attribute of the row was not updated to the correct number of rows => there was one extra row. - When we start dragging a grid item, if we do not go over the starting grid at all (it happens if the move handle is placed outside of the row), the `rowCount` of the starting grid was never updated. This is because the resize is done at the "out" of the dropzone so if there was no "over", it cannot be done. => As a fix, the starting grid is now always resized when we drop the column. - When dropping a grid item inside a non-grid dropzone, its `z-index` CSS property was not removed. - When a grid item becomes a normal column, when dropping it in a non- grid dropzone or when toggling the normal mode, the resize classes (`g-col-lg-*` and `g-height-*`) were not removed from it. - When a normal column becomes a grid item, the padding and offset classes were not removed and the `col-` class was not systematically synchronized with the `g-col-lg-*` class. => The two previous points need to be fixed because after doing multiple drag and drops, the classes could become inconsistent. This happened especially with columns whose width changes a lot between snippets (like with Masonry columns, because of the padding). - When going back to normal mode, the `--grid-item-padding-*` CSS variables were not removed from the row. - In the code, the `rowEl` variable is used to have a reference to the parent of the element we are dragging. In the case of a column, it is a row but when we drag something else, it may not be the case so naming it `rowEl` is quite confusing. => As a fix, this variable is now called `parentEl` and once we have checked that it is a row, a `rowEl` variable is declared, referencing to `parentEl`. - In commit [1], a comment that should have been modified has been forgotten. [1]: https://github.com/odoo/odoo/commit/67d1b078329600efce414974307d74e9fa9ba9fe task-3151207 --- [FIX] web_editor: fix history of a drag and drop after a resize Steps to reproduce: - In a snippet in grid mode, resize a column. - Drag and drop this column in a non-grid dropzone. - Undo. => The column is back in the grid but is still a normal column. The same happens when doing these steps with a normal column to a grid. This happens because the class changes are not observed in these cases. When fixing the drag and drop history in [2], only the style changes were observed because the class changes are automatically recorded. But it is not the case after a resize. This commit fixes that by also observing the class changes. [2]: https://github.com/odoo/odoo/commit/1dfb127f70832aa9e9022ac337af343b7dc17729 task-3151207 Forward-Port-Of: odoo/odoo#114818
partial revert of https://github.com/odoo/odoo/pull/117205 Since there was no link between the odoo instance and the new tab, it was impossible to determine if it was really open and the test afterward would always trigger Forward-Port-Of: odoo/odoo#117903 Forward-Port-Of: odoo/odoo#117877
Original PR description
partial revert of https://github.com/odoo/odoo/pull/117205 Since there was no link between the odoo instance and the new tab, it was impossible to determine if it was really open and the test afterward would always trigger Forward-Port-Of: odoo/odoo#117903 Forward-Port-Of: odoo/odoo#117877
before this commit, in the calendar view, if there is a field of selection field, instead of showing the filter value, currently it is shown as undefined. after this commit, the filter will show the selection value instead of undefined. close: https://github.com/odoo/odoo/issues/112689 close: https://github.com/odoo/odoo/issues/113698 Before: 
Original PR description
before this commit, in the calendar view, if there is a field of selection field, instead of showing the filter value, currently it is shown as undefined. after this commit, the filter will show the selection value instead of undefined. close: https://github.com/odoo/odoo/issues/112689 close: https://github.com/odoo/odoo/issues/113698 Before:  After:  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#116626
add signature CLA for bosaeed 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#117836
Original PR description
add signature CLA for bosaeed 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#117836
Steps to reproduce the bug: - Create a storable product “P1” 1:/ - Select the company A - Create a purchase order: - product: “P1” - vendor: “V1” - confirm the PO The vendor “V1” is added to the supplier list of “P1” 2:/ - Select the company B - Create a purchase order: - product: “P1” - vendor: “V2” - confirm the PO Problem: The vendor “V2” is added to the list but “V1” is deleted from the list in company A The “seller_ids” field is in the “produ
Original PR description
Steps to reproduce the bug: - Create a storable product “P1” 1:/ - Select the company A - Create a purchase order: - product: “P1” - vendor: “V1” - confirm the PO The vendor “V1” is added to the…
Steps to reproduce the bug:
- Create a storable product “P1”
1:/
- Select the company A
- Create a purchase order:
- product: “P1”
- vendor: “V1”
- confirm the PO
The vendor “V1” is added to the supplier list of “P1”
2:/
- Select the company B
- Create a purchase order:
- product: “P1”
- vendor: “V2”
- confirm the PO
Problem:
The vendor “V2” is added to the list but “V1” is deleted from the list in company A
The “seller_ids” field is in the “product.template” model, we try to modify it in the “_add_supplier_to_product” function from the “product_id”(product.product) field which inherits from the “product.Template” model:
https://github.com/odoo/odoo/blob/3b88ed5ea458a37ee4d440f83bab45bd0fb13845/addons/purchase/models/purchase.py#L531-L532
So the function “inverse_related” will be called, in which the function “__set__” will be triggered: In the values, the command for the create will be added but the command for the set will be added as well while it shouldn't. So in the `write_real` function a search will be done to get all `product.supplierinfo` with the same product_tmpl_id:
https://github.com/odoo/odoo/blob/36544651f2049bcf18777091dbf02c9631b33243/odoo/fields.py#L4415-L4417
but as we are in sudo, those of company “A” will also be recovered, so they will be unlinked since they are not in the command.set
opw-3251941
Forward-Port-Of: odoo/odoo#117956In the Invoicing dashboard, the upper-left most scorecard displays the total invoiced amount. The baseline "X unpaid" is wrong. It was displaying the difference between the key value (total invoiced amount) and the unpaid amount. That means if not a single invoice was paid (everything unpaid), it would display "0 unpaid". That obviously not correct. opw-3248761 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117
Original PR description
In the Invoicing dashboard, the upper-left most scorecard displays the total invoiced amount. The baseline "X unpaid" is wrong. It was displaying the difference between the key value (total invoiced amount) and the unpaid amount. That means if not a single invoice was paid (everything unpaid), it would display "0 unpaid". That obviously not correct. opw-3248761 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117953
Incorporate Carlos Carral (carralc) as Vauxoo's contributor. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117426
Original PR description
Incorporate Carlos Carral (carralc) as Vauxoo's contributor. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#117426
Steps to reproduce the bug: - Go on the blog of the website. - Edit. - In the "Customize" section, apply the "List" "Layout" and activate the "Sidebar". -> The sidebar appears at the bottom of the page instead of on the side. The situation looks like this: ```html <div class="container"> <div class="row"> <div class="col"></div> <div class="border-end"></div> <div class="col-12"></div> </div> </div> ``` The bug comes from the fact that the `di
Original PR description
Steps to reproduce the bug: - Go on the blog of the website. - Edit. - In the "Customize" section, apply the "List" "Layout" and activate the "Sidebar". -> The sidebar appears at the bottom of the…
Steps to reproduce the bug:
- Go on the blog of the website.
- Edit.
- In the "Customize" section, apply the "List" "Layout" and activate
the "Sidebar".
-> The sidebar appears at the bottom of the page instead of on the
side.
The situation looks like this:
```html
<div class="container">
<div class="row">
<div class="col"></div>
<div class="border-end"></div>
<div class="col-12"></div>
</div>
</div>
```
The bug comes from the fact that the `div` with the `border-end` class
is inside a `row` class. Due to that, a bootstrap 5 css rule applies
and puts the `width` of the `div.border-end` element to `100%`. Because
the element tries to fill the entire width of the `div.row`, it is put
at the bottom of the page as well as its following elements (in this
case, the sidebar). By applying an automatic width for the
`.border-end` elements inside `.row` element, the border as well as the
sidebar are displayed as wanted.
opw-3217775
Forward-Port-Of: odoo/odoo#116354On the website e-commerce shop the ribbon for the states "Sale, Sold out, Out of stock, New!" have the wrong text color by default making it difficult to read due to contrast ratio. This commit fixes the default text color by using bootstrap class text-bg-* rather than bg-* task-3096035 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#107605
Original PR description
On the website e-commerce shop the ribbon for the states "Sale, Sold out, Out of stock, New!" have the wrong text color by default making it difficult to read due to contrast ratio. This commit fixes the default text color by using bootstrap class text-bg-* rather than bg-* task-3096035 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#107605
The Related Model field in `IrField` view is accepting Related Model name even if it is invalid. And replaces the invalid model name with `_unknown`. This causes KeyError `display_name` when trying to create or read a record. [Stack Trace in Sentry](https://online.sentry.io/issues/3933471439/events/8da256c36b814f7499fb58277a33b470/?project=20801&referrer=merged-item&sort=freq&statsPeriod=90d#exception) To fix that we are adding Validations for the Related Model field when it gets updated f
Original PR description
The Related Model field in `IrField` view is accepting Related Model name even if it is invalid. And replaces the invalid model name with `_unknown`. This causes KeyError `display_name` when trying to create or read a record. [Stack Trace in Sentry](https://online.sentry.io/issues/3933471439/events/8da256c36b814f7499fb58277a33b470/?project=20801&referrer=merged-item&sort=freq&statsPeriod=90d#exception) To fix that we are adding Validations for the Related Model field when it gets updated from UI side. sentry-3933471439 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#112662
doAction does not convert the action help html to markup resulting in the display of an html string. To replicate: - Journal Items List view or Analytic Items - Click a link to the bank recon widget - In bank recon widget, search for something that returns no records - The no content helper displays html string After this PR: By using the doActionButton instead, noConentHelper is marked up and displays correctly. Description of the issue/feature this PR addresses: Current behavi
Original PR description
doAction does not convert the action help html to markup resulting in the display of an html string. To replicate: - Journal Items List view or Analytic Items - Click a link to the bank recon widget - In bank recon widget, search for something that returns no records - The no content helper displays html string After this PR: By using the doActionButton instead, noConentHelper is marked up and displays correctly. 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#118048 Forward-Port-Of: odoo/odoo#117123
This PR fixes the `15350`runbot issue that was due to the websocket subscribe not being properly awaited before logging out.When the log out occurred before the subscribe was received, the `odoo_ws` variable was `None`. Forward-Port-Of: odoo/odoo#117998
Original PR description
This PR fixes the `15350`runbot issue that was due to the websocket subscribe not being properly awaited before logging out.When the log out occurred before the subscribe was received, the `odoo_ws` variable was `None`. Forward-Port-Of: odoo/odoo#117998
doAction does not markup the no content help html resulting in the display of an HTML string. To replicate: - Bank Statement List view - Click on the statement link (reference) to go to the bank recon widget - search for something that returns no records - The no content helper displays html string Forward-Port-Of: odoo/enterprise#39498 Forward-Port-Of: odoo/enterprise#39016
Original PR description
doAction does not markup the no content help html resulting in the display of an HTML string. To replicate: - Bank Statement List view - Click on the statement link (reference) to go to the bank recon widget - search for something that returns no records - The no content helper displays html string Forward-Port-Of: odoo/enterprise#39498 Forward-Port-Of: odoo/enterprise#39016
[FIX] project: fix spacing issue in project task kanban view Before this commit, in the project module, project task kanban view is extended in the project_enterprise module. In that module, planned_date_begin field is added to create space in project kanban view. This commit ensures that if the task has a starting and ending date field then it will be shown to view. task-3231708 Forward-Port-Of: odoo/enterprise#38534
Original PR description
[FIX] project: fix spacing issue in project task kanban view Before this commit, in the project module, project task kanban view is extended in the project_enterprise module. In that module, planned_date_begin field is added to create space in project kanban view. This commit ensures that if the task has a starting and ending date field then it will be shown to view. task-3231708 Forward-Port-Of: odoo/enterprise#38534
Steps to reproduce: - go to Helpdesk / Configuration / Teams; - select a team; - enable Timesheets; - create a project in the project field; - go to Project app; The project created will not be visible - go to Project / Configuration / Settings; - enable Project Stages; Issue: The project will be visible. Solution: Add a domain for the `open_view_project_all_group_stage` action. opw-3253576 Forward-Port-Of: odoo/enterprise#39476 Forward-Port-Of: odoo/enterprise#39355
Original PR description
Steps to reproduce: - go to Helpdesk / Configuration / Teams; - select a team; - enable Timesheets; - create a project in the project field; - go to Project app; The project created will not be visible - go to Project / Configuration / Settings; - enable Project Stages; Issue: The project will be visible. Solution: Add a domain for the `open_view_project_all_group_stage` action. opw-3253576 Forward-Port-Of: odoo/enterprise#39476 Forward-Port-Of: odoo/enterprise#39355
[upg-665618](https://upgrade.odoo.com/web#id=665618&active_id=665618&model=upgrade.request&view_type=form&cids=1&menu_id=107) When we compute the field_name [here](https://github.com/odoo/enterprise/blob/saas-16.2/hr_payroll/report/hr_payroll_report.py#L79) if the `code` contains a space (` `) the query will be syntactically incorrect: ``` 2023-04-04 12:43:02,182 30 ERROR db_665618 odoo.sql_db: bad query: CREATE or REPLACE VIEW "hr_payroll_report" as ( SELECT
Original PR description
[upg-665618](https://upgrade.odoo.com/web#id=665618&active_id=665618&model=upgrade.request&view_type=form&cids=1&menu_id=107) When we compute the field_name…
[upg-665618](https://upgrade.odoo.com/web#id=665618&active_id=665618&model=upgrade.request&view_type=form&cids=1&menu_id=107)
When we compute the field_name
[here](https://github.com/odoo/enterprise/blob/saas-16.2/hr_payroll/report/hr_payroll_report.py#L79) if the `code` contains a space (` `) the query will be syntactically incorrect:
```
2023-04-04 12:43:02,182 30 ERROR db_665618 odoo.sql_db: bad query: CREATE or REPLACE VIEW "hr_payroll_report" as (
SELECT
p.id as id,
CASE WHEN wd.id = min_id.min_line THEN 1 ELSE 0 END as count,
CASE WHEN wet.is_leave THEN 0 ELSE wd.number_of_days END as count_work,
CASE WHEN wet.is_leave THEN 0 ELSE wd.number_of_hours END as count_work_hours,
CASE WHEN wet.is_leave and wd.amount <> 0 THEN wd.number_of_days ELSE 0 END as count_leave,
CASE WHEN wet.is_leave and wd.amount = 0 THEN wd.number_of_days ELSE 0 END as count_leave_unpaid,
CASE WHEN wet.is_unforeseen THEN wd.number_of_days ELSE 0 END as count_unforeseen_absence,
CASE WHEN wet.is_leave THEN wd.amount ELSE 0 END as leave_basic_wage,
p.name as name,
p.date_from as date_from,
p.date_to as date_to,
e.id as employee_id,
e.department_id as department_id,
d.master_department_id as master_department_id,
c.job_id as job_id,
c.work_entry_source as work_entry_source,
e.company_id as company_id,
wet.id as work_code,
CASE WHEN wet.is_leave IS NOT TRUE THEN '1' WHEN wd.amount = 0 THEN '3' ELSE '2' END as work_type,
wd.number_of_days as number_of_days,
wd.number_of_hours as number_of_hours,
CASE WHEN wd.id = min_id.min_line THEN x_l10n_xx_house rent.total ELSE 0 END as x_l10n_xx_house rent,
CASE WHEN wd.id = min_id.min_line THEN pln.total ELSE 0 END as net_wage,
CASE WHEN wd.id = min_id.min_line THEN plb.total ELSE 0 END as basic_wage,
CASE WHEN wd.id = min_id.min_line THEN plg.total ELSE 0 END as gross_wage
FROM
(SELECT * FROM hr_payslip WHERE state IN ('done', 'paid')) p
left join hr_employee e on (p.employee_id = e.id)
left join hr_payslip_worked_days wd on (wd.payslip_id = p.id)
left join hr_work_entry_type wet on (wet.id = wd.work_entry_type_id)
left join (select payslip_id, min(id) as min_line from hr_payslip_worked_days group by payslip_id) min_id on (min_id.payslip_id = p.id)
left join hr_payslip_line pln on (pln.slip_id = p.id and pln.code = 'NET')
left join hr_payslip_line plb on (plb.slip_id = p.id and plb.code = 'BASIC')
left join hr_payslip_line plg on (plg.slip_id = p.id and plg.code = 'GROSS')
left join hr_contract c on (p.contract_id = c.id)
left join hr_department d on (e.department_id = d.id)
left join hr_payslip_line x_l10n_xx_house rent on (x_l10n_xx_house rent.slip_id = p.id and x_l10n_xx_house rent.code = 'House Rent')
GROUP BY
x_l10n_xx_house rent.total,
e.id,
e.department_id,
d.master_department_id,
e.company_id,
wd.id,
wet.id,
p.id,
p.name,
p.date_from,
p.date_to,
pln.total,
plb.total,
plg.total,
min_id.min_line,
c.id)
ERROR: syntax error at or near "rent"
LINE 25: ...WHEN wd.id = min_id.min_line THEN x_l10n_xx_house rent.total...
^
```
This is also a security issue, given that it might be used for injection attacks.
The solution proposed here is to replace any space with an underscore (`_`).
Forward-Port-Of: odoo/enterprise#39347Lines 152 (aeat_mod_303_152) and 158 (aeat_mod_303_158) are missing in odoo V16 formula. They are present in older versions. This commit add them in V16. opw-3252528 Forward-Port-Of: odoo/enterprise#39429
Original PR description
Lines 152 (aeat_mod_303_152) and 158 (aeat_mod_303_158) are missing in odoo V16 formula. They are present in older versions. This commit add them in V16. opw-3252528 Forward-Port-Of: odoo/enterprise#39429
duration_percent field is a stored integer. In postgresql, integer are 4 Bytes long, which create a range of -2147483648 to +2147483647. With a small `duration_expected`, and a big `duration`, we can easily break these limits. This min(max()) limits the range of `duration_percent` between -999999 and 999999. `duration_percent` is only used in some views as an additional field, ex: ) limits the range of `duration_percent` between -999999 and 999999.
`duration_percent` is only used in some views as an additional field, ex:

So the impact should be minimal
---
## How to Reproduce:
https://watch.screencastify.com/v/FHPD1qRVYRirO3QgLzCt
- Create a product P1:
- bom: B1
- component: any (bolt / screw)
- operations:
- worcenter: Assembly Line 1
- default duration: 00:01 minutes
- Create Manufacturing for 1 unit of P1 => PLAN
- On Manufacturing > Work Centers Overview > Assembly Line 1: click on the work order of your MO
- Wait 1 years
- ...
- Ok, just change date_start on the workorder.time_ids to 1 year in the past
- Click on 'Mark as Done'
==> Traceback appear
---
OPW-3253333
Same as: https://github.com/odoo/odoo/pull/117590
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/enterprise#39338
Forward-Port-Of: odoo/enterprise#39301