Monday, January 25, 2021
19 changes · master
Enhancements to existing features
This update makes stock movement rules easier to customize by allowing existing filtering criteria to be inherited and extended. It helps businesses adapt inventory workflows to specific needs with less custom development effort.
Original PR description
Description of the issue/feature this PR addresses: Allow to inherit the domain. @mart-e -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Twitter wall event page now relies on a shared website access check instead of handling it separately in this module. This keeps behavior consistent across website features and reduces duplicate logic, with no expected visible change for users.
Original PR description
See https://github.com/odoo/odoo/pull/64313, can_access_from_current_website is now automatically added at a lowel level on methods with a model converter.
Resolved issues and error corrections
This update fixes a typo in the manufacturing work center label so it correctly says "Ready Work Orders" instead of "Read Work Orders." It also includes a small improvement to translation export behavior, reducing unnecessary module creation during exports.
Original PR description
Current behavior before PR: The string is not correct. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
When using the Calender synced with Google, if the user tries to delete an event, an error message is displayed: he has to archive it instead. To reproduce the error: 1. Sync Odoo Calendar with Gogle Calendar 2. Add an event 3. Click on it > Delete Error: UserError message: "You cannot delete a record synchronized with Google Calendar, archive it instead" To make the flow simpler and faster, when clicking on "Delete", the server will archive the event. When archiving an event, the
Original PR description
When using the Calender synced with Google, if the user tries to delete an event, an error message is displayed: he has to archive it instead. To reproduce the error: 1. Sync Odoo Calendar with Gogle Calendar 2. Add an event 3. Click on it > Delete Error: UserError message: "You cannot delete a record synchronized with Google Calendar, archive it instead" To make the flow simpler and faster, when clicking on "Delete", the server will archive the event. When archiving an event, the server deletes the corresponding event on Google Calendar. As a result, the next time the user loads his Odoo Calendar, the sync Google->Odoo will delete the archived event. OPW-2440339 Forward-Port-Of: odoo/odoo#64929 Forward-Port-Of: odoo/odoo#64874
This update fills in missing documentation for Command methods so readers can access the intended guidance despite a Sphinx documentation limitation. It helps developers and implementation teams better understand how to use these ORM commands without changing product behavior.
Original PR description
The `:autodoc:` does not work for classmethods in enums with sphinx v1.7.0, the documentation has been copy/pasted in order to temporary solve the problem. See sphinx-doc/sphinx#7586
The mobile app's authentication bases its feedback to the user on the error message returned by the server. Sadly, in case of multi-databases, no error message are properly returned when the user provides wrong credentials (presenting only an empty Snackbar). This difference of behaviour was introduced in the commit 07d5ea3 which goals was to give more power for JsonRequest's error handling customization. To do so, the catching of the exception (if one happens) was delegated to the cal
Original PR description
The mobile app's authentication bases its feedback to the user on the error message returned by the server. Sadly, in case of multi-databases, no error message are properly returned when the user…
The mobile app's authentication bases its feedback to the user on the error message returned by the server. Sadly, in case of multi-databases, no error message are properly returned when the user provides wrong credentials (presenting only an empty Snackbar). This difference of behaviour was introduced in the commit 07d5ea3 which goals was to give more power for JsonRequest's error handling customization. To do so, the catching of the exception (if one happens) was delegated to the caller instead of the JsonRequest itself. This change indirectly introduced a difference about the treatment of an exception between mono and multi-database : * mono-database was already catching the exception and handling it properly (see in https://github.com/odoo/odoo/blob/f05f8ef647a4eaba49d8a20eb8068f1c7a702297/odoo/addons/base/models/ir_http.py#L235-L241). * multi-databases didn't catch it. This commit restores the parity between both use cases by applying the same behaviour (as described in the commit 07d5ea3): ```python ir_http.dispatch(): try: request.dispatch() catch Exception as e: ir_http._handle_exception(e) ir_http.handle_exception(e) request._handle_exception(e) ``` Steps to reproduce: 1. Open the mobile app; 2. Try to register an account with a wrong password with multiple databases; 3. The snackbar is empty and no error is shown => bug; Task ID: 2287176 Forward-Port-Of: odoo/odoo#64856
Following https://github.com/odoo/odoo/commit/d675dbaa4c7174591e0e7c1a3caf3e76877312ce Also updated tests to be more consistant. Regex used to find problematic lines: `\btype\b.*\b(out|in)_(invoice|refund)\b` -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#64915
Original PR description
Following https://github.com/odoo/odoo/commit/d675dbaa4c7174591e0e7c1a3caf3e76877312ce Also updated tests to be more consistant. Regex used to find problematic lines: `\btype\b.*\b(out|in)_(invoice|refund)\b` -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#64915
Function _is_l10n_ch_postal expects a singleton Forward-Port-Of: odoo/odoo#64776
Original PR description
Function _is_l10n_ch_postal expects a singleton Forward-Port-Of: odoo/odoo#64776
This reverts commit c3c01633ce9359e3e9020ba5bdd919d5441ab3b2. task-2252924 Forward-Port-Of: odoo/odoo#64989
Original PR description
This reverts commit c3c01633ce9359e3e9020ba5bdd919d5441ab3b2. task-2252924 Forward-Port-Of: odoo/odoo#64989
The uom must be displayed to the customer in any case. opw:2411108 Forward-Port-Of: odoo/odoo#64987
Original PR description
The uom must be displayed to the customer in any case. opw:2411108 Forward-Port-Of: odoo/odoo#64987
The affixed header was not reappearing if page content was removed and the page thus indirectly scrolled. task-2446020 Forward-Port-Of: odoo/odoo#64990
Original PR description
The affixed header was not reappearing if page content was removed and the page thus indirectly scrolled. task-2446020 Forward-Port-Of: odoo/odoo#64990
Issue - Install calendar - Go to calendar and set 'week' view - Go to first week of the year - Add a 'Full Day' event - Add an event of 'few hours' - Click on filters -> Date -> Q1 Only 'Full Day' events remains displayed. Cause 'start_date' is used to in the 'Date' filter and this field is set only on 'Full Day' events. Solution Use 'start' field instead since always set. opw-2439460 Forward-Port-Of: odoo/odoo#64992
Original PR description
Issue - Install calendar - Go to calendar and set 'week' view - Go to first week of the year - Add a 'Full Day' event - Add an event of 'few hours' - Click on filters -> Date -> Q1 Only 'Full Day' events remains displayed. Cause 'start_date' is used to in the 'Date' filter and this field is set only on 'Full Day' events. Solution Use 'start' field instead since always set. opw-2439460 Forward-Port-Of: odoo/odoo#64992
In the main documents kanban view, the tags are inherited from the main workspace. However, in some views, it seems tags available in the main workspace are not available for all sub-workspaces. The domains on folder_id should be adapted to follow the same behavior everywhere. opw-2445514 Forward-Port-Of: odoo/enterprise#15931 Forward-Port-Of: odoo/enterprise#15926
Original PR description
In the main documents kanban view, the tags are inherited from the main workspace. However, in some views, it seems tags available in the main workspace are not available for all sub-workspaces. The domains on folder_id should be adapted to follow the same behavior everywhere. opw-2445514 Forward-Port-Of: odoo/enterprise#15931 Forward-Port-Of: odoo/enterprise#15926
This is the part 2 of task 2440003 that allowed to batch payments with different SDD mandates together. - Adds "SDD scheme" field and filter on payment list view. This allows to easily separate CORE and B2B payments. Field is optional/show, so it can be hidden if only one scheme is ever used. - Adds check unique SDD Scheme check at batch creation Task: 2440587 Forward-Port-Of: odoo/enterprise#15882
Original PR description
This is the part 2 of task 2440003 that allowed to batch payments with different SDD mandates together. - Adds "SDD scheme" field and filter on payment list view. This allows to easily separate CORE and B2B payments. Field is optional/show, so it can be hidden if only one scheme is ever used. - Adds check unique SDD Scheme check at batch creation Task: 2440587 Forward-Port-Of: odoo/enterprise#15882
Steps to reproduce the bug: - Let's consider a user U with Accountant access rights - Log with U - Go to Accounting > Reporting >Aged receivalbe - Click on any reconcile button next to a partner Bug: An access error was raised with: "You are not allowed to access 'Client Action' (ir.actions.client) records." Only people in group Administration/Settings could reconcile opw:2439602 Forward-Port-Of: odoo/enterprise#15815
Original PR description
Steps to reproduce the bug: - Let's consider a user U with Accountant access rights - Log with U - Go to Accounting > Reporting >Aged receivalbe - Click on any reconcile button next to a partner Bug: An access error was raised with: "You are not allowed to access 'Client Action' (ir.actions.client) records." Only people in group Administration/Settings could reconcile opw:2439602 Forward-Port-Of: odoo/enterprise#15815
See commits for details. opw-2411279 Forward-Port-Of: odoo/enterprise#15779
Original PR description
See commits for details. opw-2411279 Forward-Port-Of: odoo/enterprise#15779
Because amazon doesn't provide sandbox, I tested with a test I made based on customer case. So, run the test: --db-filter=.* -i sale_amazon --test-tags /sale_amazon:TestAmazon.test_sync_pickings_undo it emulates following STEPS: * create order on Amazon * sync to Odoo * process picking * cancel order on Amazon * sync to Odoo BEFORE: ``` Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/tools/misc.py", line 849, in deco return func(*args, **k
Original PR description
Because amazon doesn't provide sandbox, I tested with a test I made based on customer case. So, run the test: --db-filter=.* -i sale_amazon --test-tags /sale_amazon:TestAmazon.test_sync_pickings_undo…
Because amazon doesn't provide sandbox, I tested with a test I made based on
customer case. So, run the test:
--db-filter=.* -i sale_amazon --test-tags /sale_amazon:TestAmazon.test_sync_pickings_undo
it emulates following
STEPS:
* create order on Amazon
* sync to Odoo
* process picking
* cancel order on Amazon
* sync to Odoo
BEFORE:
```
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/tools/misc.py", line 849, in deco
return func(*args, **kwargs)
File "/opt/odoo/custom/src/odoo/odoo/tools/misc.py", line 849, in deco
return func(*args, **kwargs)
File "/opt/odoo/auto/addons/sale_amazon/tests/test_amazon.py", line 501, in test_sync_pickings_undo
self.account._sync_orders(auto_commit=False)
File "/opt/odoo/auto/addons/sale_amazon/models/amazon_account.py", line 345, in _sync_orders
order_data, orders_api)
File "/opt/odoo/auto/addons/sale_amazon/models/amazon_account.py", line 447, in _process_order
order.with_context(canceled_by_amazon=True).action_cancel()
File "/opt/odoo/auto/addons/sale_amazon/models/sale.py", line 37, in action_cancel
self.write({'amazon_cancellation_pending': True})
File "/opt/odoo/auto/addons/sale_stock/models/sale_order.py", line 160, in action_cancel
self.mapped('picking_ids').action_cancel()
File "/opt/odoo/auto/addons/stock/models/stock_picking.py", line 671, in action_cancel
self.mapped('move_lines')._action_cancel()
File "/opt/odoo/auto/addons/stock/models/stock_move.py", line 1302, in _action_cancel
raise UserError(_('You cannot cancel a stock move that has been set to \'Done\'.'))
odoo.exceptions.UserError: ("You cannot cancel a stock move that has been set to 'Done'.", '')
```
AFTER: warning message is posted to the order
---
opw-2421864
Forward-Port-Of: odoo/enterprise#15873
Forward-Port-Of: odoo/enterprise#15746Following https://github.com/odoo/odoo/commit/d675dbaa4c7174591e0e7c1a3caf3e76877312ce Also updated tests to be more consistant Regex used to fin problematic lines: `\b(default_)?type\b.*\b(out|in)_(invoice|refund)\b` Fix traceback ``` Traceback (most recent call last): File "/data/build/odoo/odoo/http.py", line 639, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/data/build/odoo/odoo/http.py", line 315, in _handle_exception ra
Original PR description
Following https://github.com/odoo/odoo/commit/d675dbaa4c7174591e0e7c1a3caf3e76877312ce
Also updated tests to be more consistant
Regex used to fin problematic lines:
`\b(default_)?type\b.*\b(out|in)_(invoice|refund)\b`
Fix traceback
```
Traceback (most recent call last):
File "/data/build/odoo/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/data/build/odoo/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Wrong value for ir.attachment.type: 'out_invoice'
```
Commnuity PR: https://github.com/odoo/odoo/pull/64915
Forward-Port-Of: odoo/enterprise#15908If we have a custom message follow-up using the keywords like %(date)s and %(amount_due)s, these keywords will not be formatted and it can lead to a confusion for the partner. 2 examples: - The date always uses the server format and not the partner language format (like 2020-12-10 vs 10/12/2020 for a French user). - The amount due is never rounded so we can end up with strange values like 4379.9400000000005 This fix provides a formatting based on partner for these keywords like in the
Original PR description
If we have a custom message follow-up using the keywords like %(date)s and %(amount_due)s, these keywords will not be formatted and it can lead to a confusion for the partner. 2 examples: - The date always uses the server format and not the partner language format (like 2020-12-10 vs 10/12/2020 for a French user). - The amount due is never rounded so we can end up with strange values like 4379.9400000000005 This fix provides a formatting based on partner for these keywords like in the rest of a follow-up report. opw-2419553 Forward-Port-Of: odoo/enterprise#15552