Friday, April 12, 2024
48 changes · saas-17.2
Enhancements to existing features
The Brazilian Avalara tax integration settings now include a link to the newly available documentation. This helps users find setup and usage guidance directly from the configuration screen.
Original PR description
Link the brand new documentation in the settings. This is a manual port of odoo/enterprise#48040 to 17.2, since the forward ports were created before 17.2 existed. X-original-commit: 01c634a444b4845840832200bca3708dd91c30ac
Resolved issues and error corrections
The web interface now keeps a language selected through the page URL after the browser is reloaded. This prevents users from unexpectedly returning to their default language when they refresh or continue navigating.
Original PR description
Since [1], it's possible to override the language of the user by adding the language to the query string : `lang=en_US`. Since [2], all the key, values pairs that were on the fragment of the url, are now on the query string, and they are manipulated by the router. The information that was previously on the query string, are marked as a lockedKeys to avoid losing them when reloading the page or when a new state is push (as for example the debug key). Unfortunately, lang was forgotten in this list, which lead to a lost of the override language when we reload the browser. [1] : https://github.com/odoo/odoo/commit/286cc97dd45a218ce763f9f15bc34f3226e13296 [2] : https://github.com/odoo/odoo/commit/c63d14a0485a553b74a8457aee158384e9ae6d3f
Miscellaneous changes
This pull request appears to only revert a previous test change, with no business-facing functionality described. It is likely a housekeeping update with minimal expected impact on users or operations.
Original PR description
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
Creating a new company is now faster in databases with many companies because related stock location settings are saved in batches. This reduces setup delays while preserving the same vendor and customer location behavior.
Original PR description
Since #146458, when a new company is inserted, we set the 'Inter-company transit' location as its Vendor and Customer location. As this field is company-dependant, we need to assign it from the PoV of each company, which will create a ton of ir.property as the number of company grows. This commit improves a bit the perfs at a high company count by batching the first write. Comparison with a DB with 200 companies, to insert a new company: - Before: 9.43s - After: 6.77s --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Uninstalling the Appraisal Survey module no longer fails because of an outdated setup reference left after a previous code change. This helps administrators remove the module cleanly when it is no longer needed, without requiring technical intervention.
Original PR description
Currently, an error occurs when the user tries to uninstall the `hr_appraisal_survey` module. error: `AttributeError: module 'odoo.addons.hr_appraisal_survey' has no attribute 'uninstall_hook'` This is because the recently refactored code with https://github.com/odoo/enterprise/commit/8487fc4e7464316539c3ecaebd1844a556ed0c86 in saas-17.2 removes the `uninstall_hook` method, but its reference is still present in the manifest. This commit will fix the above issue by removing `uninstall_hook` from the manifest. sentry-5174558827
This fix prevents timezone differences between users from causing helpdesk timesheet tests to behave inconsistently. It ensures the same user creates and validates the timesheets, so validated records keep the expected project link when a ticket changes.
Original PR description
Before this commit, the timesheets created inside `test_timesheet_ticket_consistency_when_helpdesk_team_change` and `test_timesheet_check_warning_when_helpdesk_team_change` tests could be unvalidated even after calling `action_timesheet_validate`. The reason is because the timesheets are created by the current user (OdooBot) is our case and his timezone could be different than the user who validates the timesheets and so the timesheets date could be tomorrow for the timesheet approver used inside that test becaue of the timezone is not the same for the both users. To avoid timezone issue, this commit makes sure the same user creates and validates those timesheets since the goal of that test is to check the `project_id` field is unchanged for validated timesheets even if the ticket changed. runbot-61592
This update improves how system errors are recorded so support and engineering teams receive more complete diagnostic details. Better error reports help teams understand failures faster and reduce time spent investigating issues.
Original PR description
This commit ensures that the complete exception information is captured by Sentry with the use of logger exception. This modification improves the error reporting functionality by providing more comprehensive information about the encountered exceptions. This will aid in debugging and diagnosing issues, enabling faster resolution of potential problems. see-https://github.com/odoo/odoo/commit/ff9da0e9e20a1c4ba682af40fecd23bac121b5d1
The MX CFDI is designed to only work with 'round_globally' as taxes computation method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161487 Forward-Port-Of: odoo/odoo#160379
Original PR description
The MX CFDI is designed to only work with 'round_globally' as taxes computation method. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161487 Forward-Port-Of: odoo/odoo#160379
Create company A with company currency USD, company B with company currency VND. Set company B-VND in payment terms expect: currency payment terms is VND Video: https://github.com/odoo/odoo/assets/11542778/155f8339-b3e5-470d-a590-70d180a72c36 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161044
Original PR description
Create company A with company currency USD, company B with company currency VND. Set company B-VND in payment terms expect: currency payment terms is VND Video: https://github.com/odoo/odoo/assets/11542778/155f8339-b3e5-470d-a590-70d180a72c36 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161044
In `SET_FILTER_MATCHING_CONDITION` we would call `SEE_RECORDS_PIVOT_VISIBLE` twice but since the function returns a boolean value, the second call was useless as we already knew the outcome. This revision alleviates a bit the cost of computing the cells' clickable actions. On A sheet with 480 visible cells, each of them matching the full condition, the time spent in `getClickableCells` goes from 19ms to 14 ms on Google Chrome and from 42ms to 29 ms on Firefox. Description of the issue/feat
Original PR description
In `SET_FILTER_MATCHING_CONDITION` we would call `SEE_RECORDS_PIVOT_VISIBLE` twice but since the function returns a boolean value, the second call was useless as we already knew the outcome. This revision alleviates a bit the cost of computing the cells' clickable actions. On A sheet with 480 visible cells, each of them matching the full condition, the time spent in `getClickableCells` goes from 19ms to 14 ms on Google Chrome and from 42ms to 29 ms on Firefox. 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#161656
Task: 34810 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#145112
Original PR description
Task: 34810 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#145112
Due to the project user's inability to create a task stage, we have removed the 'create stage' option from the kanban view. task-3511164 Forward-Port-Of: odoo/odoo#161535 Forward-Port-Of: odoo/odoo#140297
Original PR description
Due to the project user's inability to create a task stage, we have removed the 'create stage' option from the kanban view. task-3511164 Forward-Port-Of: odoo/odoo#161535 Forward-Port-Of: odoo/odoo#140297
Previously, scanning a product packaging barcode did not search among the already loaded product packagings. Instead, it resulted in an unnecessary server call to retrieve the product with the barcode. This commit optimizes this process by first checking the loaded product packagings before resorting to a server call. opw-3829620 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161434
Original PR description
Previously, scanning a product packaging barcode did not search among the already loaded product packagings. Instead, it resulted in an unnecessary server call to retrieve the product with the barcode. This commit optimizes this process by first checking the loaded product packagings before resorting to a server call. opw-3829620 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161434
### Context In a previous fix https://github.com/odoo/odoo/pull/83276 , the `_notify_get_reply_to_formatted_email` method was introduced to prevent edge-cases where the cpython `email` library might incorrectly fold the “Reply-To” email header. We identified an other corner case where DKIM signature verification might fail on the recipient’s end depending on the tech stack used to verify the DKIM signature vs the one used to DKIM sign it on the sending end. This might be related to how
Original PR description
### Context In a previous fix https://github.com/odoo/odoo/pull/83276 , the `_notify_get_reply_to_formatted_email` method was introduced to prevent edge-cases where the cpython `email` library might…
### Context In a previous fix https://github.com/odoo/odoo/pull/83276 , the `_notify_get_reply_to_formatted_email` method was introduced to prevent edge-cases where the cpython `email` library might incorrectly fold the “Reply-To” email header. We identified an other corner case where DKIM signature verification might fail on the recipient’s end depending on the tech stack used to verify the DKIM signature vs the one used to DKIM sign it on the sending end. This might be related to how RFC5322 and RFC6376 interact with each other : In RFC5322 defines folding white spaces as follows : ``` FWS = ([*WSP CRLF] 1*WSP) / obs-FWS with obsolete FWS = 1*WSP *(CRLF 1*WSP) ``` While RFC6376 uses : `FWS = [*WSP CRLF] 1*WSP ` Based on this, it seems that for proper header content folding, the specifications expects at least one WSP (space or tab) before a CRLF. Currently when using the `email` cpython library to handle email objects, we observed that when the header value for the “Reply-To” is longer than 68 characters, it will return a folded string representation adding a linebreak after the colon. Example: `Reply-To:\r\n "Marc R.Long Name Jonhson" <catchall@very.long.subdomain@example.com>\r\n` Notice that the there is no WSP between the colon character an `\r\n`. It seems that in this corner case, certain DKIM verification tech stacks (from tests Microsoft Outlook and Rspamd) will miss-read the “Reply-to” header as empty, while others correct for it (Gmail). This in returns leads to the DKIM signature verification failing. As it is impossible to test every possible combination of DKIM tech stacks in the email ecosystem and that until the `email` cpython library handles this corner case correctly, this fix tries to preformat the “Reply-To” more defensively. We also print a warning log if the `record_email` alone is longer than 68 characters (as it will not be folded), inviting the user to shorten it to prevent DKIM verification issues. ### Unit test fixing: - shortened alias name to prevent the 68 character limit from being triggered during the `test_notification_reply_to_batch` performance test (as we are not testing the 68 char here) - changed language in `test_mail_message_values_fromto_long_name` to reflect the new 68 character limit and mutted logger, as it now print a warning message ### Considerations for the future This PR only prevents the “Reply-To” from being malformed. In theory, the miss-folding could happen to any email header constructed using the `email` cpython library. In practice, the probability of the “To” and “From” being affected is low, as they usually don’t exceed a total of 78 characters as per RFC. Nevertheless if the future shows that this might be a bigger issue, one should think about: * On Odoo side: add a more robust header value formatting applied to all affected headers before the email gets sent out * On Python’s side: work with the `email` library maintainer to find a longterm solution opw-3826296 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161014 Forward-Port-Of: odoo/odoo#160760
Issue: When a course is set to 'On Payment' and linked to our 'Course Access' product, users encounter an issue where they cannot view the final screen of the payment process when selecting payment methods like 'wire transfer'. This occurs because the payment status remains 'pending', and the user has not yet been granted access to the course, meaning no invitation link is available. Steps to Reproduce: 1. Install website_sale_slides. 2. Create or modify a course with the 'On Paymen
Original PR description
Issue: When a course is set to 'On Payment' and linked to our 'Course Access' product, users encounter an issue where they cannot view the final screen of the payment process when selecting payment methods like 'wire transfer'. This occurs because the payment status remains 'pending', and the user has not yet been granted access to the course, meaning no invitation link is available. Steps to Reproduce: 1. Install website_sale_slides. 2. Create or modify a course with the 'On Payment' status. 3. Link it to a 'Course Access' product. 4. Navigate to the website and attempt to purchase the course. 5. Proceed through all the steps of the payment process. Solution: The template needs to accommodate scenarios where certain payment methods do not immediately provide an invitation link. Even without the invitation link, it should still display the last payment screen, awaiting payment confirmation to grant access. opw-3683024 Forward-Port-Of: odoo/odoo#153610
…ndor bill Steps to Reproduce : - install indian Accounting module - click on invoice - go to vendor bills - create new Issue: - while creating new and confirming, it will throw a warning message, as this warning required only for eInvoice only (while confirming the invoice) not for vendor Bills. Cause: - while generating warning message there is no specific condition like that it is not for vendors Solution: - if we gave condition that this warning message is only for out_in
Original PR description
…ndor bill Steps to Reproduce : - install indian Accounting module - click on invoice - go to vendor bills - create new Issue: - while creating new and confirming, it will throw a warning message, as this warning required only for eInvoice only (while confirming the invoice) not for vendor Bills. Cause: - while generating warning message there is no specific condition like that it is not for vendors Solution: - if we gave condition that this warning message is only for out_invoice then the issue will be solved. task-3657558 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#161361 Forward-Port-Of: odoo/odoo#147658
The goal is to modify the accounts that take please in those entries. A typical example is a company that wants to recognize cost of goods sold for the input and output at the same time, instead of waiting for the customer invoice. This is just a hook, not functional change. cc @ForgeFlow Forward-Port-Of: odoo/odoo#161460 Forward-Port-Of: odoo/odoo#137582
Original PR description
The goal is to modify the accounts that take please in those entries. A typical example is a company that wants to recognize cost of goods sold for the input and output at the same time, instead of waiting for the customer invoice. This is just a hook, not functional change. cc @ForgeFlow Forward-Port-Of: odoo/odoo#161460 Forward-Port-Of: odoo/odoo#137582
Before this commit, when adding a new grid item in a grid by using the "Add Elements" option, if the page was scrolled such that the top of the grid was not visible, this new grid item may not always be visible. This is annoying as the user could add an element and not see where it appeared and would therefore need to look for it. This commit fixes this by making the page scroll to the added grid item if it is not fully visible. Steps to reproduce: - Drop the "Text-Image" snippet and enou
Original PR description
Before this commit, when adding a new grid item in a grid by using the "Add Elements" option, if the page was scrolled such that the top of the grid was not visible, this new grid item may not always be visible. This is annoying as the user could add an element and not see where it appeared and would therefore need to look for it. This commit fixes this by making the page scroll to the added grid item if it is not fully visible. Steps to reproduce: - Drop the "Text-Image" snippet and enough snippets under it to have a scrollbar. - Toggle the "Text-Image" snippet to grid mode. - Scroll the page so the top of the grid is not visible. - Add a new "Button" with the "Add Elements" option. => The button is not visible. task-3616138 Forward-Port-Of: odoo/odoo#161159 Forward-Port-Of: odoo/odoo#158838
Configure an email alias for the journal 'Vendor Bills' Send to the mail alias two pdf bills Issue: Only 1 record is created with the 2 bills as attachment The system should split the bills into separate records, but this does not occur: - after the first bill is processed the current move extract_state is 'waiting_extraction' - when the system check whether to extract data from the second document the result is negative as it check the state of the first document Enterprise PR:
Original PR description
Configure an email alias for the journal 'Vendor Bills' Send to the mail alias two pdf bills Issue: Only 1 record is created with the 2 bills as attachment The system should split the bills into separate records, but this does not occur: - after the first bill is processed the current move extract_state is 'waiting_extraction' - when the system check whether to extract data from the second document the result is negative as it check the state of the first document Enterprise PR: https://github.com/odoo/enterprise/pull/60168 opw-3822262 Forward-Port-Of: odoo/odoo#160983
This reverts commit 436c1c6. The commit was fixing an issue where the product configurator dialog would not be shown for custom attribute, no variant, and dynamic attribute using the quick buy add button on the '/shop' page. The commit introduces an undesirable behavior: the product configurator would always be open if customers choose none of the multi-checkbox options. Forward-Port-Of: odoo/odoo#161144
Original PR description
This reverts commit 436c1c6. The commit was fixing an issue where the product configurator dialog would not be shown for custom attribute, no variant, and dynamic attribute using the quick buy add button on the '/shop' page. The commit introduces an undesirable behavior: the product configurator would always be open if customers choose none of the multi-checkbox options. Forward-Port-Of: odoo/odoo#161144
When updating the categories, if by any chance there is a loop in the category hierarchy, the current code was falling into an infinite loop. With this commit, the graph loop is broken by clearing a parent_id, and if the resulting module category path is wrong, a clean new one will be recreated anyway. This allows unblocking uncomfortable situations where people cannot update the modules list any more. In 15.0, [a check](https://github.com/odoo/odoo/commit/6932714200d158a21bf10b90b2f71fa5c
Original PR description
When updating the categories, if by any chance there is a loop in the category hierarchy, the current code was falling into an infinite loop. With this commit, the graph loop is broken by clearing a parent_id, and if the resulting module category path is wrong, a clean new one will be recreated anyway. This allows unblocking uncomfortable situations where people cannot update the modules list any more. In 15.0, [a check](https://github.com/odoo/odoo/commit/6932714200d158a21bf10b90b2f71fa5cae0b13f) has been introduced to prevent the existence of recursive categories, but as it is a python check it doesn't prevent corrupted data to remain corrupted. [OPW-3704007](https://www.odoo.com/web#id=3704007&model=project.task) Related to odoo/upgrade#5574 Forward-Port-Of: odoo/odoo#155709
Before this commit, when a DM chat had a custom name, the search was not taking it into account. Steps to reproduce: - Log in as Mitchell Admin - Open a DM chat with Marc Demo in Discuss app - Rename conversation to "Test" - Open more than 20 chat/channels (can create 20 channels) - type "Test" in the quick search of discuss app sidebar => The DM chat with Marc Demo is not visible in filtered sidebar. This happens because the quick search was relying on `thread.name`, which actually o
Original PR description
Before this commit, when a DM chat had a custom name, the search was not taking it into account. Steps to reproduce: - Log in as Mitchell Admin - Open a DM chat with Marc Demo in Discuss app - Rename…
Before this commit, when a DM chat had a custom name, the search was not taking it into account. Steps to reproduce: - Log in as Mitchell Admin - Open a DM chat with Marc Demo in Discuss app - Rename conversation to "Test" - Open more than 20 chat/channels (can create 20 channels) - type "Test" in the quick search of discuss app sidebar => The DM chat with Marc Demo is not visible in filtered sidebar. This happens because the quick search was relying on `thread.name`, which actually only matches exactly the UI when this is the name of a channel or when a group chat is explictly named. The actual thread field used that matches textual name of thread is `thread.displayName`, and this field is synced with custom DM chat if any. Before/After <img width="297" alt="before" src="https://github.com/odoo/odoo/assets/6569390/ee82a9c5-8413-4887-96d1-85c80120bb43"> <img width="290" alt="after" src="https://github.com/odoo/odoo/assets/6569390/06f2a25f-34f2-413a-9408-70292113ea9b"> Forward-Port-Of: odoo/odoo#161540
Fixes a few things: - A couple placeholders existed for non-required fields, which means in certain cases they would be printed in real reports (i.e. not just shown in studio) - hide the UoM from the deliveryslip when the setting isn't active (this is broken in earlier versions too, but fix can be backported if someone finally complains about it since it's been there for awhile) - Updates a placeholder that was confusing (a location instead of a package name) Note only `stock` reports were
Original PR description
Fixes a few things: - A couple placeholders existed for non-required fields, which means in certain cases they would be printed in real reports (i.e. not just shown in studio) - hide the UoM from the deliveryslip when the setting isn't active (this is broken in earlier versions too, but fix can be backported if someone finally complains about it since it's been there for awhile) - Updates a placeholder that was confusing (a location instead of a package name) Note only `stock` reports were checked for this fix, there are probably still other problematic reports. See PR: https://github.com/odoo/odoo/pull/129310 for reference of when placeholders were added in --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161420 Forward-Port-Of: odoo/odoo#161360
Steps to Reproduce: - Install Project App - Go inside any project and set the state of task as done - Click on project burger menu and click on settings Issue: - The count on the stat button refers to count of all tasks Causes: - Reference of wrong field in the XML i.e ., 'task_count' instead of 'open_task_count'. Solution: - Changing the field to reference it to open tasks count i.e., 'open_task_count' task-3741260 Description of the issue/feature this PR addresses
Original PR description
Steps to Reproduce: - Install Project App - Go inside any project and set the state of task as done - Click on project burger menu and click on settings Issue: - The count on the stat button refers to count of all tasks Causes: - Reference of wrong field in the XML i.e ., 'task_count' instead of 'open_task_count'. Solution: - Changing the field to reference it to open tasks count i.e., 'open_task_count' task-3741260 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#153984
The payment with MobilePay payment method failed due to the wrong code. opw-3859956 Forward-Port-Of: odoo/odoo#161481
Original PR description
The payment with MobilePay payment method failed due to the wrong code. opw-3859956 Forward-Port-Of: odoo/odoo#161481
This commit allows the user to search a specific quant in the detailed operation view via the display name build from its characteristics For instance, searching 'WH/Stock - LOT1' will search for quant having location 'WH/Stock' and lot_id 'LOT1'. This is not a 100% valid search as we don't really know what are the object represented in the name. We only know the first one is always a location. Description of the issue/feature this PR addresses: Current behavior before PR: Desired be
Original PR description
This commit allows the user to search a specific quant in the detailed operation view via the display name build from its characteristics For instance, searching 'WH/Stock - LOT1' will search for quant having location 'WH/Stock' and lot_id 'LOT1'. This is not a 100% valid search as we don't really know what are the object represented in the name. We only know the first one is always a location. 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#141527
### Steps to reproduce * install l10n_es_edi_facturae * create and confirm an invoice * click on 'Send & Print' You should see that you are unable to uncheck 'Generate Facturae edi file' ### Cause In 0d3d6c8, `l10n_es_edi_facturae_checkbox_xml` changed to a non-stored and read-only computed field. ### Fix A proper fix would consist in making the field `l10n_es_edi_facturae_checkbox_xml` stored. But we can't do that in stable. So we make it `company_dependent` as a workaround
Original PR description
### Steps to reproduce * install l10n_es_edi_facturae * create and confirm an invoice * click on 'Send & Print' You should see that you are unable to uncheck 'Generate Facturae edi file' ### Cause In 0d3d6c8, `l10n_es_edi_facturae_checkbox_xml` changed to a non-stored and read-only computed field. ### Fix A proper fix would consist in making the field `l10n_es_edi_facturae_checkbox_xml` stored. But we can't do that in stable. So we make it `company_dependent` as a workaround. opw-3772085 Forward-Port-Of: odoo/odoo#161433
When user deletes line of journal items and tries to save invoice, a traceback appear. Steps to reproduce the error: - Create a new invoice > add 1 product > Save - Go to journal items > delete 1 line - Change currency > Save Traceback: ``` ValueError: not enough values to unpack (expected 3, got 2) File "odoo/http.py", line 2252, in __call__ response = request._serve_db() File "odoo/http.py", line 1828, in _serve_db return self._transactioning(_serve_ir_http, readonl
Original PR description
When user deletes line of journal items and tries to save invoice, a traceback appear. Steps to reproduce the error: - Create a new invoice > add 1 product > Save - Go to journal items > delete 1…
When user deletes line of journal items and tries to save invoice,
a traceback appear.
Steps to reproduce the error:
- Create a new invoice > add 1 product > Save
- Go to journal items > delete 1 line
- Change currency > Save
Traceback:
```
ValueError: not enough values to unpack (expected 3, got 2)
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 38, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/web/models/models.py", line 72, in web_save
self.write(vals)
File "home/odoo/src/enterprise/saas-17.1/documents_account/models/account_move.py", line 30, in write
res = super().write(vals)
File "addons/account/models/account_move.py", line 2669, in write
self._sanitize_vals(vals)
File "addons/account/models/account_move.py", line 2630, in _sanitize_vals
for command, line_id, line_vals in vals['line_ids']:
```
https://github.com/odoo/odoo/blob/6768cf06138bb5c94a6c77db79ed5d802333b290/addons/account/models/account_move.py#L2422 Here, vals['line_ids'] have 2 values, so for 'line_vals' there is no value.
So when user tries to save invoice,
It will lead to the above traceback.
sentry-5119406548
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#160266The `stock.move:_action_done()` already reserve the next mto moves at validation. Calling the reservation method after the validation again may lead to unwanted results like calling `check_entire_pack()` and messed up the result_package_id on the stock move lines. Task : 3764822 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
Original PR description
The `stock.move:_action_done()` already reserve the next mto moves at validation. Calling the reservation method after the validation again may lead to unwanted results like calling `check_entire_pack()` and messed up the result_package_id on the stock move lines. Task : 3764822 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#161445 Forward-Port-Of: odoo/odoo#160337
This commit fixes a traceback that occurs when calling `getValue` on `wysiwyg` while the `odooEditor` instance variable is not defined for whatever reason. task-3600667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161110 Forward-Port-Of: odoo/odoo#157979
Original PR description
This commit fixes a traceback that occurs when calling `getValue` on `wysiwyg` while the `odooEditor` instance variable is not defined for whatever reason. task-3600667 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161110 Forward-Port-Of: odoo/odoo#157979
Issue: ====== traceback when clicking on gradient colorpicker in mass_mailing Steps to reproduce the issue: ============================= - Got to email marketing - Add some text - Select the text and go to graadient and activate custom - click any color in the colorpalette -> traceback Origin of the issue: ==================== Some colorpickers are created inside the snippets sidebar and then gets removed by `_updateRightPanelContent` in `SnippetsMenu` so the owl components corro
Original PR description
Issue: ====== traceback when clicking on gradient colorpicker in mass_mailing Steps to reproduce the issue: ============================= - Got to email marketing - Add some text - Select the text and go to graadient and activate custom - click any color in the colorpalette -> traceback Origin of the issue: ==================== Some colorpickers are created inside the snippets sidebar and then gets removed by `_updateRightPanelContent` in `SnippetsMenu` so the owl components corrosponding to them will have `this.el = null` which will cause a problem when updating the props since we will use it in the update. task-3834112 Forward-Port-Of: odoo/odoo#159842
Steps: - Install sales app. - Go to settings of sales. - See header field there is no download button. Issue: - Binary field should have download button and user should be able to download file with out issue. Cause: - Since Settings is abstract model so it does not contains id field in it and download button visibility depends on id field. Fix: - - Extend binary field for setting view to get proper file from related field where actual file is stored. task-3620555 Forward-Por
Original PR description
Steps: - Install sales app. - Go to settings of sales. - See header field there is no download button. Issue: - Binary field should have download button and user should be able to download file with out issue. Cause: - Since Settings is abstract model so it does not contains id field in it and download button visibility depends on id field. Fix: - - Extend binary field for setting view to get proper file from related field where actual file is stored. task-3620555 Forward-Port-Of: odoo/odoo#161245 Forward-Port-Of: odoo/odoo#160070
Steps to reproduce: ------------------- - create a storable product and set a quantity on hand - create a delivery for this product and set to draft - add a demand for this product on the delivery - click on "Mark as Todo" - go to the product form - click on the Forecasted smart button - click on "Unreserve" button (to process business logic ans reload report) Issue: ------ The report is reloaded with all products. Cause: ------ When we setup/start the `StockForecasted` compone
Original PR description
Steps to reproduce: ------------------- - create a storable product and set a quantity on hand - create a delivery for this product and set to draft - add a demand for this product on the delivery -…
Steps to reproduce: ------------------- - create a storable product and set a quantity on hand - create a delivery for this product and set to draft - add a demand for this product on the delivery - click on "Mark as Todo" - go to the product form - click on the Forecasted smart button - click on "Unreserve" button (to process business logic ans reload report) Issue: ------ The report is reloaded with all products. Cause: ------ When we setup/start the `StockForecasted` component, if we can't find an active model in the action's context, we try to find it in the action's props (via res_model or on the original action if necessary). If the original action is used, the active model must be in the context of the original action. Unfortunately, this is not the case. Without `resModel` the domain determined in the `graphDomain` method will not filter on the product (which corresponds to the `active_id`). Solution: --------- If no resModel is found via the context, add it to the context when it is determined. Add the action id to handle the case of reloading the page directly via the browser's refresh button. opw-3793065 Forward-Port-Of: odoo/odoo#158063
When generating the PDF, the translatable fields (the note of the payment terms, the name of the products, etc) will use the language set on the partner_id of the invoice. The xml generated should do the same. opw-3842885 Forward-Port-Of: odoo/odoo#161140
Original PR description
When generating the PDF, the translatable fields (the note of the payment terms, the name of the products, etc) will use the language set on the partner_id of the invoice. The xml generated should do the same. opw-3842885 Forward-Port-Of: odoo/odoo#161140
**[FIX] round_per_line: Fix payment CFDI rounding issues** - 'base' * 'tasa_o_cuota' must give 'importe' with 0.01 rounding error allowed. Suppose an invoice of 5 * 0.47 with 16% tax. Each line gives a tax amount of 0.08 so 0.40 for the whole invoice. However, 5 * 0.47 = 2.35 and 2.35 * 0.16 = 0.38 so the constraint is failing. - 'base' + 'importe' must be exactly equal to the part that is actually paid. Using the same example, we need to report 2.35 + 0.40 = 2.75 **[FIX] round_globall
Original PR description
**[FIX] round_per_line: Fix payment CFDI rounding issues** - 'base' * 'tasa_o_cuota' must give 'importe' with 0.01 rounding error allowed. Suppose an invoice of 5 * 0.47 with 16% tax. Each line gives…
**[FIX] round_per_line: Fix payment CFDI rounding issues** - 'base' * 'tasa_o_cuota' must give 'importe' with 0.01 rounding error allowed. Suppose an invoice of 5 * 0.47 with 16% tax. Each line gives a tax amount of 0.08 so 0.40 for the whole invoice. However, 5 * 0.47 = 2.35 and 2.35 * 0.16 = 0.38 so the constraint is failing. - 'base' + 'importe' must be exactly equal to the part that is actually paid. Using the same example, we need to report 2.35 + 0.40 = 2.75 **[FIX] round_globally: Manage round globally** Before, the results given in case of round_globally was the same as round_per_line. Suppose an invoice of 5 * 0.47 with 16% tax. We were sending a tax detail of 0.47 * 0.16 ~= 0.08 for each line, so 0.40 for the whole invoice. However, in case of round globally, the total tax is 5 * 0.47 * 0.16 ~= 0.38. The invoice was incorrectly reported as an invoice of 2.75 instead of 2.73. To fix that, the base/tax amount per line are now given using 6 decimals. **[FIX] Deterministic invoices's order in payment CFDI** Before generating a payment CFDI, make sure the invoices are sorted in order to avoid a not deterministic xml. **[FIX] Rounding of TipoCambio** On the xml, the rate to switch from the invoice to payment rate is rounded to 6 decimals. By consistency, we need to use the same number of decimals during the computation to avoid the xml to be rejected. For example: With an MX company setup USD Exchange rate: - Yesterday 17.187 - Today 17.0357 Create an invoice with: - date: yesterday, quantity: 200, unit price: 7.34 USD, tax: 16% Confirm and Send the invoice Register the payment with today date Open the payment and force cfdi SAT Validation will return an error: ''' Code : CRP20204 Message : El valor del campo TotalTrasladosBaseIVA16 no es igual al redondeo de la suma del resultado de multiplicar cada uno de los importes de los atributos BaseP de los impuestos trasladados registrados en el elemento TrasladoP donde los atributos contengan en ImpuestoP el valor IVA, en TipoFactorP el valor Tasa y en TasaOCuotaP el valor 0.160000, por el valor registrado en el atributo TipoCambioP de cada nodo Pago. ''' opw-3775099 **[FIX] Rounding of TotalTrasladosBaseIVA16** - Have an MX company setup - USD Exchange rate: - Yesterday 16.9912 - Today 17.068 - Create two invoices as follows: 1) date yesterday, qty 68.25, unit price 68 USD, tax 16%, total 5383.56 USD 2) date yesterday, qty 24.00, unit price 68 USD, tax 16%, total 1893.12 USD Confirm and Send the two invoices In invoices list view, select both and register payment Select 'Group Payments' Open one of the invoices, and press "Update Payments" In CFDI Tab Force cfdi for the payment Issue: Cfdi validation return an error """ Code : CRP20204 Message : El valor del campo TotalTrasladosBaseIVA16 no es igual al redondeo de la suma del resultado de multiplicar cada uno de los importes de los atributos BaseP de los impuestos trasladados registrados en el elemento TrasladoP donde los atributos contengan en ImpuestoP el valor IVA, en TipoFactorP el valor Tasa y en TasaOCuotaP el valor 0.160000, por el valor registrado en el atributo TipoCambioP de cada nodo Pago. """ opw-3775099 Forward-Port-Of: odoo/enterprise#60532 Forward-Port-Of: odoo/enterprise#60025
### [FIX] l10n_be_codabox: fallback on Company ID if no Tax ID In Belgium, some companies may not have a Tax ID (for instance non-profit organisations). In that case, we should fallback on the Company ID. task-id: none (validated with LAJE) Forward-Port-Of: odoo/enterprise#60552 Forward-Port-Of: odoo/enterprise#60333
Original PR description
### [FIX] l10n_be_codabox: fallback on Company ID if no Tax ID In Belgium, some companies may not have a Tax ID (for instance non-profit organisations). In that case, we should fallback on the Company ID. task-id: none (validated with LAJE) Forward-Port-Of: odoo/enterprise#60552 Forward-Port-Of: odoo/enterprise#60333
To reproduce the issue: 1) Create an account.move move_1, leave it in draft 2) Create another account.move move_2, using the same accounts as move_1 and at the same date, leave it in draft 3) Make sure move_1 and move_2's sequence numbers are empty (so that their sequence number will be recomputed at posting) 3) Post move_2 4) Post move_1 5) Open the General Ledger, unfold the lines of the accounts touched by move_1 and move_2. ===> Problem: the move_1's move lines appear before move_2's, e
Original PR description
To reproduce the issue: 1) Create an account.move move_1, leave it in draft 2) Create another account.move move_2, using the same accounts as move_1 and at the same date, leave it in draft 3) Make sure move_1 and move_2's sequence numbers are empty (so that their sequence number will be recomputed at posting) 3) Post move_2 4) Post move_1 5) Open the General Ledger, unfold the lines of the accounts touched by move_1 and move_2. ===> Problem: the move_1's move lines appear before move_2's, even though move_2 has a lower sequence. This is due to the fact move lines with identical dates were ordered by id by the GL. Since move_1 was created first, its lines had a lower id. We fix that by adding the move_name to the ordering criteria. Move lines will still be primarily ordered by date, but if they have the same date, we'll now use the move_name before falling back to their id. Forward-Port-Of: odoo/enterprise#60411 Forward-Port-Of: odoo/enterprise#59213
Purpose ======= Add unit tests for the document activity view Test the fix of document archiving in the activity view PR: odoo/odoo/pull/151741 Task: 3704340 Load the services in a utils function to remove code redundancy. Task-3714544 Forward-Port-Of: odoo/enterprise#60525 Forward-Port-Of: odoo/enterprise#60140
Original PR description
Purpose ======= Add unit tests for the document activity view Test the fix of document archiving in the activity view PR: odoo/odoo/pull/151741 Task: 3704340 Load the services in a utils function to remove code redundancy. Task-3714544 Forward-Port-Of: odoo/enterprise#60525 Forward-Port-Of: odoo/enterprise#60140
When marketing activity is created with trigger sms_not_clicked it isn't being run because schedule_date stays null. task-3648034 Forward-Port-Of: odoo/enterprise#59135
Original PR description
When marketing activity is created with trigger sms_not_clicked it isn't being run because schedule_date stays null. task-3648034 Forward-Port-Of: odoo/enterprise#59135
Configure an email alias for the jounrnal 'Vendor Bills' Send to the mail alias two pdf bills Issue: Only 1 record is created with the 2 bills as attachment The system should split the bills into separate records, but this does not occur: - after the first bill is processed the current move extract_state is 'waiting_extraction' - when the system check whether to extract data from the second document the result is negative, while it should be positive when new_document is true, i
Original PR description
Configure an email alias for the jounrnal 'Vendor Bills' Send to the mail alias two pdf bills Issue: Only 1 record is created with the 2 bills as attachment The system should split the bills into separate records, but this does not occur: - after the first bill is processed the current move extract_state is 'waiting_extraction' - when the system check whether to extract data from the second document the result is negative, while it should be positive when new_document is true, in order to create a separate move. Related: https://github.com/odoo/odoo/pull/160983 opw-3822262 Forward-Port-Of: odoo/enterprise#60168
An interviewer cannot see refused or archived applicants in the hr_recruitment module. The problem comes from hr_referral. With this fix, the interviewer can see refused and archived applicants. Task: 3802121 Forward-Port-Of: odoo/enterprise#58956
Original PR description
An interviewer cannot see refused or archived applicants in the hr_recruitment module. The problem comes from hr_referral. With this fix, the interviewer can see refused and archived applicants. Task: 3802121 Forward-Port-Of: odoo/enterprise#58956
Before this commit, in case of a 401 response by UPS, the user got a traceback `KeyError: 'currency_code'` This happened because in that case, the `result` variable was set to `{'Unauthorized':1}`, but this was not caught in `ups_rest_send_shipping` This commit raises a UserError to avoid the traceback. opw-3848137 Forward-Port-Of: odoo/enterprise#60513 Forward-Port-Of: odoo/enterprise#60014
Original PR description
Before this commit, in case of a 401 response by UPS, the user got a traceback `KeyError: 'currency_code'`
This happened because in that case, the `result` variable was set to `{'Unauthorized':1}`, but this was not caught in `ups_rest_send_shipping`
This commit raises a UserError to avoid the traceback.
opw-3848137
Forward-Port-Of: odoo/enterprise#60513
Forward-Port-Of: odoo/enterprise#60014Steps to reproduce ==================== 1. Install Appointment and the Gcal sync. 2. Connect your Google Account. 3. Create an appointment type and keep the videoConference field blank. 4. Book an appointment. The meeting link is added to the calendar event of Google in sync. After this PR ================== - Add a meeting link only if Google Meet is selected in the configuration. - The appointment_google_calendar module is automatically installed based on dependencies. Task-3614
Original PR description
Steps to reproduce ==================== 1. Install Appointment and the Gcal sync. 2. Connect your Google Account. 3. Create an appointment type and keep the videoConference field blank. 4. Book an appointment. The meeting link is added to the calendar event of Google in sync. After this PR ================== - Add a meeting link only if Google Meet is selected in the configuration. - The appointment_google_calendar module is automatically installed based on dependencies. Task-3614890 Forward-Port-Of: odoo/enterprise#53569
### Steps to reproduce: - Go to Settings > Shipping > Fedex > Fedex Shipping Methods - Click on "Fedex international" and unable: "Generate Return Label" - Create a new sale order for a product - Click on "add shipping" and select "Fedex international" - Confirm the SO and go to the related delivery - Add the qty as done and validate the delivery #### > you will have a traceback (if not stopped by a user/config error) ### Cause of the issue: The `packages` defined here: https:/
Original PR description
### Steps to reproduce: - Go to Settings > Shipping > Fedex > Fedex Shipping Methods - Click on "Fedex international" and unable: "Generate Return Label" - Create a new sale order for a product -…
### Steps to reproduce: - Go to Settings > Shipping > Fedex > Fedex Shipping Methods - Click on "Fedex international" and unable: "Generate Return Label" - Create a new sale order for a product - Click on "add shipping" and select "Fedex international" - Confirm the SO and go to the related delivery - Add the qty as done and validate the delivery #### > you will have a traceback (if not stopped by a user/config error) ### Cause of the issue: The `packages` defined here: https://github.com/odoo/enterprise/blob/b3fe7d2bef7e0992d5ae7461a91861f5be059a0e/delivery_fedex/models/delivery_fedex.py#L369 is a list of records. However, these two lines: https://github.com/odoo/enterprise/blob/b3fe7d2bef7e0992d5ae7461a91861f5be059a0e/delivery_fedex/models/delivery_fedex.py#L377 https://github.com/odoo/enterprise/blob/b3fe7d2bef7e0992d5ae7461a91861f5be059a0e/delivery_fedex/models/delivery_fedex.py#L380 try to access the `.commodities` field of that object. A list comprehension is therefore needed for that operation to work properly. opw-3810796 --- Forward-Port-Of: odoo/enterprise#59736
Before this PR ================== At the time of the upload failure we display the standard error msg, Because of this, the user will try to upload the video again and again and never know the exact reason for the failure. After this PR ================= This commit adds some validation so that we avoid any upload failure from the YouTube side and display a proper error msg. 1). Checks that Title is not more than 100 characters. 2). Check that the Description is not more than 500
Original PR description
Before this PR ================== At the time of the upload failure we display the standard error msg, Because of this, the user will try to upload the video again and again and never know the exact reason for the failure. After this PR ================= This commit adds some validation so that we avoid any upload failure from the YouTube side and display a proper error msg. 1). Checks that Title is not more than 100 characters. 2). Check that the Description is not more than 5000 characters. 3). Checks that Title does not contain > or < forbidden character. 4). Checks that the description does not contain > or < forbidden character. These checks are done at the time of the upload video and also at the time of the post. Task-3392167 Forward-Port-Of: odoo/enterprise#44032
To reproduce: 1. Install pos_restaurant_appointment 2. Create an appointment so that the beginning is before "now" and the end is < 1 hour after "now" Before this commit: It the filter remove values such that nothing is left, the getMin function will crash with a JS traceback: `Caused by: TypeError: Reduce of empty array with no initial value` After this commit: The PoS load as normal opw-3848704 Forward-Port-Of: odoo/enterprise#60457
Original PR description
To reproduce: 1. Install pos_restaurant_appointment 2. Create an appointment so that the beginning is before "now" and the end is < 1 hour after "now" Before this commit: It the filter remove values such that nothing is left, the getMin function will crash with a JS traceback: `Caused by: TypeError: Reduce of empty array with no initial value` After this commit: The PoS load as normal opw-3848704 Forward-Port-Of: odoo/enterprise#60457
Currently, when the company has a french localization and activates the qr code option on the pos bill, if a customer scans the qr code, he will 'inevitably' meet an error: > According to the french law, you cannot modify a point of sale order. Forbidden fields: date_order, user_id, lines, payment_ids, ... Steps to reproduce: ------------------- * Install **France - Accounting** * Switch to `FR Company` * Go to the app **Point of Sale** * Select **Configuration** > **Settings** * Enabl
Original PR description
Currently, when the company has a french localization and activates the qr code option on the pos bill, if a customer scans the qr code, he will 'inevitably' meet an error: > According to the french…
Currently, when the company has a french localization and activates the qr code option on the pos bill, if a customer scans the qr code, he will 'inevitably' meet an error: > According to the french law, you cannot modify a point of sale order. Forbidden fields: date_order, user_id, lines, payment_ids, ... Steps to reproduce: ------------------- * Install **France - Accounting** * Switch to `FR Company` * Go to the app **Point of Sale** * Select **Configuration** > **Settings** * Enable `Use QR code on ticket` * Open a shop session * Add anything * Select/or not a customer * Select **Payment** * Select any payment method then validate * Scan the qr code on the ticket * Try filling the form and saving > Observation: Error Why the fix: ------------ We understand the confusion for french localization users to be presented with a feature which they are not able to use as intended. The Qr code feature was implemented to make it easier and quicker at the cashier but will always end up in an error, unless a client was selected and the invoice was created when validating the payment at the register. But then, it doesn't save time. Since they are not able to use the feature as intended, we decided to make it unavailable for companies with a french localization. There has been a lot of discussion about how to solve this issue. However, a lot of the ideas discussed were not doable in stable versions and this is the only solution we agreed on. opw-3704767 Forward-Port-Of: odoo/odoo#160304 Forward-Port-Of: odoo/odoo#158786
Use case: - Create a Kit BoM with finished qty to 5 consuming 10 components - Do a sale order for 3 units (3/5 of BoM) - Update the sale order line to 4 units Current behavior: The delivery has a huge amount to deliver Expected: The delivery is for 8 units It happens because the method `_compute_kit_quantities` always expect a BoM for 1 units. `bom_line_data['original_qty']` always contains the number of times the BoM will be needed and not the quantity of finished products. In or
Original PR description
Use case: - Create a Kit BoM with finished qty to 5 consuming 10 components - Do a sale order for 3 units (3/5 of BoM) - Update the sale order line to 4 units Current behavior: The delivery has a huge amount to deliver Expected: The delivery is for 8 units It happens because the method `_compute_kit_quantities` always expect a BoM for 1 units. `bom_line_data['original_qty']` always contains the number of times the BoM will be needed and not the quantity of finished products. In order to have the number of component by unit of finished product we have to introduce the BoM quantity in the formula 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#160149