Daily updates from Odoo
Navigate
Branch
Monday, May 16, 2022
21 changes
Enhancements to existing features
The spreadsheet component in Documents has been updated with usability improvements and fixes. Users can now show or hide sheets, customize menu text colors, and benefit from more accurate display behavior in dashboards and selections.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/cc70b238 [FIX] format: move SET_DECIMAL out of core https://github.com/odoo/o-spreadsheet/commit/04cc1cb5 [FIX] viewport: Don't adjust viewport on Grid selection for all events https://github.com/odoo/o-spreadsheet/commit/1e19489d [REF] renderer: rename col and row variables https://github.com/odoo/o-spreadsheet/commit/72417492 [REF] renderer: use getRect to clip text https://github.com/odoo/o-spreadsheet/commit/6f5c39f1 [REF] renderer: use getRect to compute canvas boxe size https://github.com/odoo/o-spreadsheet/commit/63482f9c [FIX] renderer: correct canvas coordinate in dashboard mode https://github.com/odoo/o-spreadsheet/commit/60663b55 [REF] model: copy dispatched commands https://github.com/odoo/o-spreadsheet/commit/5757f31d [IMP] sheet: allow to show/hide a sheet https://github.com/odoo/o-spreadsheet/commit/3d25784f [IMP] menu: customize text color
Recruiters can now open the offer generation wizard even when a job position has no contract template. Instead of showing an error, the system displays a warning, helping users understand what is missing and continue their workflow more smoothly.
Original PR description
At the moment, if you are in Recrutment and you want to Generate an Offer, if there is no contract template defined on the Job Position, you'll have an error message. After this commit : If the Contract Template is not defined on the Job Position, the wizard will open but will display a warning message instead of the link. TaskID #2837564
Spreadsheet pivot formulas can now refer to grouped values by their position, such as the first date in a group, instead of requiring a specific value. This makes spreadsheet templates and reports easier to reuse when the underlying grouped data changes.
Original PR description
The purpose of this task is to support an equivalent of pivot.position in pivot formulas. It allows to get the nth value of a group by instead of a concrete value. For exemple, `=PIVOT(1, "#create_date", 1) will return the value for the first date we have in the group by. To distingish the concrete value or the positional value, we use the character "#" at the beginning of the field name. Task-id 2802557
This update replaces masculine wording with gender-neutral language in several Odoo modules, including text that may be visible to users. The change supports a more inclusive product experience and helps ensure shared code and demo data avoid reinforcing gender assumptions.
Original PR description
Purpose ======== Change all masculine nouns in Odoo's code to neutral nouns (when possible), making sure that demo data is correctly handled. This is particularly important since our code is open source, and nowadays lots of machine learning models are trained on open source repositories. With this small change we contribute to training more "fair" models, and teaching models that "employee" or "user" != "he". This also affects some text visible by the user, hence making it more inclusive for Odoo users. Task-2853046
Contract templates in the Payroll app are now easier to find and use when preparing employee contracts. This reduces administrative friction for HR teams and helps make contract setup more efficient and consistent.
Original PR description
This commit aims to ease the use of contract templates in the payroll app TaskID #2837703
Luxembourg annual VAT reporting has been merged into the main Luxembourg reports module. This reduces module fragmentation and makes report setup and maintenance simpler for users and administrators.
Original PR description
Merge l10n_lu_reports_annual_vat into l10n_lu_reports so that there is only one module for reports. Task: 2797298
Accounting move lines can now be consistently labeled by purpose, such as cash rounding or display-only lines. This makes financial data easier to filter, report on, and extend across accounting-related workflows.
Original PR description
There is a few use case where we need to filter aml based on some specificities, cash rounding lines, display lines,... This change aims to standardize this by adding a line_type field that would allow specifying the line purpose, making it easy to filter or to extend if needed. Task id #2747764
Resolved issues and error corrections
Spreadsheet document search menu items now show the same visual highlight when selected with a keyboard as they do when hovered with a mouse. This improves consistency and accessibility for users navigating budget, sales, CRM, and dashboard templates.
Original PR description
As result of [1], control panel's search menu-items were highlighted correctly on ':hover', but not using a keyboard. This commit assigns the default <Dropdown> 'focus' class on both circumstances. [1] https://github.com/odoo/odoo/pull/87448 task#2852217
The Planning test data now includes the missing role color value, preventing automated tests from failing unexpectedly. This helps keep quality checks reliable without changing day-to-day user behavior.
Original PR description
Prior to this commit: - The color field was not set on role in the tests data. After this commit: - The color field is added to the role int the tests data and the tests are no more crashing. Related PR: odoo/odoo#91147
This update fixes how the Belgian payroll fleet module calculates the taxable benefit for company cars after a recent related change. It helps ensure payroll results remain accurate and compliant for employees receiving fleet benefits.
Features or functions removed from Odoo
Obsolete handling code was removed from invoice OCR import because related accounting validation now shows warnings instead of blocking errors. This keeps the invoice extraction flow simpler without changing expected user behavior.
Original PR description
Due to the commit "[IMP] account: change hard constraints to displayed warning" done in the community repository, the error raised by the constrains won't occure anymore during the OCR document import which makes the code deleted by this commit obsolete. community-PR: https://github.com/odoo/odoo/pull/81765 enterprise-PR: https://github.com/odoo/enterprise/pull/23275 task: 2612299
Code cleanup and technical improvements
This update aligns several Point of Sale enterprise add-ons with a broader cleanup in the core Point of Sale system. It improves the internal structure of certification, blackbox, and restaurant IoT flows so future changes are easier to maintain, with limited direct impact for day-to-day users.
Original PR description
Adapting the code based on the refactor of the community version https://github.com/odoo/odoo/pull/85956
Miscellaneous changes
`default_get()` of account.tax uses `self.env.company` to determine the default `country_id`. If a user belongs to a company other than the company of the invoice then the new tax is in the right company but the wrong country leading to: ``` File ".../odoo/models.py", line 1367, in _validate_fields check(self) File ".../odoo/addons/account/models/account_move.py", line 2099, in _validate_taxes_country raise ValidationError(_("This entry contains some tax from an unall
Original PR description
`default_get()` of account.tax uses `self.env.company` to determine the default `country_id`. If a user belongs to a company other than the company of the invoice then the new tax is in the right…
`default_get()` of account.tax uses `self.env.company` to determine the
default `country_id`.
If a user belongs to a company other than the company of the invoice
then the new tax is in the right company but the wrong country leading
to:
```
File ".../odoo/models.py", line 1367, in _validate_fields
check(self)
File ".../odoo/addons/account/models/account_move.py", line 2099, in _validate_taxes_country
raise ValidationError(_("This entry contains some tax from an
unallowed country. Please check its fiscal position and your tax
configuration."))
odoo.exceptions.ValidationError: This entry contains some tax from an
unallowed country. Please check its fiscal position and your tax
configuration.
```
This could happen when the public user renewed via
`/my/subscription/<id>` and the public user was in a different company
than the subscription and resulting invoice.
task-2824272
PR note: v14 is not affected by this because it doesn't have country_id on `account.tax`.
Forward-Port-Of: odoo/enterprise#27294`warehouse_id` may point to a record from a different company than the current company list. This does not fail with the standard view because the record warehouse_id is fetched first and it puts its `display_name` in cache before this compute is run. If we create a new form view for res.company that shows _just_ `intercompany_transaction_message` then the view will fail for companies not in the list. A simpler reproducer (which does similarly as the webclient does) is as below: with st
Original PR description
`warehouse_id` may point to a record from a different company than the current company list. This does not fail with the standard view because the record warehouse_id is fetched first and it puts its…
`warehouse_id` may point to a record from a different company than the
current company list. This does not fail with the standard view because
the record warehouse_id is fetched first and it puts its `display_name`
in cache before this compute is run.
If we create a new form view for res.company that shows _just_
`intercompany_transaction_message` then the view will fail for companies
not in the list. A simpler reproducer (which does similarly as the
webclient does) is as below: with standard
sale_purchase_inter_company_rules installed and two companies setup with
`rule_type='purchase'`.
Read first `intercompany_transaction_message` -> fails:
```py
In [1]: self.env["res.company"].with_context(allowed_company_ids=[1]).with_user(self.env.ref('base.user_admin')).browse(2).read(["intercompany_transaction_message","warehouse_id"])
2022-05-16 09:48:46,123 128859 INFO test_15 odoo.addons.base.models.ir_rule: Access Denied by record rules for operation: read on record ids: [2], uid: 2, model: stock.warehouse
```
Read first `warehouse_id` -> OK:
```py
In [1]: self.env["res.company"].with_context(allowed_company_ids=[1]).with_user(self.env.ref('base.user_admin')).browse(2).read(["warehouse_id","intercompany_transaction_message"])
Out[1]:
[{'id': 2,
'warehouse_id': (2, 'Company2'),
'intercompany_transaction_message': 'Generate a draft sales order using warehouse Company2 when a company confirms a purchase order for Company2.'}]
```
This issue was raised during migrations when the list of fields fetched
on the view tests was non-deterministic hence it fails when reading
`intercompany_transaction_message` before `warehouse_id`.
Forward-Port-Of: odoo/enterprise#27354Recently, partner field `unreconciled_aml_ids` was changed to a computed one on 76dc8ed7 and its domain was moved from the field itself to inside the compute method. Unfortunately, that made the domain to be harcoded into that method. This commit moves the domain to a separate method, so it may be inherited or reused. Forward-Port-Of: odoo/enterprise#27163
Original PR description
Recently, partner field `unreconciled_aml_ids` was changed to a computed one on 76dc8ed7 and its domain was moved from the field itself to inside the compute method. Unfortunately, that made the domain to be harcoded into that method. This commit moves the domain to a separate method, so it may be inherited or reused. Forward-Port-Of: odoo/enterprise#27163
Steps to reproduce (on mobile device): - Install stock_barcode module - Create a product A with a barcode - Create a stock picking B - Add at least 10 products then add the product A - Change all 'Demand' quantity to 2 then save - Go to Barcode -> Operations -> Receipt and select the stock picking B - Ensure the product A is not visible (because must scroll) - Scan the barcode of the product A Issue: Not scrolling to or focused on the sc
Original PR description
Steps to reproduce (on mobile device):
- Install stock_barcode module
- Create a product A with a barcode
- Create a stock picking B
- Add at least 10 products then add the product A
- Change all 'Demand' quantity to 2 then save
- Go to Barcode -> Operations -> Receipt and select the stock
picking B
- Ensure the product A is not visible (because must scroll)
- Scan the barcode of the product A
Issue:
Not scrolling to or focused on the scanned product.
Cause:
On mobile, the overflow is on the whole body (instead of the lines
container on desktop).
Solution:
Use body element as anchor if on mobile.
opw-2792384
Forward-Port-Of: odoo/enterprise#27281
Forward-Port-Of: odoo/enterprise#26369The other taxes line in the german profit and loss statement is moved to its correct position in the taxes group. opw-2801602 Forward-Port-Of: odoo/enterprise#26479 Forward-Port-Of: odoo/enterprise#26158
Original PR description
The other taxes line in the german profit and loss statement is moved to its correct position in the taxes group. opw-2801602 Forward-Port-Of: odoo/enterprise#26479 Forward-Port-Of: odoo/enterprise#26158
To reproduce ============ - Turn on Accounting file centralization in Documents > Settings - Sync two unique journals to two unique workspaces - Upload a document for Vendor Bill. Change the Journal in the form view from default (Journal1) to Journal 2. - Documents go to Workspace for Journal 1 and not Journal 2 that was chosen. Purpose ======= when we change the journal, the `write` function doesn't take it in account so the attachment remains in the folder linked to the default
Original PR description
To reproduce ============ - Turn on Accounting file centralization in Documents > Settings - Sync two unique journals to two unique workspaces - Upload a document for Vendor Bill. Change the Journal in the form view from default (Journal1) to Journal 2. - Documents go to Workspace for Journal 1 and not Journal 2 that was chosen. Purpose ======= when we change the journal, the `write` function doesn't take it in account so the attachment remains in the folder linked to the default journal. Specification ============= to solve the issue we update the folder, when the journal was changed. opw-2794392 Forward-Port-Of: odoo/enterprise#27346 Forward-Port-Of: odoo/enterprise#26515
This commit is a follow-up of its community counterpart in PR https://github.com/odoo/odoo/pull/87633 , in which this rule was moved. task-2792884 Counterpart of https://github.com/odoo/odoo/pull/87633 Forward-Port-Of: odoo/enterprise#27309
Original PR description
This commit is a follow-up of its community counterpart in PR https://github.com/odoo/odoo/pull/87633 , in which this rule was moved. task-2792884 Counterpart of https://github.com/odoo/odoo/pull/87633 Forward-Port-Of: odoo/enterprise#27309
Step to reproduce: - Go to timesheet - Create a line and choose a task - Open the task wizard and write in the description Current behaviour: - Timesheet timer are triggered and you cannot write Behaviour after PR: - Timesheet are not trigger and you can write in the note opw-2759838 Forward-Port-Of: odoo/enterprise#27023 Forward-Port-Of: odoo/enterprise#26881
Original PR description
Step to reproduce: - Go to timesheet - Create a line and choose a task - Open the task wizard and write in the description Current behaviour: - Timesheet timer are triggered and you cannot write Behaviour after PR: - Timesheet are not trigger and you can write in the note opw-2759838 Forward-Port-Of: odoo/enterprise#27023 Forward-Port-Of: odoo/enterprise#26881
Created new localization for Kenya, adding Balance Sheet and Profit & Loss Task-2809108 Forward-Port-Of: odoo/enterprise#25903
Original PR description
Created new localization for Kenya, adding Balance Sheet and Profit & Loss Task-2809108 Forward-Port-Of: odoo/enterprise#25903