Monday, October 21, 2024
21 changes · master
Enhancements to existing features
The spreadsheet list properties panel now lets users edit list names directly, matching the behavior of other Odoo and spreadsheet inputs. This creates a more consistent editing experience and reduces friction when organizing spreadsheet lists.
Original PR description
Currently, in the list properties panel, the name stil uses the old component. Now the name is always editable, just like any other inputs in odoo and spreadsheet Task: 4243854
Resolved issues and error corrections
This fixes a test conflict that happened when the demo social media module was installed alongside Twitter social features. It ensures anti-spam checks can be tested reliably without being disrupted by demo data behavior.
Original PR description
If `social_demo` is installed, it overrides all social method calls to return hardcoded data, and notably does not account for the "anti-spam" system. This means running the anti-spam test with `social_demo` installed can not succeed.
Code cleanup and technical improvements
This update renames an internal WhatsApp message preview field so the web interface matches the server-side naming. It helps keep the codebase consistent and easier to maintain, with no expected change for end users.
Original PR description
https://github.com/odoo/odoo/pull/184311
Miscellaneous changes
Spotted by runbot in master by the `self-in-iter` semgrep check. Forward-Port-Of: odoo/enterprise#72335
Original PR description
Spotted by runbot in master by the `self-in-iter` semgrep check. Forward-Port-Of: odoo/enterprise#72335
This change updates inter-company sales and purchasing tests so they no longer assume that multi-currency mode is enabled. It helps ensure the tests run reliably in databases with only one active currency, reducing false failures in validation environments.
Original PR description
Both modules have tests with an unstated dependency on the multi-currency mode, as they unconditionally try setting currencies into forms.
They will pass if they run in a multi-currency-enabled database[^1] but if the context is non-multi-currency (e.g. no l10n module is explicitly installed so only `l10n_us` is present and USD is the only currency) then they fail with
can't write on invisible field 'currency_id'
[^1]: generally the case on runbot where `l10n_be` is ~always
installed, which enables EUR, which being a second currency
automatically enables multi-currencyThe eSignature module code has been reorganized into smaller, more focused files. This does not change how the feature works for users, but it makes the code easier to maintain and safer to update in the future.
Original PR description
## Purpose This PR refactors the `sign` module by splitting large model files (`sign_request.py`, `sign_template.py`, `sign_send_request.py` and `test_sign_controller.py`) into class-specific files. This improves the maintainability and readability of the codebase. ## Changes - Split large model files into smaller, class-focused files. - Improved modularity by ensuring each class resides in its own dedicated file. This refactor does not introduce any functional changes but significantly improves the structure and organization of the code.
Several business modules were updated to use Odoo's newer internal reporting method before the older one is retired. This keeps features such as subscriptions, payroll, helpdesk, field service, stock barcode, and accounting-related workflows maintainable without changing day-to-day user behavior.
Original PR description
read_group will be deprecated soon, replace read_group usage from the the business code with _read_group. https://github.com/odoo/odoo/pull/184153
Before the commit: - The fields such as `padding_time`, `extra_hour`, and `extra_day` did not update since the adoption of `ir.default` in the related onchange methods. After the commit: - Removed the related attribute from the fields, and converted them into computed fields. The compute methods now retrieve the company-specific default values using the _get method from `ir.default`. - Added inverse methods to ensure that changes made to these fields are saved back to `ir.default`, allowin
Original PR description
Before the commit: - The fields such as `padding_time`, `extra_hour`, and `extra_day` did not update since the adoption of `ir.default` in the related onchange methods. After the commit: - Removed the related attribute from the fields, and converted them into computed fields. The compute methods now retrieve the company-specific default values using the _get method from `ir.default`. - Added inverse methods to ensure that changes made to these fields are saved back to `ir.default`, allowing company-specific default values to be updated as expected. - This change allows for the correct fetching and updating of default values, ensuring that fields can be modified and persisted properly. Forward-Port-Of: odoo/enterprise#70838
Before this commit, when the user has more than one project linked to a same stage then a traceback will be raised when the user will group by stage in `/my/tasks` portal view. This commit reviews the visibility condition of the Documents button in that portal list view and makes sure the project variable in the template contains either no project or just one project to avoid having a traceback because `project` variable contains more than one project. And so, in `/my/tasks` view, the Documen
Original PR description
Before this commit, when the user has more than one project linked to a same stage then a traceback will be raised when the user will group by stage in `/my/tasks` portal view. This commit reviews…
Before this commit, when the user has more than one project linked to a same stage then a traceback will be raised when the user will group by stage in `/my/tasks` portal view. This commit reviews the visibility condition of the Documents button in that portal list view and makes sure the project variable in the template contains either no project or just one project to avoid having a traceback because `project` variable contains more than one project. And so, in `/my/tasks` view, the Documents button should not be displayed when the view is grouped by Stage. Steps to reproduce the issue ============================ 1. Install documents_project 2. Create 2 projects 3. Go to Tasks stage menu and set the both projects in the first stage (create new stage if there is no stage displayed in that menu) 4. create a task for each project with that first stage 5. Go to `/my/tasks` portal list view 6. Group by `Stage` Actual Behavior --------------- A traceback is raised because there is more than one project contained inside `project` variable. Expected Behavior ----------------- The documents button should not be displayed in `/my/tasks` since we could have more than one project in that view. task-4239772 Forward-Port-Of: odoo/enterprise#71984
Reproduce: * create an asset * duplicate it, and change the journal * in list view, compute the depreciation * in list view, confirm Traceback because we try to get the lock date related to multiple journals. Forward-Port-Of: odoo/enterprise#71103
Original PR description
Reproduce: * create an asset * duplicate it, and change the journal * in list view, compute the depreciation * in list view, confirm Traceback because we try to get the lock date related to multiple journals. Forward-Port-Of: odoo/enterprise#71103
Currently we search for the 'us' chart template but we should search for the 'generic_coa' instead. This commit corrects it. task-None Forward-Port-Of: odoo/enterprise#71908
Original PR description
Currently we search for the 'us' chart template but we should search for the 'generic_coa' instead. This commit corrects it. task-None Forward-Port-Of: odoo/enterprise#71908
Before this commit, it was possible to fill two date fields in two different date formats in the same document. This happened because the date format was dependent on the location of the user who is signing. After this commit, date fields will be auto-filled by a fixed date format, that format depends on the language of the company's partner. Task: 3930358 Forward-Port-Of: odoo/enterprise#71864 Forward-Port-Of: odoo/enterprise#64591
Original PR description
Before this commit, it was possible to fill two date fields in two different date formats in the same document. This happened because the date format was dependent on the location of the user who is signing. After this commit, date fields will be auto-filled by a fixed date format, that format depends on the language of the company's partner. Task: 3930358 Forward-Port-Of: odoo/enterprise#71864 Forward-Port-Of: odoo/enterprise#64591
Traceback: ``ValueError: Expected singleton: res.currency(1, 125)`` At [1], mistakenly written self instead of rec [1]- https://github.com/odoo/enterprise/blob/e9a2ae47fcdf98635dbdc7a55cb9ed1bfa1f0f5e/account_iso20022/models/account_payment.py#L41-L43 sentry-6000953570 Forward-Port-Of: odoo/enterprise#72264
Original PR description
Traceback: ``ValueError: Expected singleton: res.currency(1, 125)`` At [1], mistakenly written self instead of rec [1]- https://github.com/odoo/enterprise/blob/e9a2ae47fcdf98635dbdc7a55cb9ed1bfa1f0f5e/account_iso20022/models/account_payment.py#L41-L43 sentry-6000953570 Forward-Port-Of: odoo/enterprise#72264
This allows to rely on the framework's inheritance instead of python's inheritance. Indeed, there was an issue where `sale_subscription` overrides were ignored by the framework. This change applies to both the product and combo configurators (and extracts any duplicated logic into shared methods). task-4263961 Community PR: https://github.com/odoo/odoo/pull/181135 Forward-Port-Of: odoo/enterprise#70533
Original PR description
This allows to rely on the framework's inheritance instead of python's inheritance. Indeed, there was an issue where `sale_subscription` overrides were ignored by the framework. This change applies to both the product and combo configurators (and extracts any duplicated logic into shared methods). task-4263961 Community PR: https://github.com/odoo/odoo/pull/181135 Forward-Port-Of: odoo/enterprise#70533
Steps to Reproduce: 1. Navigate to the Documents app. 2. Select "All". 3. Click "New" > "Spreadsheet". 4. Choose a different workspace. 5. Click the "Create" button, resulting in an `AccessError`. The issue was caused by passing the ID as a string in the `orm` call to the `action_open_new_spreadsheet` method. This has been corrected by passing the ID as a number instead. Task: [4215415](https://www.odoo.com/odoo/project/2328/tasks/4215415) Forward-Port-Of: odoo/enterprise#72326 Forwa
Original PR description
Steps to Reproduce: 1. Navigate to the Documents app. 2. Select "All". 3. Click "New" > "Spreadsheet". 4. Choose a different workspace. 5. Click the "Create" button, resulting in an `AccessError`. The issue was caused by passing the ID as a string in the `orm` call to the `action_open_new_spreadsheet` method. This has been corrected by passing the ID as a number instead. Task: [4215415](https://www.odoo.com/odoo/project/2328/tasks/4215415) Forward-Port-Of: odoo/enterprise#72326 Forward-Port-Of: odoo/enterprise#71842
Steps: - Install sale app. - Go to sale module. - Open product form. - Go to accounting page. Issue: - Empty accounting page. Cause: - In account_accountant module added invoice group to display accounting page even though there is no content added in that module to display which should be visible without have account readonly access. Fix: - Remove invoice group for stable to display that page only for readonly group. To-do master: Remove that view. opw-4209850 Forward-Por
Original PR description
Steps: - Install sale app. - Go to sale module. - Open product form. - Go to accounting page. Issue: - Empty accounting page. Cause: - In account_accountant module added invoice group to display accounting page even though there is no content added in that module to display which should be visible without have account readonly access. Fix: - Remove invoice group for stable to display that page only for readonly group. To-do master: Remove that view. opw-4209850 Forward-Port-Of: odoo/enterprise#71616
task-4182770 Forward-Port-Of: odoo/enterprise#70570
Original PR description
task-4182770 Forward-Port-Of: odoo/enterprise#70570
A previous [commit](https://github.com/odoo/enterprise/pull/63926/commits/c749e1358dbd0175d0de5f32eab2c4dd98053905) added a readonly condition on the field auto_sync of the account.online.link view. This was made to prevent the automatic fetching of transaction from interactive providers when the connexion had expired. The issue lies in that condition being based on the field it applies to. This does not work well with manual editing as the readonly condition would update before hitting 'sav
Original PR description
A previous [commit](https://github.com/odoo/enterprise/pull/63926/commits/c749e1358dbd0175d0de5f32eab2c4dd98053905) added a readonly condition on the field auto_sync of the account.online.link view. This was made to prevent the automatic fetching of transaction from interactive providers when the connexion had expired. The issue lies in that condition being based on the field it applies to. This does not work well with manual editing as the readonly condition would update before hitting 'save', preventing to save the changes when unticking the 'auto_sync' checkbox. After discussion with FLG, we decided to keep things simple and remove that condition altogether. Else, one would have had to create a new field and import new data from the institution (is_interactive). No opw but the issue was raised in a odoofin support discord thread. Forward-Port-Of: odoo/enterprise#72047 Forward-Port-Of: odoo/enterprise#71643
Steps to reproduce: - As admin > Settings > Users & Companies > Users - Edit Marc Demo's access rights: Planning: admin; Time off: blank - As Marc Demo > Planning app > Apply 'Employees on time off' filter Access denied due to missing read rights on model hr.leave. This is triggered by _get operations on fields request_unit_half and request_unit_hours and doesn't happen in earlier versions because we did not use to need the number_of_days in _get_leave_warning_parameters. opw-4222955 F
Original PR description
Steps to reproduce: - As admin > Settings > Users & Companies > Users - Edit Marc Demo's access rights: Planning: admin; Time off: blank - As Marc Demo > Planning app > Apply 'Employees on time off' filter Access denied due to missing read rights on model hr.leave. This is triggered by _get operations on fields request_unit_half and request_unit_hours and doesn't happen in earlier versions because we did not use to need the number_of_days in _get_leave_warning_parameters. opw-4222955 Forward-Port-Of: odoo/enterprise#72005
Currently, there's no menu to get a list of all quote calculator spreadsheet templates. This commits adds a menu in the technical settings. It allows to: - delete/clean unused spreadsheet templates - import a template from its json file (BA do that quite often for dashboards, I expect they'll want to do it for spreadsheet quotation templates) Feedback from OXP Note: we don't add the menu in the Sales app menus because we don't want to add noise in there. It must be kept clean.
Original PR description
Currently, there's no menu to get a list of all quote calculator spreadsheet templates. This commits adds a menu in the technical settings. It allows to: - delete/clean unused spreadsheet templates - import a template from its json file (BA do that quite often for dashboards, I expect they'll want to do it for spreadsheet quotation templates) Feedback from OXP Note: we don't add the menu in the Sales app menus because we don't want to add noise in there. It must be kept clean. Task: 4236559 Forward-Port-Of: odoo/enterprise#71363
Currently, an error was generated when the user tries to filter `Customer/Saleperson` in the subscription dashboard. error: `Invalid field sale.subscription.report.message_partner_ids in leaf ('message_partner_ids', 'in', [3])` This is because we have used fields 'message_partner_ids' and 'activity_user_id' to filter out records, but this field is not available in the model. This commit will fix the above issue by using fielels 'partner_id' and 'user_id' to fielter records. sentry-56
Original PR description
Currently, an error was generated when the user tries to filter `Customer/Saleperson` in the subscription dashboard.
error: `Invalid field sale.subscription.report.message_partner_ids in leaf ('message_partner_ids', 'in', [3])`
This is because we have used fields 'message_partner_ids' and 'activity_user_id' to filter out records, but this field is not available in the model.
This commit will fix the above issue by using fielels 'partner_id' and 'user_id' to fielter records.
sentry-5657224204
Forward-Port-Of: odoo/enterprise#72151
Forward-Port-Of: odoo/enterprise#71360