Wednesday, August 9, 2023
11 changes · master
Enhancements to existing features
Odoo now refreshes the relevant business data more reliably after certain on-screen actions are completed. This helps users see up-to-date information without needing extra manual reloads, reducing confusion and improving workflow continuity.
Website editor drag-and-drop rules are now defined directly on the relevant building blocks, helping prevent users from placing form fields or tables of contents in invalid locations. This makes page editing more reliable and reduces the chance of broken layouts or unsupported content structures.
Original PR description
Since [1] form fields cannot be moved outside of their form and since [2] table of contents cannot be nested within another table of content. Those were implemented with specific references to website classes within web_editor. This commit introduces declarative mechanisms for both situations: - `data-drop-lock-within`: prevents dropping outside the closest parent that matches the specified selector. - `data-drop-exclude-ancestor`: disallows dropping within a parent that matches the specified selector. [1]: https://github.com/odoo/odoo/commit/638d0e875dcb05191fe833d2f889235891dfb46a [2]: https://github.com/odoo/odoo/commit/55339cd6a7b7916184893c0fe27b5483683a047a task-3131384
Odoo users can now see more details about their IAP services and available credits directly from Odoo. They can also update warning settings, access their IAP accounts more easily, and buy credits from the account form.
Original PR description
Description of the issue/feature this PR addresses: Refactoring some IAP functionalities Current behavior before PR: - Very minimal view of IAP accounts Desired behavior after PR is merged: - Information about services available to view from odoo - Can edit some iap services fields from odoo - Change the redirect route of view services to view my IAP accounts --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update supports the broader rollout of voice messages in Discuss chats and channels by ensuring related document workflows are covered in testing. It helps maintain reliability for users sharing and managing documents alongside chat conversations.
Original PR description
Adding voiceMessageService to document's tests. This PR is associated with [PR #117036](https://github.com/odoo/odoo/pull/117036) Task-3240168
Customer records can now store default Mexican e-invoicing values for payment way and Uso. These defaults flow into sales orders and invoices, reducing manual edits and saving time for repeat or subscription customers.
Original PR description
Before it is added 'Payment way' had to be updated manually in invoice. What does it do - 'Payment way' now updatable in sale_order and the set value is used when creating an invoice. - 'Payment way' and 'Uso' are now setable on the customer sheet; the values are used as default when creating a sale order and/or invoice. How does it work Use compute function to set the values, values are recomputed everytime the costumer is modified on the sale order or invoice. The compute functions read the partner_id relevant field values to check if they are set. task-3388110
Resolved issues and error corrections
This fixes an issue where Kanban cards could keep showing old field values after a user changed them through an embedded widget. Business users will see more accurate, up-to-date information in Kanban views without needing to refresh or reopen the page.
Original PR description
Before this commit, calls to record[fieldname][value/raw_value] in the arch of a kanban view did not take into account updates on the Record Datapoint. So if any data in the Record changed, the [raw_value/value] was not modified.
In a custom KanbanRecord, you should never use the record containing the value and raw_value. We will therefore replace this call by using the datapoint record directly.
How to reproduce:
- Have a kanban view with a record.my_field.value and a widget allowing
you to modify the value of my_field.
- Click on the widget
Before this commit:
The value of my_field does not change
After this commit:
The value of my_field has been updated.
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-prCode cleanup and technical improvements
This update standardizes how Odoo manages incoming email aliases across several apps, reducing unused aliases and preventing duplicate or invalid alias issues. It also prepares the platform for future support of company-specific alias domains, which should improve reliability in multi-company setups.
Original PR description
Cancelled point of sale orders are now ignored when closing a POS session, preventing incorrect inventory movements and accounting differences. This helps shops and restaurants close sessions cleanly after deleting saved orders, while still retaining cancelled payment records for reference.
Original PR description
The POS orders can currently be saved in the database, then removed which in reality puts them in the cancelled state. Those cancelled orders are processed when their session is closed, which results…
The POS orders can currently be saved in the database, then removed which in reality puts them in the cancelled state. Those cancelled orders are processed when their session is closed, which results in unbalanced accounting lines and inventory pickings still created. Steps to reproduce: With a shop: - Set a trusted POS for the shop to use - Open a session for that shop - Create an order with 1 product - Click on the "Save" button of the trusted POS feature (in the product screen, above the numpad) - Open the orders with the top right dropdown menu - Click on the trash to delete the previously created and saved order - Close the session With a restaurant: - Open a session - Create an order with 1 product - Click on the "Back" button (to save the order in the database) - Open the orders with the top right dropdown menu - Click on the trash to delete the previously created and saved order - Close the session In both cases, the "Force Close Session" error popup appears. After closing the session with the "Close Session & Post Entries" backend button, the inventory picking is created and validated, accounting Product Sales and Tax lines are created, and there is a "difference at closing POS session". The fix consists of not processing cancelled orders when closing POS sessions. The payments of cancelled orders are still saved in the database, but not taken into account in the sessions closing process. task-id: 3452353
Belgian payroll now correctly includes up to 30 unpaid sick days when calculating 13th month payments. This helps ensure employees receive the correct year-end compensation and reduces payroll correction work.
The subscription report now calculates monthly recurring revenue from each subscription line instead of relying on the overall sales order value. This makes reported revenue more accurate when reviewing subscription performance and line-level details.
Original PR description
MRR on subscription report was computed for lines based on the SO MRR, it's now computed based on the line similar to how it's computed in python `_compute_recurring_monthly`. task-id : 3446444
Kanban cards now refresh field values correctly after a user changes data through an action or widget. This prevents outdated information from remaining visible on cards, improving confidence in day-to-day workflows such as document and social post management.
Original PR description
Before this commit, calls to record[fieldname][value/raw_value] in the arch of a kanban view did not take into account updates on the Record Datapoint. So if any data in the Record changed, the [raw_value/value] was not modified.
In a custom KanbanRecord, you should never use the record containing the value and raw_value. We will therefore replace this call by using the datapoint record directly.
How to reproduce:
- Have a kanban view with a record.my_field.value and a widget allowing
you to modify the value of my_field.
- Click on the widget
Before this commit:
The value of my_field does not change
After this commit:
The value of my_field has been updated.RATIONALE We plan to move from a single alias-domain configuration to a multi company enabled support for alias domains and aliases. First step to prepare this change is to cleanup alias usage…
RATIONALE
We plan to move from a single alias-domain configuration to a multi company
enabled support for alias domains and aliases. First step to prepare this
change is to cleanup alias usage through various Odoo addons.
ALIAS USAGE CLEANUP
Cleanup alias usage and definition. Prepare code to ease future changes and
improvements. Notably
* add a 'alias_email' computed field on the mixin allowing to have the
complete alias email when set, and False in case it is inactive or linked
to an inactive alias domain;
* remove unnecessary alias_id field definition when just the help differs
from the standard definition coming from the 'mail.alias.mixin';
* use fields coming from 'inherits' instead of using alias_id and its sub-
fields; notably use 'alias_display_name' and 'alias_email' fields;
* remove useless custom code and management;
* improve alias parameters support code in configuration parameters;
ALIAS MIXIN WITH OPTIONAL ALIAS_ID
Some models would like to use the 'mail.alias.mixin' but it creates an alias
for each record in the parent model. This leads to a lot of unused aliases
if only a subset of those records really use aliases i.e. a lot of aliases
with 'alias_name' being 'False'.
In this commit we introduce a new mixin 'mail.alias.mixin.optional' that
behaves like the old 'mail.alias.mixin' but without having the 'alias_id'
field required i.e. without the "inherits". When creating a record without
giving an 'alias_name' no alias is created.
In this PR we use it notably to remove custom code in account journal model
and make it more standard. Using it in more models will be done later, but
it is a candidate to cleanup unused aliases related to discuss channel model.
ALIAS NAME SANITIZE
Currently there is a constraint on alias name as we allow only a subset of
valid latin characters in it aka `[a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]`. There
is also an automatic sanitize of alias name at create / write that replaces
any non-word characters by an hyphen. This sanitize is stricter than the
constraint and it is not really coherent.
In this commit we make the sanitize inlined with the constraint, allowing
more characters to go through the 'mail.alias.mixin' cleaning pass notably.
Enforce that void alias names are forced to False to avoid any constraint
issue. Sanitize method is now independent from the check method, to avoid
calling multiple times the sanitization as it is often used for other checks.
MISC
Lint / reorder code, prepare future changes. Add tests, notably for alias
name sanitize and management.
Provide various fixes, see sub commits for more details.
LINKS
After odoo/odoo#130768 and odoo/enterprise#45204 this is another preparation
for multi-company aliases (see odoo/odoo#76734 and odoo/enterprise#20983).
Task-3453343 (Mail: Cleanup Alias Usage)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)