Monday, September 27, 2021
33 changes · master
Enhancements to existing features
The salary contract setup screens are now easier to use. Users will no longer see an unusable state selector when no states exist for the selected country, and salary simulation links in the wizard can be opened directly.
Original PR description
- Disable state selection when there are no state for the country - Make salary link clickable on the wizard TaskID: 2648988
Code cleanup and technical improvements
This refactor standardizes how related inventory, purchasing, manufacturing, and sales stock records are grouped internally. It reduces code complexity and helps prevent subtle mismatches in stock and procurement processing, with no intended change to day-to-day user workflows.
Original PR description
Instead of using sort + groupby of itertools (which group only consecutive), use only the groupby of odoo.tools which decrease the complexity of the code and avoid unmatched keys between sort keys and groupby keys task-2648449
Miscellaneous changes
Backport of odoo/odoo@c1ea516aa701dde77149348d31fdd08f46550004 as we think this is important to have in 14.5 to ease command palette usage. Currently, in some of the important business objects' form views, few header buttons are missing the title, and so the command palette displays the button string which is not very clear/useful. This commit improves the behavior by adding titles to the buttons. Below are the model wise actions/methods linked with updated buttons: - preview_invoi
Original PR description
Backport of odoo/odoo@c1ea516aa701dde77149348d31fdd08f46550004 as we think this is important to have in 14.5 to ease command palette usage. Currently, in some of the important business objects' form views, few header buttons are missing the title, and so the command palette displays the button string which is not very clear/useful. This commit improves the behavior by adding titles to the buttons. Below are the model wise actions/methods linked with updated buttons: - preview_invoice (account.move) - action_sale_quotations_new (crm.lead) - action_set_lost (crm.lead) - action_set_won_rainbowman (crm.lead) - crm_lead_lost_action (crm.lead) - iap_enrich (crm.lead) Task-2622266 Forward-Port-Of: odoo/odoo#77170
Before this commit, the positioning of the dropdown (which is powered as a poppover) was executed all the time by the constructor. This commit factorizes that operation, both for clarity and for extensivity sakes. In particular, in pivot in mobile, we may not want to be placed as a popper, since we need the overflow anyway. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the C
Original PR description
Before this commit, the positioning of the dropdown (which is powered as a poppover) was executed all the time by the constructor. This commit factorizes that operation, both for clarity and for extensivity sakes. In particular, in pivot in mobile, we may not want to be placed as a popper, since we need the overflow anyway. 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#77059
One of the two "magic" library we allow to use to guess to mimetype of data is sometimes returning "image/svg" instead of the wanted "image/svg+xml". Forward-Port-Of: odoo/odoo#77136 Forward-Port-Of: odoo/odoo#68211
Original PR description
One of the two "magic" library we allow to use to guess to mimetype of data is sometimes returning "image/svg" instead of the wanted "image/svg+xml". Forward-Port-Of: odoo/odoo#77136 Forward-Port-Of: odoo/odoo#68211
Now, iap only return images urls and colors to use to process the svg. We don't need to 'download' svg preprocess, we use the svg locally and make the substitution our self. It simplify the maintenance: Preview of theme are in theme repository It make it blazing fast: Response contains a list of string, and not more a big string, the svg. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I conf
Original PR description
Now, iap only return images urls and colors to use to process the svg. We don't need to 'download' svg preprocess, we use the svg locally and make the substitution our self. It simplify the maintenance: Preview of theme are in theme repository It make it blazing fast: Response contains a list of string, and not more a big string, the svg. 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#77139
We use ir.filters for dynamic snippet filter. But domain is not exactly the same syntax. e.g. time.strftime() vs context_today() So we add a fake action_id to avoid to display these filters on each action of this model. task-2654131 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#7698
Original PR description
We use ir.filters for dynamic snippet filter. But domain is not exactly the same syntax. e.g. time.strftime() vs context_today() So we add a fake action_id to avoid to display these filters on each action of this model. task-2654131 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#76984
When generating coupons for customers, the email was sent twice due to the values given on the email_values that is generating a TO (email_to) value (plus using the one given on the template (recipients_ids)) opw-2574046 X-original-commit: 5cd985ce29822c832163e81c3c542c06bcbbc3af Forward-Port-Of: odoo/odoo#76656
Original PR description
When generating coupons for customers, the email was sent twice due to the values given on the email_values that is generating a TO (email_to) value (plus using the one given on the template (recipients_ids)) opw-2574046 X-original-commit: 5cd985ce29822c832163e81c3c542c06bcbbc3af Forward-Port-Of: odoo/odoo#76656
The invoicing target on sales team do not have to take the vendor bills into account. When we click on Sales analysis, we only see sales details. opw:2557852 Forward-Port-Of: odoo/odoo#76240
Original PR description
The invoicing target on sales team do not have to take the vendor bills into account. When we click on Sales analysis, we only see sales details. opw:2557852 Forward-Port-Of: odoo/odoo#76240
These helpers and component should be moved to web_dashboard, which is the only place they are used. Also, we want to avoid setting a precedent by putting these in web. 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#76794
Original PR description
These helpers and component should be moved to web_dashboard, which is the only place they are used. Also, we want to avoid setting a precedent by putting these in web. 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#76794
In javascript, Error.stack is not standard so it could be undefined on some browsers. This commit fixes possible crashes when we perform some operations on error.stack. Forward-Port-Of: odoo/odoo#76727
Original PR description
In javascript, Error.stack is not standard so it could be undefined on some browsers. This commit fixes possible crashes when we perform some operations on error.stack. Forward-Port-Of: odoo/odoo#76727
Multivat means you are submitting its national tax report to a foreign country. In this case, you never want to use OSS taxes for that country. Hence, we exclude the countries for which we are submitting such a report when generating the fiscal positions for OSS. Forward-Port-Of: odoo/odoo#76895
Original PR description
Multivat means you are submitting its national tax report to a foreign country. In this case, you never want to use OSS taxes for that country. Hence, we exclude the countries for which we are submitting such a report when generating the fiscal positions for OSS. Forward-Port-Of: odoo/odoo#76895
[FIX] account: fix outdated docstring [FIX] l10n_latam_invoice_document: fix overridden function's name It did not correspond to its parent, and hence wasn't called. Forward-Port-Of: odoo/odoo#77034
Original PR description
[FIX] account: fix outdated docstring [FIX] l10n_latam_invoice_document: fix overridden function's name It did not correspond to its parent, and hence wasn't called. Forward-Port-Of: odoo/odoo#77034
Before, the taxes assigned by the reconciliation models in their writeoffs weren't mapped by fiscal positions. This could cause confusion, and essentially required the user to always fix by hand the cases that weren't matched. Task 2645280 Forward-Port-Of: odoo/odoo#77163
Original PR description
Before, the taxes assigned by the reconciliation models in their writeoffs weren't mapped by fiscal positions. This could cause confusion, and essentially required the user to always fix by hand the cases that weren't matched. Task 2645280 Forward-Port-Of: odoo/odoo#77163
Steps to follow - Go to the variant tab of a product - Add an attribute and click search more - Select the checkbox at the top to select all records from the current page - Click on Select all - Click on Select -> Only the records from the first page are added Cause of the issue `getSelectedRecords` doesn't return the record from all pages but only from the current one Solution If the domain is selected, use all the records opw-2586877 Forward-Port-Of:
Original PR description
Steps to follow - Go to the variant tab of a product - Add an attribute and click search more - Select the checkbox at the top to select all records from the current page - Click on Select all - Click on Select -> Only the records from the first page are added Cause of the issue `getSelectedRecords` doesn't return the record from all pages but only from the current one Solution If the domain is selected, use all the records opw-2586877 Forward-Port-Of: odoo/odoo#76165
Before this commit the scroll position in mobile mode were not kept. This was because the reference element on which we get the scroll coordinates was the body, instead of the html node. After this commit, the scroll is saved and reused correctly as the reference node is the html node 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.odo
Original PR description
Before this commit the scroll position in mobile mode were not kept. This was because the reference element on which we get the scroll coordinates was the body, instead of the html node. After this commit, the scroll is saved and reused correctly as the reference node is the html node 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#77087
When creating a wizard `stock.return.picking` and call `_onchange_picking_id`, the creation of return picking line will perform a write on move linked with it, due to `uom_id` being set as related with `readonly=False`. Set `readonly` to `True` to avoid it This starts with #76923 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
When creating a wizard `stock.return.picking` and call `_onchange_picking_id`, the creation of return picking line will perform a write on move linked with it, due to `uom_id` being set as related with `readonly=False`. Set `readonly` to `True` to avoid it This starts with #76923 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#77187 Forward-Port-Of: odoo/odoo#77100
The Time Off Analysis action should only be available in debug mode. TaskID: 2653912 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#76945
Original PR description
The Time Off Analysis action should only be available in debug mode. TaskID: 2653912 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#76945
Also resulted in crash `Cannot read property 'sel' of undefined`. This commit adds some guards in some component templates that access model records and their fields, to avoid crashes. These guards are necessary due to the asynchronous rendering of OWL, which makes it vulnerable to risky changes in models such as record deletion or any modification in any relational fields. Introduced with odoo@9bf4b6c Forward-Port-Of: odoo/odoo#77239
Original PR description
Also resulted in crash `Cannot read property 'sel' of undefined`. This commit adds some guards in some component templates that access model records and their fields, to avoid crashes. These guards are necessary due to the asynchronous rendering of OWL, which makes it vulnerable to risky changes in models such as record deletion or any modification in any relational fields. Introduced with odoo@9bf4b6c Forward-Port-Of: odoo/odoo#77239
Forward-Port-Of: odoo/odoo#73575
Original PR description
Forward-Port-Of: odoo/odoo#73575
The registry attributes 'registry_invalidated' and 'cache_invalidated' are used to flag that the current request has modified the registry or invalidated the ormcache, respectively. This provides a simple yet efficient way to signal registry changes or cache invalidations to other workers. However, those flags were not meant to be used with multi-threaded workers. For instance, a thread may signal registry changes that are actually made by another thread. It can also happen that a th
Original PR description
The registry attributes 'registry_invalidated' and 'cache_invalidated' are used to flag that the current request has modified the registry or invalidated the ormcache, respectively. This provides a…
The registry attributes 'registry_invalidated' and 'cache_invalidated' are used to flag that the current request has modified the registry or invalidated the ormcache, respectively. This provides a simple yet efficient way to signal registry changes or cache invalidations to other workers. However, those flags were not meant to be used with multi-threaded workers. For instance, a thread may signal registry changes that are actually made by another thread. It can also happen that a thread changes the registry, which makes another thread crash (like a thread modifying a dict while another one iterates over it), and the latter will reset the registry to its original state because it misinterprets the registry changes as its own changes. The situation can even get worse, making threads crash in cascade and eventually leaving the registry in an inconsistent state. When this happens, the worker is broken and has to be manually restarted. The fix consists in making those flags thread-specific. This does not prevent thread crashing because of concurrent changes, but at least it avoids leaving the worker in a broken state. Forward-Port-Of: odoo/odoo#77244 Forward-Port-Of: odoo/odoo#77178
Some categories already exist for those modules. Forward-Port-Of: odoo/enterprise#20326 Forward-Port-Of: odoo/enterprise#20316
Original PR description
Some categories already exist for those modules. Forward-Port-Of: odoo/enterprise#20326 Forward-Port-Of: odoo/enterprise#20316
Before this commit, in mobile, when scrolling, the scrolled element was the html node iself. This was not inherently wrong, albeit conceptually disturbing as the body should be the relevant visual node. It was a problem for testing though. After this commit, the scrollable element in mobile is the webClient itself. Forward-Port-Of: odoo/enterprise#21150
Original PR description
Before this commit, in mobile, when scrolling, the scrolled element was the html node iself. This was not inherently wrong, albeit conceptually disturbing as the body should be the relevant visual node. It was a problem for testing though. After this commit, the scrollable element in mobile is the webClient itself. Forward-Port-Of: odoo/enterprise#21150
Always take the project with the lowest sequence on the current company. TaskID: 2641479 Forward-Port-Of: odoo/enterprise#20693
Original PR description
Always take the project with the lowest sequence on the current company. TaskID: 2641479 Forward-Port-Of: odoo/enterprise#20693
Before, the taxes assigned by the reconciliation models in their writeoffs weren't mapped by fiscal positions. This could cause confusion, and essentially required the user to always fix by hand the cases that weren't matched. Task 2645280 Forward-Port-Of: odoo/enterprise#21163
Original PR description
Before, the taxes assigned by the reconciliation models in their writeoffs weren't mapped by fiscal positions. This could cause confusion, and essentially required the user to always fix by hand the cases that weren't matched. Task 2645280 Forward-Port-Of: odoo/enterprise#21163
Automatic tax closing for OSS reports was mixed with the one made for VAT in the domestic country. The current implementation does not give us the possibility to clearly differentiate the closing moves made for OSS or VAT; so it is impossible to create an additional move for OSS. Even more: OSS is made of two reports. Each of them should have its own closing entry. This will be improved in master for v16. For v15, users will have to do their OSS closing by hand, as they used to before the
Original PR description
Automatic tax closing for OSS reports was mixed with the one made for VAT in the domestic country. The current implementation does not give us the possibility to clearly differentiate the closing moves made for OSS or VAT; so it is impossible to create an additional move for OSS. Even more: OSS is made of two reports. Each of them should have its own closing entry. This will be improved in master for v16. For v15, users will have to do their OSS closing by hand, as they used to before the introduction of automatic closing. Forward-Port-Of: odoo/enterprise#21152
[FIX] account_reports: check the tax_unit option only on the templates made for the tax report 'tax_unit' is only set in the options in the generic tax report. Checking its value in the templates that are common to all reports could cause crashes. [FIX] account_reports: don't display the fiscal position selector on every report It should only be seen on tax reports, and was available everywhere. This was due to a wrong computation of available_vat_fiscal_positions in case the fiscal
Original PR description
[FIX] account_reports: check the tax_unit option only on the templates made for the tax report 'tax_unit' is only set in the options in the generic tax report. Checking its value in the templates that are common to all reports could cause crashes. [FIX] account_reports: don't display the fiscal position selector on every report It should only be seen on tax reports, and was available everywhere. This was due to a wrong computation of available_vat_fiscal_positions in case the fiscal position country of the report was None. This available_vat_fiscal_positions options should only be used to contain the fiscal positions that are available for selection, not the ones that are used in the computation (so: it's possible to take all fiscal positions into account without having any set in available_vat_fiscal_positions). Forward-Port-Of: odoo/enterprise#20970
…-else The field can be an `owl` (line 143) or a old odoo widget (line 153). When in studio the `appendTo` method is called, it does not exist and there is a traceback. The choice of this fix is to add the `appendTo` method on the owl components, so as not to have to add a condition depending on the instance of `owl` (like line 1431) each time. This change can be removed when web_studio is converted to owl. opw-2529150 opw-2631717 Forward-Port-Of: odoo/enterprise#20736 Forward-Po
Original PR description
…-else The field can be an `owl` (line 143) or a old odoo widget (line 153). When in studio the `appendTo` method is called, it does not exist and there is a traceback. The choice of this fix is to add the `appendTo` method on the owl components, so as not to have to add a condition depending on the instance of `owl` (like line 1431) each time. This change can be removed when web_studio is converted to owl. opw-2529150 opw-2631717 Forward-Port-Of: odoo/enterprise#20736 Forward-Port-Of: odoo/enterprise#20528
These helpers and component should be moved to web_dashboard, which is the only place they are used. Also, we want to avoid setting a precedent by putting these in web. Forward-Port-Of: odoo/enterprise#20996
Original PR description
These helpers and component should be moved to web_dashboard, which is the only place they are used. Also, we want to avoid setting a precedent by putting these in web. Forward-Port-Of: odoo/enterprise#20996
…one tax line per tax type code In order to do that, we take the entire dictionary of the TIM section in the code into a new dictionary (in order not to break stable) and we add the taxes at 0% and we calculate the rounding error as a sum of the different rounding errors for every IMP section. Forward-Port-Of: odoo/enterprise#20527 Forward-Port-Of: odoo/enterprise#20488
Original PR description
…one tax line per tax type code In order to do that, we take the entire dictionary of the TIM section in the code into a new dictionary (in order not to break stable) and we add the taxes at 0% and we calculate the rounding error as a sum of the different rounding errors for every IMP section. Forward-Port-Of: odoo/enterprise#20527 Forward-Port-Of: odoo/enterprise#20488
The code in web_enterprise/legacy/pivot_renderer should be copied and adapted to apply onto the new wowl pivot renderer. original commit: https://github.com/odoo/enterprise/commit/204a8bef332b8a42f0d7381c95d2a355cb4ec292 The desired behavior is mobile: - header's text is closer to the edge than in desktop. - header's tooltip are fully deactivated. - nested dropdown should be "inlined" the parent dropdown (not on its side). - there is no reposition of the dropdowns, because there i
Original PR description
The code in web_enterprise/legacy/pivot_renderer should be copied and adapted to apply onto the new wowl pivot renderer. original commit: https://github.com/odoo/enterprise/commit/204a8bef332b8a42f0d7381c95d2a355cb4ec292 The desired behavior is mobile: - header's text is closer to the edge than in desktop. - header's tooltip are fully deactivated. - nested dropdown should be "inlined" the parent dropdown (not on its side). - there is no reposition of the dropdowns, because there is hardly any space, we need to be able to scroll. Forward-Port-Of: odoo/enterprise#21122
By default the allocations were valid from "today". TaskID: 2643593 Forward-Port-Of: odoo/enterprise#21154
Original PR description
By default the allocations were valid from "today". TaskID: 2643593 Forward-Port-Of: odoo/enterprise#21154
Backport of odoo/enterprise@4edb7f2b88f061586bff1a309789d6e3ccc44cc0 as we think this is important to have in 14.5 to ease usage of command palette. Currently, in some of the important business objects' form views, few header buttons are missing the title, and so the command palette displays the button string which is not very clear/useful. This commit improves the behavior by adding titles to the buttons. Below are the model wise actions/methods linked with updated buttons: - acti
Original PR description
Backport of odoo/enterprise@4edb7f2b88f061586bff1a309789d6e3ccc44cc0 as we think this is important to have in 14.5 to ease usage of command palette. Currently, in some of the important business objects' form views, few header buttons are missing the title, and so the command palette displays the button string which is not very clear/useful. This commit improves the behavior by adding titles to the buttons. Below are the model wise actions/methods linked with updated buttons: - action_rental_quotations_new (crm.lead) - action_timer_pause (helpdesk.ticket) - action_timer_resume (helpdesk.ticket) - action_timer_start (helpdesk.ticket) - action_timer_stop (helpdesk.ticket) - action_fsm_create_quotation (project.task) - action_timer_pause (project.task) - action_timer_resume (project.task) - action_timer_start (project.task) - action_timer_stop (project.task) Task-2622266 Forward-Port-Of: odoo/enterprise#21168