Daily updates from Odoo
Thursday, January 23, 2025
39 changes · master
Enhancements to existing features
Accounting report extra option filters are now configured in one place and displayed automatically. This reduces repetitive setup work when adding new filters, making future report improvements faster and less error-prone.
Original PR description
This is kind of bad that each time we add a new filter in the Extra Option section, we also have to manually override `hasExtraOptionsFilter` to add that new filter. With this commit, some intelligence is given to the extra options filters ,by documenting them in the new getter `filterExtraOptionsData`. So now, the dev that wants to add a new filter will just have to extends this getter. He will not need to extend `hasExtraOptionsFilter` or to create the component manually, this is now done automatically. task-3676838
Payroll users can now manually adjust the rate when editing payslip lines. This gives payroll teams more flexibility to correct or customize individual line calculations without needing a workaround.
Original PR description
There is no reason for the rate to be readonly here. The user may want to change the rate manually on any line. Task: 4432908
Payroll users creating a single refund are now taken directly to the refund form instead of first seeing a list view. This reduces an unnecessary step and makes the refund workflow smoother for routine payroll processing.
Original PR description
- edit `refund_sheet` to return differnt action when the refund is singular to directly open the form view without the intermediate list one Task: 3853337
Demo payroll setups were expanded for Egypt, Jordan, Pakistan, Saudi Arabia, and Turkey. Each localization now includes a sample company, departments, jobs, employees, and contracts, making it easier for users and evaluators to explore payroll features with realistic examples.
Original PR description
*: sa, eg, jo, tr, pk Add a demo company for each payroll localization. Add two demo departments, two demo jobs, two demo employees, and two demo contracts for each payroll localization. task-4184929
Payroll teams can now see the country directly in the other input type list view. This makes it easier to identify and manage payroll input types by location, reducing confusion in multi-country setups.
Original PR description
Added country field to other input type list view. task-4476649
The payroll module now uses clearer default explanation text for salary rule formulas, matching the current rule calculation method. This reduces confusion for payroll administrators when reviewing or editing payslip rule logic.
Original PR description
- edit the default value for `condition_python` and `amount_python_compute` to reflect the change to use result_rules instead of rules Task: 4373086
Payroll setup screens now show only countries linked to the companies currently selected. This reduces irrelevant choices and helps users configure payroll structures, input types, and salary rule categories more accurately.
Original PR description
- Added a domain on the 'country_id' field to display only the countries related to the currently selected companies. task-4045961
Onboarding tours in Helpdesk, Field Service, and Planning were adjusted to make guidance clearer and easier to complete. Tooltips now avoid blocking navigation elements, and Planning better recognizes shift creation from the Gantt calendar.
Original PR description
-*= industry_fsm_report, industry_fsm_sale, planning **In this PR:** - In helpdesk, industry_fsm modules moving some of the tooltips to right and left to avoid overlapping with breadcrumbs. - In planning, if the user creates a shift by selecting a date from the Gantt view instead of clicking on the 'new' button, the step will be validated nonetheless. task-4009124
The Belgian payroll time off type form has been adjusted so the consecutive leave restriction setting appears in the configuration section. This makes the setting easier for payroll administrators to find and manage when configuring time off rules.
Original PR description
- move the `l10n_be_no_consecutive_leaves_allowed`to the configration group in the form Task: 4444037
The appraisal screen now offers a direct print option from the action menu and produces cleaner printed pages when users use browser printing. This makes it easier for HR teams and managers to share or archive appraisal records in a readable format.
Original PR description
- add css to enhance the printed page from the CTRl+P action - add cogMenu item to call the CTRL+P action Task: 4395138
The recruitment signing test flow was updated to match recent menu behavior changes. This helps keep automated checks passing reliably without affecting day-to-day users.
Original PR description
This PR improves the test tour for the recruitment module. As per the task requirements, the default group by in all application menus has been removed, which caused the test tour to fail. To address this, the step that opens the grouped list has been removed from the tour to ensure it passes successfully. task-4222504
When a payslip refund is created, the system now automatically adds a note in the original payslip's activity history referencing the newly created refund payslip. This helps payroll users trace refund actions more easily and reduces confusion during payroll review.
Original PR description
- at payslip refund log a note refrencing the created payslip at the chatter Task: 4441750
Resolved issues and error corrections
Invoice report templates for Brazil, Colombia, and Peru were adjusted to match the updated invoice title structure. This keeps localized invoice and proforma invoice titles displaying and translating correctly for users in those countries.
Original PR description
*l10n_br_edi,l10n_co_dian,l10n_pe_edi In the related community commit, we restructure the invoice titles to allow for correctly translating proforma ones. This commit adapts some l10n templates that inherit the adapted structure. Related to https://github.com/odoo/odoo/pull/189664
Code cleanup and technical improvements
Purchase order line tax information was renamed to follow Odoo's standard naming conventions. This keeps enterprise localization features aligned with the core platform and helps reduce future maintenance issues without changing day-to-day business workflows.
Original PR description
This commit aligns with the community fix to rename the `taxes_id` field on the purchase order line to `tax_ids`, ensuring consistency with standard naming conventions. See Community PR: https://github.com/odoo/odoo/pull/191798
Work schedule fields previously tied to Payroll are being moved to the base resource model so other apps can use them without requiring Payroll to be installed. This reduces unnecessary app dependencies while preserving access to weekly hours, full-time status, and related work-time calculations.
Original PR description
Different modules could use the fields defined in hr_payroll/resource_calendar. However, these modules shouldn't require the payroll app to be installed in order to be able to use those fields. Hence the fields hours_per_week, full_time_required_hours, is_fulltime, work_time_rate over are moved to the base resource model. task-3986658
This update keeps the appraisal survey feature aligned with a related change in the survey system. It helps ensure appraisal surveys continue to work correctly after the underlying survey process was updated.
Original PR description
See related COM PR Task-3742599
Miscellaneous changes
The test breaks https://github.com/odoo/odoo/pull/184482 In 18.0, partner ledger is used for the followup. Keep the test as it still assess we recover the lines correctly. Forward-Port-Of: odoo/enterprise#73668
Original PR description
The test breaks https://github.com/odoo/odoo/pull/184482 In 18.0, partner ledger is used for the followup. Keep the test as it still assess we recover the lines correctly. Forward-Port-Of: odoo/enterprise#73668
- add `alert alert-warning` as classes instead of adding style color to unify the warning visual Task: 4432816 Forward-Port-Of: odoo/enterprise#77596 Forward-Port-Of: odoo/enterprise#77161
Original PR description
- add `alert alert-warning` as classes instead of adding style color to unify the warning visual Task: 4432816 Forward-Port-Of: odoo/enterprise#77596 Forward-Port-Of: odoo/enterprise#77161
**Steps to reproduce:** - Install Accounting - Go to "Accounting / Configuration / Management / Asset Models" - Create an asset model **Issue:** Upon save, the following UserError is raised: "You cannot add or remove bills when the asset is already running or closed." **Cause:** A check has been added to prevent adding bills to a running asset. The check is excluding draft assets but not asset models that are assets in "model" state. **Issue:** Exclude asset models from the chec
Original PR description
**Steps to reproduce:** - Install Accounting - Go to "Accounting / Configuration / Management / Asset Models" - Create an asset model **Issue:** Upon save, the following UserError is raised: "You cannot add or remove bills when the asset is already running or closed." **Cause:** A check has been added to prevent adding bills to a running asset. The check is excluding draft assets but not asset models that are assets in "model" state. **Issue:** Exclude asset models from the check. opw-4479698 Forward-Port-Of: odoo/enterprise#77603 Forward-Port-Of: odoo/enterprise#77472
During the auto bank reconciliation, user error when validating the matching are ignored which hides why a statement line is not matched by a reconciliation model. This PR adds logs including the user error so it can be retrieved from the logs when doing post mortem analysis. opw-4393854 Forward-Port-Of: odoo/enterprise#77459 Forward-Port-Of: odoo/enterprise#77255
Original PR description
During the auto bank reconciliation, user error when validating the matching are ignored which hides why a statement line is not matched by a reconciliation model. This PR adds logs including the user error so it can be retrieved from the logs when doing post mortem analysis. opw-4393854 Forward-Port-Of: odoo/enterprise#77459 Forward-Port-Of: odoo/enterprise#77255
Forward-Port-Of: odoo/enterprise#77584 Forward-Port-Of: odoo/enterprise#76540
Original PR description
Forward-Port-Of: odoo/enterprise#77584 Forward-Port-Of: odoo/enterprise#76540
Before this commit, when searching after an empty order, sometime a finalized order was returned. This commit fixes the issue by only checking open orders. Forward-Port-Of: odoo/enterprise#77458 Forward-Port-Of: odoo/enterprise#77428
Original PR description
Before this commit, when searching after an empty order, sometime a finalized order was returned. This commit fixes the issue by only checking open orders. Forward-Port-Of: odoo/enterprise#77458 Forward-Port-Of: odoo/enterprise#77428
Change the adjustmentType prop type to Number instead of String Forward-Port-Of: odoo/enterprise#73803
Original PR description
Change the adjustmentType prop type to Number instead of String Forward-Port-Of: odoo/enterprise#73803
See the test in this commit. Forward-Port-Of: odoo/enterprise#75381
Original PR description
See the test in this commit. Forward-Port-Of: odoo/enterprise#75381
Following [this commit], the pot file was not updated. We're re-exporting it and meanwhile fixing a small typo. [this commit]: https://github.com/odoo/enterprise/commit/507f8a3df18320f7e899630dfb10da769cf20876 Forward-Port-Of: odoo/enterprise#77562 Forward-Port-Of: odoo/enterprise#77546
Original PR description
Following [this commit], the pot file was not updated. We're re-exporting it and meanwhile fixing a small typo. [this commit]: https://github.com/odoo/enterprise/commit/507f8a3df18320f7e899630dfb10da769cf20876 Forward-Port-Of: odoo/enterprise#77562 Forward-Port-Of: odoo/enterprise#77546
Task URL: https://www.odoo.com/odoo/project.task/4184694 Changes: - Remove fields l10n_sa_bank_account_id, l10n_sa_bank_establishment_code, & l10n_sa_sarie_code from res.config.settings so that it can only be edited in the bank/bank acc. form view. - Show warning if one of the fields (l10n_sa_bank_id, l10n_sa_bank_establishment_code, l10n_sa_sarie_code) is not set. - Adjust width for l10n_sa_bank_account_id Forward-Port-Of: odoo/enterprise#75609
Original PR description
Task URL: https://www.odoo.com/odoo/project.task/4184694 Changes: - Remove fields l10n_sa_bank_account_id, l10n_sa_bank_establishment_code, & l10n_sa_sarie_code from res.config.settings so that it can only be edited in the bank/bank acc. form view. - Show warning if one of the fields (l10n_sa_bank_id, l10n_sa_bank_establishment_code, l10n_sa_sarie_code) is not set. - Adjust width for l10n_sa_bank_account_id Forward-Port-Of: odoo/enterprise#75609
During upgrades to 18.1, if the UoM of the product had been changed, it leads to ``` This product is already being used in posted Journal Entries. If you want to change its Unit of Measure, please archive this product and create a new one. ``` No reason to revert user change during upgrade. Forward-Port-Of: odoo/enterprise#77261
Original PR description
During upgrades to 18.1, if the UoM of the product had been changed, it leads to ``` This product is already being used in posted Journal Entries. If you want to change its Unit of Measure, please archive this product and create a new one. ``` No reason to revert user change during upgrade. Forward-Port-Of: odoo/enterprise#77261
- Avoid duplicating ticket in preparation display when paying a split order. - Inside `pos_preparation_display.sync_from_ui` only call `process_order` if `pos_restaurant` is not installed in the config. Steps to Reproduce: - Add items to the cart and confirm an order. - A preparation is created in the PD (correct behavior). - Go back to the table, split the order, and pay for some lines. - Previously, a duplicate preparation card was created for split lines in the PD (incorrect behavior
Original PR description
- Avoid duplicating ticket in preparation display when paying a split order. - Inside `pos_preparation_display.sync_from_ui` only call `process_order` if `pos_restaurant` is not installed in the config. Steps to Reproduce: - Add items to the cart and confirm an order. - A preparation is created in the PD (correct behavior). - Go back to the table, split the order, and pay for some lines. - Previously, a duplicate preparation card was created for split lines in the PD (incorrect behavior). community PR: https://github.com/odoo/odoo/pull/193692 task-id: 4476871 Forward-Port-Of: odoo/enterprise#77460 Forward-Port-Of: odoo/enterprise#77150
When managing rounding adjustments at the point of sale (either excess or defect), Odoo modifies the amount to be paid accordingly. This requires sending an XML tag `printRecSubtotalAdjustment` to the fiscal printer, which is populated differently based on whether the adjustment increases or decreases the total. Without this tag the printer goes wrong and crashes. The issue is resolved by ensuring the adjustment value is properly quoted in the XML. Proper XML formatting prevents the cra
Original PR description
When managing rounding adjustments at the point of sale (either excess or defect), Odoo modifies the amount to be paid accordingly. This requires sending an XML tag `printRecSubtotalAdjustment` to the fiscal printer, which is populated differently based on whether the adjustment increases or decreases the total. Without this tag the printer goes wrong and crashes. The issue is resolved by ensuring the adjustment value is properly quoted in the XML. Proper XML formatting prevents the crash. Example: ``` Product price: 1.23 Rounding: 0.02 Total: 1.25 ``` or ``` Product price: 1.23 Rounding: -0.03 Total: 1.20 ``` --- CLA signed here: https://github.com/odoo/odoo/pull/186833 Forward-Port-Of: odoo/enterprise#74034
In accounting reports that use periods (like the tax report or profit and loss), the date selector is broken when you try to go back or forward for more than 365 years. The reason is that it was computing the resulting year by looping over the number of years to go back/forward, and each time adding or subtracting the number of years as days. When over 365, it would go back/forward more than 1 year per iteration. This commit fixes the issue. [task-4410887](https://www.odoo.com/odoo/proj
Original PR description
In accounting reports that use periods (like the tax report or profit and loss), the date selector is broken when you try to go back or forward for more than 365 years. The reason is that it was computing the resulting year by looping over the number of years to go back/forward, and each time adding or subtracting the number of years as days. When over 365, it would go back/forward more than 1 year per iteration. This commit fixes the issue. [task-4410887](https://www.odoo.com/odoo/project.task/4410887) Forward-Port-Of: odoo/enterprise#77098
This commit introduces the app icon for the `sale_shopee` module. task-4492921 Forward-Port-Of: odoo/enterprise#77407
Original PR description
This commit introduces the app icon for the `sale_shopee` module. task-4492921 Forward-Port-Of: odoo/enterprise#77407
Before this commit, created moves were not done in batch making the amount of queries go up uselessly. This commit makes that creation in batch and adapts the query counters in tests. task-4299915 Forward-Port-Of: odoo/enterprise#77544 Forward-Port-Of: odoo/enterprise#73145
Original PR description
Before this commit, created moves were not done in batch making the amount of queries go up uselessly. This commit makes that creation in batch and adapts the query counters in tests. task-4299915 Forward-Port-Of: odoo/enterprise#77544 Forward-Port-Of: odoo/enterprise#73145
Forward-Port-Of: odoo/enterprise#77503
Original PR description
Forward-Port-Of: odoo/enterprise#77503
Before this commit, for map views on res.partner (which have attribute res_partner = id), if the user group by a relational field (X2many, many2one), the name of the group is "None" ### Steps to reproduce: Contacts > Map view in the search bar, group by "Salesperson" On the left side of the map view, the group name is "None" ### Expected Name of partner salesperson should be visible instead of "None" original PR : #74205 Forward-Port-Of: odoo/enterprise#76690 Forward-Port-Of: odoo/en
Original PR description
Before this commit, for map views on res.partner (which have attribute res_partner = id), if the user group by a relational field (X2many, many2one), the name of the group is "None" ### Steps to reproduce: Contacts > Map view in the search bar, group by "Salesperson" On the left side of the map view, the group name is "None" ### Expected Name of partner salesperson should be visible instead of "None" original PR : #74205 Forward-Port-Of: odoo/enterprise#76690 Forward-Port-Of: odoo/enterprise#76248
This PR, alongside its community counterpart, changes the behavior of the /file command and its visual aspects. The new result of /file in html field is a static blue box with a link to a file attachment. In order to preserve the original behavior in Knowledge (editable file name, previewable file etc.), this PR makes sure the EmbeddedFile plugin is used instead, which modifies the /file command so that it renders the uploaded file as an embedded component. https://github.com/odoo/odoo/pul
Original PR description
This PR, alongside its community counterpart, changes the behavior of the /file command and its visual aspects. The new result of /file in html field is a static blue box with a link to a file attachment. In order to preserve the original behavior in Knowledge (editable file name, previewable file etc.), this PR makes sure the EmbeddedFile plugin is used instead, which modifies the /file command so that it renders the uploaded file as an embedded component. https://github.com/odoo/odoo/pull/189203 task-3522395 Forward-Port-Of: odoo/enterprise#77373 Forward-Port-Of: odoo/enterprise#75045
Before this commit, the button label displayed as 'Comparison: <previous_period>' (where 'previous_period' was the period preceding the compared period), regardless of the comparison type selected. For example, if comparing October 2024 to previous months, the label would appear as 'Comparison: Sep 2024'. This caused confusion for users when comparing a period to multiple previous ones, as only the last period was displayed in the label. After this commit, the button label is now dynamic and
Original PR description
Before this commit, the button label displayed as 'Comparison: <previous_period>' (where 'previous_period' was the period preceding the compared period), regardless of the comparison type selected.…
Before this commit, the button label displayed as 'Comparison: <previous_period>' (where 'previous_period' was the period preceding the compared period), regardless of the comparison type selected. For example, if comparing October 2024 to previous months, the label would appear as 'Comparison: Sep 2024'. This caused confusion for users when comparing a period to multiple previous ones, as only the last period was displayed in the label. After this commit, the button label is now dynamic and reflects the selected comparison: - When comparing to previous periods: 'Comparison: <periods_number> Previous Periods' - When comparing to the previous period: 'Comparison: Previous Period' - When comparing to the same period in previous years: 'Comparison: <periods_number> Previous Years' - When comparing to the same period in the previous year: 'Comparison: Previous Pear' - When we don't compare to another period/year: 'Comparison' Here, 'periods_number' refers to the number of periods or years being compared. task-id: 4267209 Forward-Port-Of: odoo/enterprise#77179 Forward-Port-Of: odoo/enterprise#73944
This commit solves the undeterministic behavior of the multiple tracebacks test by making sure no race condition can happen when triggering the errors. Forward-Port-Of: odoo/enterprise#77471
Original PR description
This commit solves the undeterministic behavior of the multiple tracebacks test by making sure no race condition can happen when triggering the errors. Forward-Port-Of: odoo/enterprise#77471
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from th
Original PR description
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string >…
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from the search bar: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L685 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/views/product_views.xml#L78 This trick is notably used in order to take the warehouse into account in the computation of the various quantity fields associated to products by generating custom location domains: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L136-L137 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L250-L255 However, since that context key was added via the search bar, it type might be: a string, an integerId or a list of either/both other types. (E.g. to create a list of a string and integer type and select a string and then type a string allowing you to find a real warehouse id that you can select after clicking on the dropdown arrow). Therefore, in order to be properly used, this context key needs to be parsed to be used properly as done in the `_get_domain_locations` for instance. However, the `warehouse` context key is used at many other places in the code, each time expecting a single integer id, and since the warehouse context key is not cleaned from one action to an other you are technically able to provide a string where the code is expecting a an integer. ### MASTER Fix (18.1+): We change the context key of the search view from `location` and `warehouse_id` to `search_location` and `search_warehouse`. In the methods of the `stock/models/product.py` file that are expecting to receive this key either from the python or from the view and treat its various possible types e.g: https://github.com/odoo/odoo/blob/9d0db9f23d9d4a5d77d5fe2146895d62e1e53ed2/addons/stock/models/product.py#L276-L284 (notably used in the `_compute_quantities_dict`) and https://github.com/odoo/odoo/blob/9d0db9f23d9d4a5d77d5fe2146895d62e1e53ed2/addons/stock/models/product.py#L453-L457 we adapt the code to accept both context keys but disregards the search view context key if the python key was set. Examples where the keys are added from the python and are expected to be used by the `_compute_quantity_dict` can be found in: https://github.com/odoo/odoo/blob/9d0db9f23d9d4a5d77d5fe2146895d62e1e53ed2/addons/mrp_subcontracting/report/mrp_report_bom_structure.py#L110 https://github.com/odoo/odoo/blob/9d0db9f23d9d4a5d77d5fe2146895d62e1e53ed2/addons/point_of_sale/models/product_template.py#L218-L219 On the other hand, apart from this file the code is not expecting to receive the search context key and hence the warehouse/location will be extracted from the context using the `location` and `warehouse_id` key. ### Note: This patch will improve other fixes and hopefully prevent yet unoticed error raised by this issue: 903d8beeea5d332e556ef81e231a3b8b4c51cd45 and afa7c6bf25c9de5fc0c878faa29e1cc35bc11805 Community: https://github.com/odoo/odoo/pull/187808 opw-4290818 X-original-commit: 856409a1fb35c6c49fe4c404931587a95d99d370 Forward-Port-Of: odoo/enterprise#75547 Forward-Port-Of: odoo/enterprise#74188
**Specifications:** When creating a spreadsheet in My Drive, access should be restricted to the owner only. When creating a spreadsheet in a Company folder, it should inherit the access permissions of the parent folder. **Task**-4297505 Forward-Port-Of: odoo/enterprise#77302 Forward-Port-Of: odoo/enterprise#74179
Original PR description
**Specifications:** When creating a spreadsheet in My Drive, access should be restricted to the owner only. When creating a spreadsheet in a Company folder, it should inherit the access permissions of the parent folder. **Task**-4297505 Forward-Port-Of: odoo/enterprise#77302 Forward-Port-Of: odoo/enterprise#74179