Daily updates from Odoo
Saturday, July 12, 2025
4 changes · saas-18.4
Resolved issues and error corrections
Creating a bank account with the same number in another company no longer triggers an access error by accidentally checking contacts from a company the user cannot access. This helps multi-company accounting users work within their permitted company without being blocked by unrelated records.
Original PR description
Step to reproduce 1. Createdb with account and contact module install in 18.0 version. 2. create 2 company A and B 3. create partner with both company A and B seperate 4. create a user that have only…
Step to reproduce 1. Createdb with account and contact module install in 18.0 version. 2. create 2 company A and B 3. create partner with both company A and B seperate 4. create a user that have only rights of company B and rights of Accounting/setting groups 5. create a Bank account(Contact->Configuration->Bank Account) with partner A in company A 6. Now login with user B and create a bank account number with same account number. Access error will come. For resolve the access error fetching the correct result according to company so it won't fetch other company result the changes merged last week https://github.com/odoo/odoo/commit/ad6c9001b447f5ffebafe1581512f48708c7d746#diff-22e97cf61c6826e67cd9a3276bdb292e997cb1117ca44c1749c69d5d01931787R69 ``` Access Error Uh-oh! Looks like you have stumbled upon some top-secret records. Sorry, Test B (id=7) doesn't have 'read' access to: - Contact, A (res.partner: 8) Blame the following rules: - res.partner company If you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies. This seems to be a multi-company issue, but you do not have access to the proper company to access the record anyhow. ``` upg-2986193 opw-4876839 tbg-2093 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#218523 Forward-Port-Of: odoo/odoo#217042
A purchase module test now uses a product type that is available without requiring the stock module. This keeps automated checks reliable and helps prevent build failures without changing business functionality.
Original PR description
`is_storable` is defined in `stock`. This test is located in `purchase`, that do not depend on `stock`. We use type='consu' instead. This change ensures that the product is created with the correct type. build_error-229762 Forward-Port-Of: odoo/odoo#218403
This fixes a company consistency issue that could stop Inventory from being installed after Belgian 281.50 tax forms were created for a shared contact. Businesses using Belgian reporting can now continue setting up Inventory without encountering this error.
Original PR description
### Steps to reproduce: - Install l10n_be_reports & account_accountant. - Switch to "BE Company CoA" company. - Add "281.50" tag to "YourCompany" contact. - Accounting > Configuration > Accounting >…
### Steps to reproduce: - Install l10n_be_reports & account_accountant. - Switch to "BE Company CoA" company. - Add "281.50" tag to "YourCompany" contact. - Accounting > Configuration > Accounting > Chart of Accounts > Add "281.50 - Commissions" tag to 600000 account in CoA. - Create a Vendor Bill for partner "YourCompany" selling "[E-COM11]". Date it sometime in 2024 and confirm. - Go to Accounting > Reporting > Open 325 Forms. - Create a new form for 2024. - Verify that there is a line for "YourCompany" in the form and generate the XML. - Try to install Inventory. #### > Traceback due to a company inconsistencies. ### Cause of the issue: When creating the new `l10n_be.form.281.50` form for 2024, we create a record for "BE Company CoA" and which `partner_id` is the `res.partner` "YourCompany" which does not belong to any company (and hence is accessible from any). However, on the `forms_281_50` related field of the `res.partner` model is `check_company=True`: https://github.com/odoo/enterprise/blob/bc36a68b68c3d0296ee18c3a121b029dd418f430/l10n_be_reports/models/res_partner.py#L15-L23 Currently, this did not matter because we did no call of the `_check_company`. But if we where to launch a call of the `_check_company` on "YourCompany" `res.partner` we would raise a company error. Now, when you install stock 2 things happen and provoke this call: 1) The `res.partner` model becomes `_check_company_auto`: https://github.com/odoo/odoo/blob/b7dbf15aa8116e51708bd51b8dda9bd12bba0a9e/addons/stock/models/res_partner.py#L8-L10 2) We create a warehouse for "Your company and update the `partner_data` https://github.com/odoo/odoo/blob/b7dbf15aa8116e51708bd51b8dda9bd12bba0a9e/addons/stock/models/stock_warehouse.py#L143-L145 https://github.com/odoo/odoo/blob/b7dbf15aa8116e51708bd51b8dda9bd12bba0a9e/addons/stock/models/stock_warehouse.py#L315 However, the `property_stock_customer` and `property_stock_supplier` are `check_company` related fields: https://github.com/odoo/odoo/blob/b7dbf15aa8116e51708bd51b8dda9bd12bba0a9e/addons/stock/models/res_partner.py#L12-L17 Therefore, writing on them for a `_check_company_auto` record will launch a call of the `check_company` for all the fields of the record (including the already inconsistent `forms_281_50`): https://github.com/odoo/odoo/blob/b7dbf15aa8116e51708bd51b8dda9bd12bba0a9e/odoo/models.py#L3780-L3781 https://github.com/odoo/odoo/blob/b7dbf15aa8116e51708bd51b8dda9bd12bba0a9e/odoo/models.py#L3867-L3868 ### Fix: We loosen the company check on the `forms_281_50` to not rely on the `_check_company` since the current workflow lead functionally to valid record data's that will always be considered invalid by this method. opw-4845434 Forward-Port-Of: odoo/enterprise#89590
This fix ensures automated bank statement processing uses the correct company context when handling transactions in multi-currency setups. It prevents incorrect currency calculations that could otherwise create unbalanced accounting entries.
Original PR description
Before this commit when the cron was triggered in a multi currency environment, the self.env.company could be a different one from the one of the statement line that would cause problem when computing the suspense amount since the currency_rate would be different. In this example: - 2 companies one in EUR, one in USD - On the USD company do a transaction - the cron is trigger with the self.env.company as the EUR one - It will do a partial reconcile with an invoice in EUR - The amount currency of the suspense will be computed by doing the balance * the currency rate. Since the company is the EUR one, the rate is not one and the open currency amount is wrongly computed - This leads to an error of unbalanced move no task id Forward-Port-Of: odoo/enterprise#89244