Daily updates from Odoo
Navigate
Branch
Friday, March 29, 2019
16 changes
Security fixes and vulnerability patches
This change removes broad attachment read access for portal users, relying instead on specific pages and controllers to grant access only when appropriate. This helps ensure shared documents and digital sale files follow the intended business rules for visibility.
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
New functionality added to Odoo
Online shops can now place a product search bar anywhere on the website, including autocomplete to help shoppers find items faster. The shop page also uses this improved search by default, and website editors can customize it through snippet options.
Original PR description
* website When the e-commerce is installed, you can now add a new snippet that can be dropped anywhere: a search bar to search for products with an autocomplete feature. That snippet is also used as default "/shop" search bar. Finally, you have the possibility to customize the snippet via snippet options. task-1866973 Co-authored-by: qsm-odoo <qsm@odoo.com>
Belgian payroll now includes a dedicated meal voucher report showing eligible vouchers per employee and per month, with export-ready spreadsheet output. The calculation is based on qualifying work days from work entries, helping payroll teams review and apply meal voucher quantities more accurately.
Original PR description
Purpose ======= Add a nice report with meal vouchers. Allow to export a clean xls with meal voucher by employee and by month. Specification ============= A meal voucher should be granted for each normal work day of at least 4 hours. Work days are based on work entries. Pivot view: - rows: employees - columns: number of meal vouchers by month Default filter: this year. An sql view report is added to compute meal voucher for each day. It is used both in the pivot view and in the meal voucher salary rule (through a computed field) as the quantity. Note: In the pivot view, we would like months to be sorted the more recent on the left. However this is currently not supported neither by the pivot view, nor by `read_group` through the `_order`.
Enhancements to existing features
Odoo now avoids recording field-by-field change history when a record is first created, since there is no previous value to compare against. This makes creation messages cleaner and can reduce database work during record creation, while preserving special creation notifications where needed.
Original PR description
*: project, crm, maintenance, helpdesk, It is useless to track fields during create since they have no initial value and future tracking message will show changes on tracked field. We can log a default creation message instead (as it is now if there is no mail_create_nolog context key) This change will implies - less queries when creating record - cleaner creation messages - less occurence of mail_create_nolog ctx key Removing tracking at create could break the creation subtypes mechanism (example: following task creation subtype on project) Instead of using _track_subtype to give a subtype at create, a new _creation_subtype method can be override. If a creation subtype is set on a specific modlel, creation messages will be create by message_post instead of _message_log. We also need to adapt the message_track_post_template in order to keep this feature whithout tracking. Task: #1916916
This change prevents pricelists from being linked to a website that belongs to a different company, reducing configuration errors in multi-company, multi-website setups. It also limits website choices to the relevant company and avoids localization installation failures caused by using the wrong company context.
Original PR description
Before this commit, a pricelist could be easily misconfigured when multi-company and multi-website were both activated. Eg: website 2 is for company 1, create a pricelist and set website 2 and…
Before this commit, a pricelist could be easily misconfigured when
multi-company and multi-website were both activated.
Eg: website 2 is for company 1, create a pricelist and set website 2 and
company 2, it would make no sense and code would not behave as expected.
Now, we prevent this type of misconfiguration by ensuring a pricelist can't
have a website which is from another company than the company set to the
pricelist.
We also filter website in m2o widget to only show company's websites.
Closes #25109
---------------
With this new constraint, l10n module would need to force company:
l10n modules install will change the company currency, creating a pricelist for
that currency. Do not use user's company in that case as module install are
done with OdooBot (company 1).
Step to reproduce:
- Active multi-company and create a new company
- Switch to that company and try to install any l10n module not in EUR or USD
- It will create a new pricelist for that company for that new currency
- It will crash as module install are done as OdooBot which is in company 1.
It will search websites in OdooBot company (self.env.user).
It will then create the pricelist with company 1's website which is
uncompatible with the new company, thus raising the constraint.Blog pages were refreshed to better match the updated look used on forum and event pages, including cleaner cards and improved sidebar styling. The changes also tidy up page structure and social link visuals, making blogs feel more modern and consistent for visitors.
Original PR description
* website Review the blog layouts to - Use cards where necessary to match the forum / event redesign - Use correct bootstrap / HTML + Some minor improvements task-1948882
Sales users and online shoppers now get a smoother product configuration experience, with configuration options appearing directly when selecting products instead of through a separate link. The update also improves product option availability messages, keeps sales order lines editable inline, and adds a dedicated event configuration flow for event-related products.
Original PR description
Task #1891970 Original p. configurator commit d3530eb Main purpose ------------------ The main purpose of this merge is to improve the product configurator usability by removing the "Configure a…
Task #1891970
Original p. configurator commit d3530eb
Main purpose
------------------
The main purpose of this merge is to improve the product configurator usability by removing the "Configure a product" link to make it dynamic based on the selected product.
It also cleans the (website_)sale modules by moving the configurator specific code into its own modules: (website)_sale_product_configurator.
Detailed changes
-----------------------
Here is a more detailed list of the things done in this merge:
- Moved the product_configurator into its own module now that we have a specific option for it.
The option only enables the p. configurator in the SO form.
The e-commerce should always allow customer to configure their products, even if the option is not
checked.
This allows moving some of the code specific to the p. configurator into its own module.
However, a lot of the code has to remain in "sale" module since the e-commerce does not require the
option checked and needs the "configure product" feature in the shop by default.
(This is why the fields "product_custom_attribute_value_ids" and
"product_no_variant_attribute_value_ids" are still in the "sale" module)
- Since we now have the product_configurator in its own module, we can add a bridge module for the
website_sale to override the necessary controller routes in a cleaner way.
This commit adds the bridge module and move files and code around.
- The sale order lines will now always be editable directly from the tree view.
Installing some modules would force a popup form, which leads to a significant drop
in productivity when filling in multiple sale order lines.
- This commit will add an event configurator widget that will open a wizard when the selected product is
'event_ok'.
The widget will allow configuring the 'event_id' and the 'event_ticket_id' fields so that they can be safely
removed from the sale order line tree view.
The user can also edit the event configuration by using a button next to the product_id dropdown field
if the product is configured as 'event_ok'.
- The p. configurator now comes with a widget that is "o2m" like in the SO lines view.
The widget is only used on the added "product_template_id" field on the SO line.
This widget controls the opening of the configuration window and removes the need of a "Configure a
product" button.
The "SectionAndNoteListRenderer" is now cleaned from p. configurator specific code.
The widget is also responsible for handling the configuration provided by the p. configurator form
and applying it on the SO line with a 'field_changed' event that updates all the necessary fields.
- Added support for 'MULTI' and 'DELETE_ALL' operations on X2Many fields in basic_model.js
- 'MULTI' allows to batch multiple operations at once
- 'DELETE_ALL' behaves like 'DELETE' with all the current data of the field
- A message will be displayed when hovering a disabled attribute value's input to explain why it's
disabled.
e.g: Not available with Color: Black
This works for both exclusions within the product and exclusions from a reference product.
- The exclusions will work in both sides, if "black" excludes "metal", "metal" will also exclude "black".
- The "Customizable Desk" and "Conference chair" products now have some stock in the initial inventory
to avoid the stock warning when adding these products in a SO through the product configurator.
- The _name_search of product.template fallbacks by default on product.product
In case there are no product.products yet (dynamic product variants configuration), we need to
include the base product.template _name_search in the results
- The "ProductConfiguratorMixin" was named like that for historical reasons.
It had no direct link to the product configurator anymore since the latter was moved in its own module.
The ProductConfiguratorMixin was renamed to VariantMixin to avoid confusion.
This commit just move files around, there should not be any functional change.
Spec
=======
- remove "configure a product" from sale order lines
When the product configurator is active, replace the product_product_id by a product_template_id
in the sale order line. When we select a template without variants, it sets the variant automatically,
but when we select a product template having variants, it opens the configurator dialog.
- add a widget to modify the product configuration in the sale order line (next to product template field)
- UX improvements:
- Invert image and configuration in the main screen
- If the product doesn't have an image, hide it instead of showing the placeholder (only for first
screen?)
- new independent option in sales settings to activate product configurator.
(same in e-commerce)
- demo data: Change demo data to set Customizable Desk & Conference Chair as make to order
- If only one attribute value that is Custom, don't display radio, selection or even color box
- show exclusions in both sides in the configurator
-> SOLUTION: auto populate other way around (Black not for XL -> XL not for Black)
- don't allow to select an excluded value in the configurator (frustrating).
Replace with an uncomaptibility message on hover (e.g. Not available for Color: Black, Size: XL)
- apply the same mechanism for optional & suggested products: e.g. Not available for Customizable
Table (Color: Black)
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prProduct costs can now be edited when inventory valuation is automated and the costing method is FIFO. This removes an unnecessary restriction for businesses managing FIFO-valued stock while leaving other costing configurations unchanged.
Original PR description
Before this commit, when 'Inventory Valuation' was on 'Automated' and 'Costing Method' was on FIFO, the product cost field wasn't editable anymore. Now, it still editable in this configuration (other configuration aren't affected). Task #1937164 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update reduces unnecessary activity tracking when new records are created across several business areas. It should improve performance and keep communication histories cleaner, especially for projects and mail-related workflows.
Original PR description
Task: https://www.odoo.com/web#id=1916916&action=333&active_id=1519&model=project.task&view_type=form&menu_id=4720
New records in Helpdesk and HR Appraisals now use simpler creation messages instead of listing tracked field changes that had no previous value. This reduces unnecessary database work, keeps activity histories clearer, and stabilizes a Helpdesk CRM assignment test by making tie-breaking deterministic.
Original PR description
*: helpdesk, hr_appraisal It is useless to track fields during create since they have no initial value and future tracking message will show changes on tracked field. We can log a default creation message instead (as it is now if there is no mail_create_nolog context key) This change will implies - less queries when creating record - cleaner creation messages - less occurence of mail_create_nolog ctx key Removing tracking at create could break the creation subtypes mechanism (example: following task creation subtype on project) Instead of using _track_subtype to give a subtype at create, a new _creation_subtype method can be override. If a creation subtype is set on a specific modlel, creation messages will be create by message_post instead of _message_log. Task: #1916916
Resolved issues and error corrections
This fix prevents module updates from overwriting message visibility settings that control whether external users can see certain messages. It helps preserve administrator or system-defined privacy behavior across updates in several Odoo apps.
Original PR description
The mail.message.subtype model contains a field internal, which decides if the messages are visible to external users or not. Such a value should not be overriden at module update, so all subtypes should be in noupdate. opw 1946043 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
This fix prevents an error when users apply the “with tax” filter in accounting reconciliation models. The filter now uses the updated tax field, so users can continue working without encountering a system traceback.
Original PR description
Field tax_id has been replaced by tax_ids by commit https://github.com/odoo/odoo/commit/4d7f0526122084e7be08212bd5ef9935603605ff . The filter had not been adapted properly and raised a traceback, as tax_id did not exist anymore.
Module updates will no longer overwrite message visibility settings that control whether external users can see certain notifications. This helps preserve customer-specific privacy choices in SEPA Direct Debit and Subscriptions.
Original PR description
…ge.subtype as noupdate The mail.message.subtype model contains a field internal, which decides if the messages are visible to external user or not. Such a value should not be overriden at module update, so all subtypes should be in noupdate. opw 1946043
Minor text corrections were made in the salary contract area to clean up typos. This improves clarity for users and maintainers without changing business behavior or workflows.
This change removes a temporary skip so four manufacturing work order tests run again. It helps ensure the manufacturing workflow continues to be checked automatically after the needed upstream update was available.
Original PR description
The 4 tests could not pass without a forward port from saas-12.2.
Code cleanup and technical improvements
A related website sales coupon test was updated to match a renamed class in the system. This keeps automated checks aligned with recent changes and helps ensure coupon behavior on the website remains reliably tested.
Original PR description
See https://github.com/odoo/odoo/pull/30366 task-1866973