Tuesday, February 28, 2023
10 changes · master
Enhancements to existing features
IoT warning and error dialogs now use a clearer, more consistent style similar to the standard form error dialog. This helps users better understand connection problems and recover from them with less confusion.
Original PR description
The aim of this commit is to make more warning and error dialogs behave like the "oh snap" dialog of form views. task-id=3126594
Miscellaneous changes
Commit 5ba660f87a71f068ffb13f54f8de63d90ffcc166 changed the way phonecalls are created from 'phonecall' activities. As a result, if an activity is already associated with a phone number, the related partner is never computed, resulting in this information remaining missing. The goal of this commit is to restore the previous behavior, that is, looking for the relevant partner even if a phone number is already known for the given activity. Task-3199796 Forward-Port-Of: odoo/enterprise#37352
Original PR description
Commit 5ba660f87a71f068ffb13f54f8de63d90ffcc166 changed the way phonecalls are created from 'phonecall' activities. As a result, if an activity is already associated with a phone number, the related partner is never computed, resulting in this information remaining missing. The goal of this commit is to restore the previous behavior, that is, looking for the relevant partner even if a phone number is already known for the given activity. Task-3199796 Forward-Port-Of: odoo/enterprise#37352
Small error made when forward-porting https://github.com/odoo/enterprise/pull/32866. Forward-Port-Of: odoo/enterprise#37597
Original PR description
Small error made when forward-porting https://github.com/odoo/enterprise/pull/32866. Forward-Port-Of: odoo/enterprise#37597
When submitting the tax report in the UK, some information should be provided in the header of the request. Some of them where either missing or wrongly formatted. A new version of the send button was required in order to get client side information that are required (such as the size of the screen and the size of the window). Note that errors about the header for the multi-factor authentification and about the license can be ignored because it's not mandatory to activate such security whe
Original PR description
When submitting the tax report in the UK, some information should be provided in the header of the request. Some of them where either missing or wrongly formatted. A new version of the send button…
When submitting the tax report in the UK, some information should be provided in the header of the request. Some of them where either missing or wrongly formatted. A new version of the send button was required in order to get client side information that are required (such as the size of the screen and the size of the window). Note that errors about the header for the multi-factor authentification and about the license can be ignored because it's not mandatory to activate such security when using Odoo and not everyone using Odoo has a enterprise license (discuss with HMRC directly) The list of headers and their format can be found here: https://developer.service.hmrc.gov.uk/guides/fraud-prevention/connection-method/web-app-via-server/ **How to Test:** 1. Activate Debug Mode (in hmrc_service.py) 2. In hmrc_vat_obligation.py, the endpoint request needs to be changed to _/test/fraud-prevention-headers/validate_ 3. An test individual needs to be created using the government page: https://developer.service.hmrc.gov.uk/api-test-user 4. The VAT Registration Number needs to be copied into the UK company. Keep the username and password too 5. When submitting the tax report, you'll first need to connect to hmrc using the credentials previously gotten. NB: The credentials can be reset by going to the user page and under the UK HMRC Integration tab. **Known issues:** 1. When testing in local, some of the headers won't be valid (for example the gov-client-public-ip header can't be provided, gov-vendor-forwarded won't be a public IP address... Every header that require Public IP address or different vendor and client IP address) 2. Multifactor header can't always be provided because the option is not mandatory to use Odoo 3. The Gov-Vendor-License-IDs also can't always be provided task-2925880 Forward-Port-Of: odoo/enterprise#34247
This commit aims to make the 'name_search' symmetrical to the name_get for the knowledge.article model. As we append the icon (emoji) before the article name, when searching based on that same syntax '[emoji] name' we need to return the appropriate results. This is especially important since some flows, such as exporting and re-importing records, are based on name_get / name_search to match records (for example when importing the article parent record, without this override it will never m
Original PR description
This commit aims to make the 'name_search' symmetrical to the name_get for the knowledge.article model. As we append the icon (emoji) before the article name, when searching based on that same syntax '[emoji] name' we need to return the appropriate results. This is especially important since some flows, such as exporting and re-importing records, are based on name_get / name_search to match records (for example when importing the article parent record, without this override it will never match). Task-3175039 Forward-Port-Of: odoo/enterprise#37268
Forward-Port-Of: odoo/enterprise#37511
Original PR description
Forward-Port-Of: odoo/enterprise#37511
Those 3 reports became unusable when they contained too many lines. This happened when a big number of partners were involved in the transactions they reported. When opened on Chrome, scrolling was only possible with big saccades ; on Firefox, the scrolling was smooth but the report took way longer to open. This was due to the style rendering. On Chrome, it is done in a lazy manner, directly when scrolling ; Firefox preloads everything. On even larger number of lines, the reports even fail
Original PR description
Those 3 reports became unusable when they contained too many lines. This happened when a big number of partners were involved in the transactions they reported. When opened on Chrome, scrolling was…
Those 3 reports became unusable when they contained too many lines. This happened when a big number of partners were involved in the transactions they reported. When opened on Chrome, scrolling was only possible with big saccades ; on Firefox, the scrolling was smooth but the report took way longer to open. This was due to the style rendering. On Chrome, it is done in a lazy manner, directly when scrolling ; Firefox preloads everything. On even larger number of lines, the reports even failed to open, raising a MemoryError during the Qweb rendering of the html. To solve that, we choose to give the option to regroup the lines of those report by prefix of their name. The first character of each line will be used to create an index in the UI: for examples, 'Arnold' and 'Arthur' would both be grouped under a common line 'A'. By default, we only display those prefix lines, tremendously reducing the number of lines to be rendered in the report itself. Those lines can then be unfolded manually by the user depending what he wants to see. If unfolding a line should inject too many lines into the report again (for example, thousands of partner names could start with letter 'A'), the prefix grouping mechanism is called recursively. We will then generate under line A sublines AA, AB, AC, ... (of course not generating lines for prefixes not matching any partner). When unfolding a prefix line, if only a reasonable number of lines should be loaded, we don't generate sub-prefixes, but directly add all the partner lines matching the parent prefix. The report structure hence adapts itself to the data, keeping it comfortable for the user. In order to make this work, some refactoring was also necessary on the way the totals below sections were generated, in order to standardize their behavior on groupby lines. This new prefix grouping feature is by default NOT activated. It can be enabled separately for Aged Payable/Receivable and Partner Ledger by defining new config parameters, and providing as its value the threshold defining what we consider as "too many sublines". When the number of partner lines to display is greater than that threshold, prefix groups are used automatically. Here are the names of these config parameters: - For AP/AR: account_reports.aged_partner_balance.groupby_prefix_groups_threshold - For Partner Ledger: account_reports.partner_ledger.groupby_prefix_groups_threshold This PR also contains the following fix (necessary to have tests run, because of the change on total lines): [FIX] account_reports: generic P&L: Make Depreciation line foldable For usability; to keep consistency with the 'Expenses' line above. Forward-Port-Of: odoo/enterprise#37425 Forward-Port-Of: odoo/enterprise#35026
When the "action_home_page" action of the knowledge.article opens an article in readonly mode, it sets the "form_view_initial_mode" to readonly. That results into locking the form view in readonly even when switching to an article you have write access to. That "form_view_initial_mode" is actually not necessary as the view will correctly be set as readonly or not depending on the user access rights. Task-3203549 Forward-Port-Of: odoo/enterprise#37528
Original PR description
When the "action_home_page" action of the knowledge.article opens an article in readonly mode, it sets the "form_view_initial_mode" to readonly. That results into locking the form view in readonly even when switching to an article you have write access to. That "form_view_initial_mode" is actually not necessary as the view will correctly be set as readonly or not depending on the user access rights. Task-3203549 Forward-Port-Of: odoo/enterprise#37528
The query gets increasingly complicated the more models there are associated to data_merge.record entries. The previous optimization for False value doesn't make too much sense anymore since it optimizes the fastes case, whehter the slower ones are much worse. On upg-416839 the previous query generated by the search method took more than 23h before killed. Current one is faster, in the order of minutes (max) but that's not fast enough. Forward-Port-Of: odoo/enterprise#37422 Forward-Port-Of: od
Original PR description
The query gets increasingly complicated the more models there are associated to data_merge.record entries. The previous optimization for False value doesn't make too much sense anymore since it optimizes the fastes case, whehter the slower ones are much worse. On upg-416839 the previous query generated by the search method took more than 23h before killed. Current one is faster, in the order of minutes (max) but that's not fast enough. Forward-Port-Of: odoo/enterprise#37422 Forward-Port-Of: odoo/enterprise#36980
Forward-Port-Of: odoo/enterprise#37318
Original PR description
Forward-Port-Of: odoo/enterprise#37318