Tuesday, September 3, 2024
21 changes
5 changes
Miscellaneous changes
The route `/website_mail/follow` can create new contacts, for that reason, it should be protected with recaptcha similar to `/website/form/<string:model_name>` and `/website_mass_mailing/subscribe` This PR adds the Recaptcha check on the endpoint: `/website_mail/follow` Before this PR it was possible to create as much dummy contact as you wanted as an attacker with a simple script opw-4023724 Forward-Port-Of: odoo/odoo#178435 Forward-Port-Of: odoo/odoo#175083
Original PR description
The route `/website_mail/follow` can create new contacts, for that reason, it should be protected with recaptcha similar to `/website/form/<string:model_name>` and `/website_mass_mailing/subscribe` This PR adds the Recaptcha check on the endpoint: `/website_mail/follow` Before this PR it was possible to create as much dummy contact as you wanted as an attacker with a simple script opw-4023724 Forward-Port-Of: odoo/odoo#178435 Forward-Port-Of: odoo/odoo#175083
*= event_crm_sale, website_event_crm * -Probably miss by script since https://github.com/odoo/odoo/pull/104741/commits/332c117f60a36f723c450f61ce2e0e7181d66c21 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 Forward-Port-Of: odoo/odoo#177703
Original PR description
*= event_crm_sale, website_event_crm * -Probably miss by script since https://github.com/odoo/odoo/pull/104741/commits/332c117f60a36f723c450f61ce2e0e7181d66c21 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 Forward-Port-Of: odoo/odoo#177703
### Steps to reproduce the issue: 1. Make sure you have access to the Analytic Distribution fields 2. Create an expense 3. Open the Split Expense Wizard and add Analytic Distribution to the new Expenses - Click out of the Analytic Distribution widget to close it, don't use the close icon 4. Finish the splitting process 5. On the Tree view that follows, the Analytic Distribution fields are empty ### Explanation: `onWindowClick` checks if the `analytic_distirbution` widget should
Original PR description
### Steps to reproduce the issue: 1. Make sure you have access to the Analytic Distribution fields 2. Create an expense 3. Open the Split Expense Wizard and add Analytic Distribution to the new…
### Steps to reproduce the issue:
1. Make sure you have access to the Analytic Distribution fields
2. Create an expense
3. Open the Split Expense Wizard and add Analytic Distribution to the new Expenses
- Click out of the Analytic Distribution widget to close it, don't use the close icon
4. Finish the splitting process
5. On the Tree view that follows, the Analytic Distribution fields are empty
### Explanation:
`onWindowClick` checks if the `analytic_distirbution` widget should close. If the conditions are met, `forceCloseEditor` is called and the data is saved.
In this case, one of the `selectors` is retrieved by `ev.target.closest`, namely `.modal:not(.o_inactive_modal)`, therefore not meeting the conditions to call `forceCloseEditor`, but the widget still closes.
### Fix reasoning:
We want `forceCloseEditor` to be called in this situation, since the user is not clicking on an element related to `analytic_distribution`. We can use `o_act_window` to filter Search More modals from Wizards, as it is absent from the former.
opw-4001757
Forward-Port-Of: odoo/odoo#177161Before, the default user assigned to the self order was a standard pos user. This commit changes the default user to pos_manager to avoid any access rights issues. RB error: 70391 Forward-Port-Of: odoo/odoo#173102
Original PR description
Before, the default user assigned to the self order was a standard pos user. This commit changes the default user to pos_manager to avoid any access rights issues. RB error: 70391 Forward-Port-Of: odoo/odoo#173102
If the model `account.move.line` has custom field with name `source_line_id` or `source_move_id` or `source_line_account_type` then, when the computed field `payment_state` in model `account.move` is computed it causes `psycopg2.errors.AmbiguousColumn` during `GROUP BY` operation here[^1]. Because **account_move_line** is one of the joined tables in that query and it causes issue while grouping. Actually the issue can occur if any of the joined tables in that[^2] query has custom field with the
Original PR description
If the model `account.move.line` has custom field with name `source_line_id` or `source_move_id` or `source_line_account_type` then, when the computed field `payment_state` in model `account.move` is…
If the model `account.move.line` has custom field with name `source_line_id` or `source_move_id` or `source_line_account_type` then, when the computed field `payment_state` in model `account.move` is computed it causes `psycopg2.errors.AmbiguousColumn` during `GROUP BY` operation here[^1]. Because **account_move_line** is one of the joined tables in that query and it causes issue while grouping. Actually the issue can occur if any of the joined tables in that[^2] query has custom field with the names above, it will cause same issue.
To resolve this issue, I added a table alias
to the all 3 elements in GROUP BY clause.
Steps to reproduce:
1. Install module account in any version >= `saas~15.3`
2. Add custom field to the model `account.move.line` with name `source_move_id`.
3. Try to create invoice
You will face issue similar to this:
```
File "/home/odoo/src/odoo/saas-15.3/addons/account/models/account_move.py", line 1430, in _compute_amount
self._cr.execute(' UNION ALL '.join(queries), [stored_ids, stored_ids])
File "/home/odoo/src/odoo/saas-15.3/odoo/sql_db.py", line 356, in execute
res = self._obj.execute(query, params)
psycopg2.errors.AmbiguousColumn: column reference "source_move_id" is ambiguous
LINE 20: GROUP BY source_line_id, source_move_id,...
```
I targeted this PR to `16.0` because branch `saas-15.3` is disbaled
[^1]: https://github.com/odoo/odoo/blob/8346b2a7561c178fd7e9f9d1fbd7dac3e3843fd1/addons/account/models/account_move.py#L912
[^2]: https://github.com/odoo/odoo/blob/8346b2a7561c178fd7e9f9d1fbd7dac3e3843fd1/addons/account/models/account_move.py#L896-L912
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
Forward-Port-Of: odoo/odoo#17757914 changes
Enhancements to existing features
The appointment booking pages were updated to use standard browser technology instead of an older helper library. This keeps the experience the same for users while making the frontend easier to maintain and better aligned with modern web practices.
Original PR description
Specification: This PR focuses on transitioning all frontend code from jQuery to Vanilla JavaScript. The changes specifically target files in the web.assets_frontend. task-3770362
2 changes
Enhancements to existing features
The POS IoT module now has a visual icon that will be displayed in the Odoo interface. This improvement makes the module easier to identify and recognize within the system, enhancing the overall user experience when browsing available modules.
Original PR description
Added `pos_iot` module icon.
Automatic warehouse creation now applies only to the first company, so related multi-company test flows are updated to create the needed warehouse explicitly. This keeps sale, warehouse, and manufacturing planning scenarios reliable without changing day-to-day business workflows.
Original PR description
In https://github.com/odoo/odoo/pull/172457, automatic warehouse creation is restricted to be only for the first company, hence, some unit tests that create a multi-company environment needs to be modified. A warehouse creation step is added to these tests so that the flow being tested does not break. Task-4034713
The rental date picker now displays better when shoppers use the collapsed sidebar on the website shop. The off-canvas menu also keeps product categories first, making browsing and date selection clearer for customers.
Original PR description
Since the introduction of the new "Collapsed sidebar" feature in https://github.com/odoo/odoo/pull/177056, this commit adapts the date picker style when the sidebar is collapsed. task-3987018 Requires: - https://github.com/odoo/odoo/pull/177056 --- <img width="1776" alt="Capture d’écran 2024-08-20 à 09 38 23" src="https://github.com/user-attachments/assets/89fa009b-8c59-48ea-bc65-6c72f03a50d7">
The Settings menu now uses the same “Social Marketing” name as the app itself. This removes confusion caused by the previous “Social Media” label and makes the user experience more consistent.
Original PR description
### Before this PR: The name of the app is 'Social Marketing' but in settings it shows 'Social Media'. ### After this PR: Fix naming in Settings Menu. Social Media → Social Marketing Task-4143044
Kanban card layouts in Field Service, IoT, and Knowledge have been simplified using newer standard components. This makes these screens easier to maintain and helps keep the user interface consistent with current Odoo practices.
Original PR description
In this commit we have simplified the kanban arch for the industry_fsm, industry_fsm_report,iot and knowledge modules.the goal is to simplify them, make them easier to read and use bootstrap utility classnames. - Previously, we used kanban-box, but now we are using kanban-card instead. - Deprecated oe_kanban_global_click and oe_kanban_global_click_edit. - More use of `<field/>` tags - Removed the oe_kanban_colorpicker class and replaced it with the kanban_color_picker widget. - Changed type='edit' to type='open' to open records. since version 16, records always open in edit mode by default. - kanban_image from rendering context, is deprecated so we use `<field name=... widget=image/>` instead - kanban_color, kanban_getcolor and kanban_getcolorname are deprecated use new attribute highlight_color=color_field_name on root node Task-3992107
Resolved issues and error corrections
This fix makes the Philippine SAWT and QAP report export order consistent every time. It prevents random automated test failures, helping keep releases stable without changing business functionality.
Original PR description
Folllow up to #67860: the use of a `set` in `export_sawt_qap` makes export ordering non-deterministic, which will randomly fail the checks in `TestSawtQapGeneration` (`test_sawt` and `test_qap`). Use a list to ensure the export is deterministically ordered. Example build failures: - https://runbot.odoo.com/runbot/build/67649933 - https://runbot.odoo.com/runbot/build/67650267
Code cleanup and technical improvements
This internal cleanup standardizes how the frontend identifies the current user by renaming a session field from user_id to uid. It helps keep enterprise modules aligned with the core platform change without changing day-to-day user workflows.
Original PR description
community pr: https://github.com/odoo/odoo/pull/177985
Miscellaneous changes
Performs test of a related commit in communiy: [FIX] mail: include whatsapp in webpush notifications There are couple of components in the notification architecture. For the sake of illustration let's simplify it with the following: Sender -> Queuer -> Receiver Queuer is an FMC backend, so we should only be concerned about the other two. Receiver which is just a frontend service worker that will generate notifications as soon as he receives an event. The issue (before this commit) was in the
Original PR description
Performs test of a related commit in communiy: [FIX] mail: include whatsapp in webpush notifications There are couple of components in the notification architecture. For the sake of illustration let's simplify it with the following: Sender -> Queuer -> Receiver Queuer is an FMC backend, so we should only be concerned about the other two. Receiver which is just a frontend service worker that will generate notifications as soon as he receives an event. The issue (before this commit) was in the Sender part, which was skipping whatsapp type message generation. [Reproduce] - Configure Whatsapp account, include user A in "Notify users" - Allow notifications in your browser (chat icon/ OdooBot suggestion) - Send a whatsapp message to the configured whatsapp number - BUG: Push notification not showing up opw-3720699 Forward-Port-Of: odoo/enterprise#68807 Forward-Port-Of: odoo/enterprise#68453
The values computed in `super()._compute_l10n_br_goods_operation_type_id()` are immediately nullified by the successive `self.l10n_br_goods_operation_type_id = False`. Forward-Port-Of: odoo/enterprise#69177
Original PR description
The values computed in `super()._compute_l10n_br_goods_operation_type_id()` are immediately nullified by the successive `self.l10n_br_goods_operation_type_id = False`. Forward-Port-Of: odoo/enterprise#69177
Behaviour before fix: The exported planning ics file included both the employee's shifts and unwanted shifts by other employees. Behaviour after fix: The exported planning ics file only includes the employee's shifts. Solution: Don't include the domain to add unwnated shifts in the search of the _get_cs_file method of the planning.planning model. Task-3981746 Forward-Port-Of: odoo/enterprise#69050
Original PR description
Behaviour before fix: The exported planning ics file included both the employee's shifts and unwanted shifts by other employees. Behaviour after fix: The exported planning ics file only includes the employee's shifts. Solution: Don't include the domain to add unwnated shifts in the search of the _get_cs_file method of the planning.planning model. Task-3981746 Forward-Port-Of: odoo/enterprise#69050
## Pull Request HOOT (PRHOOT) - part 22 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10
Original PR description
## Pull Request HOOT (PRHOOT) - part 22 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 22 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Part 20: https://github.com/odoo/odoo/pull/173332 / https://github.com/odoo/enterprise/pull/66895 Part 21: https://github.com/odoo/odoo/pull/174337 Community: https://github.com/odoo/odoo/pull/176777 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#68827 Forward-Port-Of: odoo/enterprise#68721
While the format for the guid is the right in the xml, for the CSV, we should add double quotes, as asked by the format. The 2 zip should really be separated, with one for the csv and the other for the attachments Renamed the 2 buttons to indicate more clearly what they are about. The csv only expects a single attachment per move. We should then only export the message_main_attachment_id task-4131986 Forward-Port-Of: odoo/enterprise#68941 Forward-Port-Of: odoo/enterprise#68794
Original PR description
While the format for the guid is the right in the xml, for the CSV, we should add double quotes, as asked by the format. The 2 zip should really be separated, with one for the csv and the other for the attachments Renamed the 2 buttons to indicate more clearly what they are about. The csv only expects a single attachment per move. We should then only export the message_main_attachment_id task-4131986 Forward-Port-Of: odoo/enterprise#68941 Forward-Port-Of: odoo/enterprise#68794
In this PR, fixes payroll tour as hr responsible field moves from notebook to main view. Note: target saas-17.4 related task-3621276 Forward-Port-Of: odoo/enterprise#69327
Original PR description
In this PR, fixes payroll tour as hr responsible field moves from notebook to main view. Note: target saas-17.4 related task-3621276 Forward-Port-Of: odoo/enterprise#69327
task-4063399 Forward-Port-Of: odoo/enterprise#67016
Original PR description
task-4063399 Forward-Port-Of: odoo/enterprise#67016
Resolved issues and error corrections
This update fixes failing tests in the subscription module that were caused by incorrect time handling during test execution. The fix ensures that time is properly frozen during testing, preventing intermittent test failures that occurred when tests were run at specific times. This improves the reliability of the subscription testing process.
Original PR description
Before this commit, some tests were failing because the time was not correctly frozen. The failing test could be seen when run like this: faketime '2024-08-31 02:01:00 UTC' ./odoo-bin -c ... runbot errors: 76518, 76519, 76520