Monday, September 25, 2023
7 changes · master
Enhancements to existing features
The split payment functionality for Italian public administration e-invoicing has been consolidated into the main Italian e-invoicing module. This simplifies module management and ensures related invoicing features are maintained in one place without changing the business purpose of the functionality.
Original PR description
Module `l10n_it_edi_pa` was created for Split Payment because stored fields couldn't be added to an existing module. We are amending this by merging it into module `l10n_it_edi`. Upgrade PR: odoo/upgrade#5169 Task link: https://www.odoo.com/web#id=3513075&model=project.task task-3513075
Users who cannot access a course are now redirected to the main Slides page instead of seeing a generic error page. This provides a clearer experience by showing the relevant error message in the Slides area and helping users continue browsing courses.
Original PR description
Purpose ======= When a user tries to reach a course, an AccessError can occur when we unslug the URL. Instead of the traditional error page, we want to redirect the users to /slides, and the error will be displayed there. Task-3477630
The self-order setup for mobile and kiosk has been combined into one shared flow, reducing duplicated configuration and code. This should make the feature easier to maintain and improve while keeping the ordering experience consistent across devices.
Original PR description
Previously, the self-order code and parameters were split into two parts mobile and kiosk. Now kiosk and mobile have been merged with each other to simplify maintainability.
Odoo now keeps view context data separate from record field values when evaluating view rules, reducing ambiguity and preventing unintended access patterns. This makes form, list, and kanban behavior more predictable while preserving common user context access such as user and company information.
Original PR description
This commit removes a loophole in the evalContext used in form, list and kanban views to evaluate python expressions (modifiers, domains and contexts). Before this commit, the evalContext was a mix…
This commit removes a loophole in the evalContext used in form,
list and kanban views to evaluate python expressions (modifiers,
domains and contexts). Before this commit, the evalContext was a
mix of different things:
- keys of the current context (which also contained keys from the
user context);
- a key for each field in the view (allowing to use field values);
- a "parent" key in the case of x2many records (allowing to go up
to the parent record values).
- "active_id", "active_ids", "active_model", "current_company_id".
All those keys were mixed in the evalContext, and they could
obviously conflict (e.g. if there was in the context a key which
was also the name of a field).
Even though the evalContext didn't contain an explicit "context"
key, expressions like `context.get("x")` worked. This was because
the python evaluator automatically adds the whole evalContext as
value for the "context" key if this one doesn't exist. This allowed
people to also access field values with `context.get("fieldName")`
and thus bypassing the view validation, which ensures that
everything used in those expressions is either a py builtin
supported by pyjs, a field name which is in the view or some other
whitelisted keys ("uid", "allowed_company_ids"...). Fun fact:
people did it, in a form view that is used on two different models
(product.product and product.template).
With this commit, the context (and user context) keys are no longer
spread into the evalContext. Instead, a "context" key is added.
Two special user context keys can still be accessed directly though,
without doing `context.get("...")`: "uid" and "allowed_company_ids".
The reason why we keep them is simple: those were the two only keys
that could be used directly as they were whitelisted by the view
validation. The client also evaluates domains and contexts coming
from actions and from search view filters. In those cases, the
evalContext is simply the context, and those two keys are widely
used. So it's easier if we know that, e.g. "uid" can be always
directly accessed, whether we're in an action domain, in a search
view or in a form/list/kanban view.
To summarize, accessing a context key must always be done through
`context.get("...")` except for "uid" and "allowed_company_ids",
which can still be accessed directly. This doesn't change from
before. What changes is that a record field can no longer be
accessed with `context.get("...")` (which kind of allowed to bypass
the view validation).Help Center pages are now easier to personalize, with the search field moved out of the banner so teams can edit the page design like other website pages. Publishing controls for help and ticket submission pages have been moved to the standard website toolbar, and teams can more easily open and edit linked knowledge articles.
Original PR description
Impacted modules: - helpdesk - website_helpdesk - website_helpdesk_knowledge This commit introduces various improvements in the Help Center on the website. Banner Edition ============== Purpose:…
Impacted modules: - helpdesk - website_helpdesk - website_helpdesk_knowledge This commit introduces various improvements in the Help Center on the website. Banner Edition ============== Purpose: allow users to customize the help webpage, as it is possible for other web pages Currently the banner of the help center is not editable by the user as it contains a search field. The search fields is moved out of the cover to allow the the user to personalize it. Publish Button ============== Purpose: move the published button to the systray to be coherent with what is usually done in website + we don't need it anymore now that we have 1 help web page per helpdesk team. - help webpage: move the published button to the systray - ticket submission webpage: move the published button to the systray Knowledge Article ================= Purpose: allow users to easily edit the article set on the team from there. - helpdesk.team form view > knowledge feature > display the external link icon next to the article field task-3186564
Resolved issues and error corrections
Cashiers can now close Point of Sale sessions even when the POS setup does not include a cash payment method. This prevents a silent blocking error and keeps store closing workflows running smoothly, especially in databases without demo data.
Original PR description
Since a869ee87f28c517c67d782b132b65aaf86309d1e, the cashier can no longer close a session from the frontend UI if the POS config has not a cash payment method. Steps to reproduce: - Remove any cash payment method from the POS config you want to use - Open a POS session for the previous POS config - Make an order - Try to close the session A (silent) error is raised, the user cannot close the session. This error is particularly noticeable when we don't use demo data (--without-demo=True). The fix consists in correctly checking if there is a cash payment method or not. task-id: 3519547
This fixes an issue where editing a related record in a form could trigger a failed automatic update on the parent record and leave the edited field in an unsafe state. The form now restores the previous valid value, helping users avoid inconsistent data after an error.
Original PR description
When the onchange triggered by an x2m fails on the parent record, we want to reuse a valid value (the one before the onchange).
How to reproduce:
- Go to a form view with an x2m (onchange=true) that contains at least one record
- Edit the record in the x2m
- onchange on parent record fails
Before this commit:
The value is unchanged.
After this commit:
The value of the edited field is replaced by its old value.
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