Monday, January 22, 2024
48 changes · saas-17.1
Resolved issues and error corrections
Documentation links across the product have been corrected to point to the saas-17.1 documentation. This helps users and implementers reach the right guidance for their current version instead of potentially landing on mismatched documentation.
Original PR description
See also: - https://github.com/odoo/enterprise/pull/54859
This update fixes an intermittent automated test failure in the analytic module by ensuring popups finish opening or closing before tag counts are checked. It does not change business functionality, but helps keep quality checks stable and reduces false alarms during development.
Original PR description
The test fails sometimes. A nextTick is needed to be sure the popup is opened. For the tags, it's probable that the issue comes from the fact that the popup has not yet been closed. So it also counts the badge on the popup. Linked to runbot error 52759 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
This update corrects documentation links across several Odoo Enterprise areas so they point to the saas-17.1 documentation instead of another version. Users and implementers will be directed to the right help pages for their current software version, reducing confusion when configuring features.
Original PR description
See also: - https://github.com/odoo/odoo/pull/150472
Miscellaneous changes
When creating a cut-off entry with an account that has a default tax configured on it, we don't want that tax to be computed on the cut-off entry again. Reason is both that we don't want to impact the tax report again with these taxes, and it would also create an auto-balancing line to balance out the computed tax on a suspense account, which is pretty confusing to the user. [task-3650271](https://www.odoo.com/web#id=3650271&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view
Original PR description
When creating a cut-off entry with an account that has a default tax configured on it, we don't want that tax to be computed on the cut-off entry again. Reason is both that we don't want to impact the tax report again with these taxes, and it would also create an auto-balancing line to balance out the computed tax on a suspense account, which is pretty confusing to the user. [task-3650271](https://www.odoo.com/web#id=3650271&cids=1&menu_id=4720&action=333&active_id=967&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#150009 Forward-Port-Of: odoo/odoo#148479
Computation of the last post shouldn't be done with a db request for each forum but can be batched. Technical note: As it is likely that `post_ids` is not yet fetched when we're accessing `last_post_id` we chose not to early return if no forum in `self` included posts already. Version choice: We chose this version to merge this as it is the one where forum was taken over, and _read_group refactored. A test for this computation is also added. Task-3685002 Forward-Port-Of: odoo/
Original PR description
Computation of the last post shouldn't be done with a db request for each forum but can be batched. Technical note: As it is likely that `post_ids` is not yet fetched when we're accessing `last_post_id` we chose not to early return if no forum in `self` included posts already. Version choice: We chose this version to merge this as it is the one where forum was taken over, and _read_group refactored. A test for this computation is also added. Task-3685002 Forward-Port-Of: odoo/odoo#149376
Before this commit, the datepicker was not displayed entirely on small screens if the current view wasn't tall enough. This commit adds a margin (supposedly) big enough to render the entire picker even on small screens. Task [3585878](https://www.odoo.com/web#id=3585878&cids=1&menu_id=4720&action=333&active_id=49&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149510 Forward-Port-Of:
Original PR description
Before this commit, the datepicker was not displayed entirely on small screens if the current view wasn't tall enough. This commit adds a margin (supposedly) big enough to render the entire picker even on small screens. Task [3585878](https://www.odoo.com/web#id=3585878&cids=1&menu_id=4720&action=333&active_id=49&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149510 Forward-Port-Of: odoo/odoo#143363
…sonal stage Steps to reproduce: - Open the project.task calendar view. - Observe that personal stages are clickable. Issue: - The personal stage should not be clickable in the 'project.task calendar' view Solution: - Disabled the clickable behavior for personal stages in the 'project.task calender' view 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
Original PR description
…sonal stage Steps to reproduce: - Open the project.task calendar view. - Observe that personal stages are clickable. Issue: - The personal stage should not be clickable in the 'project.task calendar' view Solution: - Disabled the clickable behavior for personal stages in the 'project.task calender' view 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#150133 Forward-Port-Of: odoo/odoo#146090
Default_from on alias domain is currently managed like bounce or catchall. We consider it is always only a left-part of an email address that should be completed with alias domain name. However and notably at migration default_from could contain a complete email address. In that case better be defensive and keep the domain part of the value. Task-3690919 Forward-Port-Of: odoo/odoo#149887
Original PR description
Default_from on alias domain is currently managed like bounce or catchall. We consider it is always only a left-part of an email address that should be completed with alias domain name. However and notably at migration default_from could contain a complete email address. In that case better be defensive and keep the domain part of the value. Task-3690919 Forward-Port-Of: odoo/odoo#149887
When pasting text inside the editor, if the text looks like a URL, a link is implicitly created. Unfortunately, this also happens when the edited element does not support HTML. Because of this, when translating a page, links are created inside the translated text which does not support HTML. This commit solves this by pasting the plain text if the target of the paste does not support HTML (which is the case for translations). This commit also prevent link creation when typing a space a
Original PR description
When pasting text inside the editor, if the text looks like a URL, a link is implicitly created. Unfortunately, this also happens when the edited element does not support HTML. Because of this, when…
When pasting text inside the editor, if the text looks like a URL, a link is implicitly created. Unfortunately, this also happens when the edited element does not support HTML. Because of this, when translating a page, links are created inside the translated text which does not support HTML. This commit solves this by pasting the plain text if the target of the paste does not support HTML (which is the case for translations). This commit also prevent link creation when typing a space after text that looks like an URL in targets that do not support HTML. In 16.0, `_handleAutomaticLinkInsertion` is also adapted to prevent unwanted link creation. Steps to reproduce for first scenario: - Add French to your website. - Edit your master English Home page. - Drop a Text snippet in the Home page. - Save the Home page. - Switch to French. - Translate the page. - From en external text input, copy `http://odoo.com`/ in your clipboard. - Put the cursor inside the Text snippet's text. - Paste. => A link was created. Steps to reproduce for second scenario: - Add French to your website. - Edit your master English Home page. - Drop a Text snippet in the Home page. - Save the Home page. - Switch to French. - Translate the page. - Put the cursor inside the Text snippet's text. - Type `http://odoo.com`/ followed by a space. => A link was created. opw-3546308 Forward-Port-Of: odoo/odoo#150189 Forward-Port-Of: odoo/odoo#148282
The tab PL Extra is visible if l10n_pl_jpk is installed and your company is not polish. This should not be the case. 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#150199 Forward-Port-Of: odoo/odoo#146617
Original PR description
The tab PL Extra is visible if l10n_pl_jpk is installed and your company is not polish. This should not be the case. 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#150199 Forward-Port-Of: odoo/odoo#146617
### Steps to reproduce * go create an invoice for a customer that has outstanding credits. * in the blue message at the top, click the "outstanding credits" text in bold. You should see that you're taken to the home page. We expect to be taken to the bottom of the invoice, where the outstanding credits are displayed. ### Cause A static HTML ID was mistaken for a variable in d682871a8bd393c1d497e57675904d10355331d1. opw-3691932 Forward-Port-Of: odoo/odoo#150153
Original PR description
### Steps to reproduce * go create an invoice for a customer that has outstanding credits. * in the blue message at the top, click the "outstanding credits" text in bold. You should see that you're taken to the home page. We expect to be taken to the bottom of the invoice, where the outstanding credits are displayed. ### Cause A static HTML ID was mistaken for a variable in d682871a8bd393c1d497e57675904d10355331d1. opw-3691932 Forward-Port-Of: odoo/odoo#150153
In case of a payment we want to use the custom/accounting rate instead of the Odoo rate, as the rate probably comes from the bank. Forward-Port-Of: odoo/odoo#149937 Forward-Port-Of: odoo/odoo#146274
Original PR description
In case of a payment we want to use the custom/accounting rate instead of the Odoo rate, as the rate probably comes from the bank. Forward-Port-Of: odoo/odoo#149937 Forward-Port-Of: odoo/odoo#146274
Steps to reproduce: - Go to website (“Edit” mode) > Add a “Big Boxes” block. - Switch to “Grid” mode > Select the last column n (while n > 1) and set a background image on it. - Try to change the background position > You cannot save or cancel the changes since the option buttons (“Apply” & “Discard”) are invisible. This is simply because the grid element was cloned on the background container (`.o_overlay_background`) with its grid `z-index` style (with `z-index` === n) which automa
Original PR description
Steps to reproduce: - Go to website (“Edit” mode) > Add a “Big Boxes” block. - Switch to “Grid” mode > Select the last column n (while n > 1) and set a background image on it. - Try to change the background position > You cannot save or cancel the changes since the option buttons (“Apply” & “Discard”) are invisible. This is simply because the grid element was cloned on the background container (`.o_overlay_background`) with its grid `z-index` style (with `z-index` === n) which automatically hides the buttons. The goal of this PR is to fix this behaviour by simply forcing the `z-index` of the background element to 0. task-3648466 Forward-Port-Of: odoo/odoo#148845
store.self is not necessarily known when the chatter is rendered Forward-Port-Of: odoo/odoo#150103
Original PR description
store.self is not necessarily known when the chatter is rendered Forward-Port-Of: odoo/odoo#150103
Before this commit, editing a message in message in a conversation and then pressing on the paper plane icon was throwing the following error: ``` TypeError: null is not an object (evaluating 'thread.model') @_sendMessage ``` This happens because this button was in "send" message mode rather than in edit mode. Since we cannot post a message while editing a message, the crash happens because composer is not related to thread but the message. This button is not visible in desktop mode,
Original PR description
Before this commit, editing a message in message in a conversation and then pressing on the paper plane icon was throwing the following error: ``` TypeError: null is not an object (evaluating…
Before this commit, editing a message in message in a conversation and then pressing on the paper plane icon was throwing the following error: ``` TypeError: null is not an object (evaluating 'thread.model') @_sendMessage ``` This happens because this button was in "send" message mode rather than in edit mode. Since we cannot post a message while editing a message, the crash happens because composer is not related to thread but the message. This button is not visible in desktop mode, and user should use suggested keyboard shortcuts or click on links to either save edit or discard it. In mobile, these interactions are not intuitive. This commit fixes the issue by keeping the paper-plane button while editing in mobile but it acts as "save". The labels to save/discard was not appropriate in mobile, so it has been turned to a simple button to discard editing. opw-3670482 Before  After  Forward-Port-Of: odoo/odoo#148918
Before this PR, the "Retry loading more messages on failed load more messages" test was sometimes failing. This test uses the `afterEvent` helper to wait for the load message event to occur. This is too technical and not reliable: this test just ensures that clicking on the retry button after failing to load more messages work as expected. This PR simplify this test and make use of the `contains` helper which is more reliable to do so. First, 30 messages are loaded, then the retry button
Original PR description
Before this PR, the "Retry loading more messages on failed load more messages" test was sometimes failing. This test uses the `afterEvent` helper to wait for the load message event to occur. This is too technical and not reliable: this test just ensures that clicking on the retry button after failing to load more messages work as expected. This PR simplify this test and make use of the `contains` helper which is more reliable to do so. First, 30 messages are loaded, then the retry button appears and finally, clicking on the retry button should load 30 more messages for a total of 60. fixes runbot-53201 Forward-Port-Of: odoo/odoo#150012 Forward-Port-Of: odoo/odoo#147663
The aim of this commit is to fix the computation behavior of the downpayment line of the sale order. Context: Create a sale order and invoice a down payment. Make a credit note for the downpayment invoice for a part of the invoice's amount. Before the commit: The downpayment line on the sale order gets its price_unit updated to the amount of the last credit note. After the commit: The downpayment line on the sale order gets its price_unit updated to the sum of the amount of all link
Original PR description
The aim of this commit is to fix the computation behavior of the downpayment line of the sale order. Context: Create a sale order and invoice a down payment. Make a credit note for the downpayment invoice for a part of the invoice's amount. Before the commit: The downpayment line on the sale order gets its price_unit updated to the amount of the last credit note. After the commit: The downpayment line on the sale order gets its price_unit updated to the sum of the amount of all linked invoice. task-id: 3634439 Forward-Port-Of: odoo/odoo#150137 Forward-Port-Of: odoo/odoo#145964
After the migration to Bootstrap5 (odoo/odoo#95450), some standard bootstrap classes did not work anymore when *printing* the report via wkhtmltopdf (bg-dark, bg-black etc.....). This is because wkhtmltopdf doesn't support CSS Custom Properties and many Bootstrap5 rules use them (many have already been adapted in the referenced PR or linked ones) wkhtmltopdf doesn"t support rgba CSS function either. This fix allows for thoses classes to work when printing as they can be used if the report wa
Original PR description
After the migration to Bootstrap5 (odoo/odoo#95450), some standard bootstrap classes did not work anymore when *printing* the report via wkhtmltopdf (bg-dark, bg-black etc.....). This is because wkhtmltopdf doesn't support CSS Custom Properties and many Bootstrap5 rules use them (many have already been adapted in the referenced PR or linked ones) wkhtmltopdf doesn"t support rgba CSS function either. This fix allows for thoses classes to work when printing as they can be used if the report was edited via Studio's Report Editor. 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#150087
Before this PR: The term "ballot" has wrongly been used as a receipt (or ticket), when if you translate this term to Spanish it shows that this term is applied to a voting voucher and not to a sales voucher. Besides, the document type called "Electronic Tax Receipt" does not express its correct name which is an "Electronic Exempt Receipt" (precisely the document is exempt because it does not have taxes involved). After this PR: The term "ballot" was replaced by "receipt" which is more accura
Original PR description
Before this PR: The term "ballot" has wrongly been used as a receipt (or ticket), when if you translate this term to Spanish it shows that this term is applied to a voting voucher and not to a sales voucher. Besides, the document type called "Electronic Tax Receipt" does not express its correct name which is an "Electronic Exempt Receipt" (precisely the document is exempt because it does not have taxes involved). After this PR: The term "ballot" was replaced by "receipt" which is more accurate. and "Electronic Tax Receipt" is called as it should be, an exempt receipt. This includes the translation untranslated terms for pot and po --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147528
Currently an error occurs when the user is creating a new invoice and selects the 'Customer' while the 'Journal' field is empty. Steps to Reproduce: - Install 'Accounting' module. - Go to Accounting > Customer > Invoices and then click on New. - Empty the 'Journal' field and then select any 'Customer'. - The error will be generated. Traceback on sentry: ``` KeyError: ('res.company', <function Company.__accessible_branches at 0x7fd68effbd00>, (1,), False, 2) File "odoo/tools/
Original PR description
Currently an error occurs when the user is creating a new invoice and selects the 'Customer' while the 'Journal' field is empty. Steps to Reproduce: - Install 'Accounting' module. - Go to Accounting…
Currently an error occurs when the user is creating a new invoice and selects the 'Customer' while the 'Journal' field is empty.
Steps to Reproduce:
- Install 'Accounting' module.
- Go to Accounting > Customer > Invoices and then click on New.
- Empty the 'Journal' field and then select any 'Customer'.
- The error will be generated.
Traceback on sentry:
```
KeyError: ('res.company', <function Company.__accessible_branches at 0x7fd68effbd00>, (1,), False, 2)
File "odoo/tools/cache.py", line 99, in lookup
r = d[key]
File "<decorator-gen-5>", line 2, in __getitem__
File "odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
ValueError: not enough values to unpack (expected 1, got 0)
File "odoo/models.py", line 5830, in ensure_one
_id, = self._ids
ValueError: Expected singleton: res.company()
File "odoo/http.py", line 2150, in __call__
response = request._serve_db()
File "odoo/http.py", line 1722, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1749, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1953, 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 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "addons/account/models/account_move.py", line 2559, in onchange
return super().onchange(values, field_names, fields_spec)
File "addons/web/models/models.py", line 1062, in onchange
record._apply_onchange_methods(field_name, result)
File "odoo/models.py", line 6877, in _apply_onchange_methods
res = method(self)
File "addons/account/models/account_move.py", line 1738, in _onchange_partner_id
self = self.with_company(self.journal_id.company_id._accessible_branches()[:1])
File "odoo/addons/base/models/res_company.py", line 396, in _accessible_branches
return self.browse(self.__accessible_branches())
File "<decorator-gen-107>", line 2, in __accessible_branches
File "odoo/tools/cache.py", line 104, in lookup
value = d[key] = self.method(*args, **kwargs)
File "odoo/addons/base/models/res_company.py", line 378, in __accessible_branches
self.ensure_one()
File "odoo/models.py", line 5833, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
This error arises at [1] when the company is selected, but the 'journal_id' field is left empty,
This commit fixes the above issue by ensuring that the company is selected based on the accessible branches of the associated journal, or falls back to the default company if no journal is specified.
Link: [1]-https://github.com/odoo/odoo/blob/ad9cd949168e3be3db6e9a4983faa6b02626b0a2/addons/account/models/account_move.py#L1771
sentry-4835188267
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#148667Currently the form sheet have a flex-grow-1, the chatter could use less horizontal space to leave more space for the form sheet's content. This PR widens the form_sheet by applying a flex-grow-2 and reduces the chatter's top bar total width by removing the icons and applying a sup tag on the micro information displayed aside the icons. Since the icons are removed there is no need to test if the icon is rendered with it's appropriate text anymore thus we can remove these two lines. Additio
Original PR description
Currently the form sheet have a flex-grow-1, the chatter could use less horizontal space to leave more space for the form sheet's content. This PR widens the form_sheet by applying a flex-grow-2 and reduces the chatter's top bar total width by removing the icons and applying a sup tag on the micro information displayed aside the icons. Since the icons are removed there is no need to test if the icon is rendered with it's appropriate text anymore thus we can remove these two lines. Additionally the `text-warning` on the span was unnecessary since it's already applied on the button parent. task-3641988 Enterprise PR: https://github.com/odoo/enterprise/pull/53208 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#147136
The anglo saxon accounting was set in the wrong field. It should be set in the field 'anglo_saxon_accounting' on the company and not 'use_anglo_saxon' on the configs. task-3642826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149190 Forward-Port-Of: odoo/odoo#148868
Original PR description
The anglo saxon accounting was set in the wrong field. It should be set in the field 'anglo_saxon_accounting' on the company and not 'use_anglo_saxon' on the configs. task-3642826 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149190 Forward-Port-Of: odoo/odoo#148868
If an IoT doesn't have a DB recorded, the IoT client can't have an url. So the Websocket can't parse a empty string and return a traceback. With this commit we check if there are a DB else iot_client is None 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#150089
Original PR description
If an IoT doesn't have a DB recorded, the IoT client can't have an url. So the Websocket can't parse a empty string and return a traceback. With this commit we check if there are a DB else iot_client is None 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#150089
Description of the Issue/Feature this PR Addresses: The 'upload and set' button in the Project Task Cover Image is currently non-functional. Current Behavior Before PR: - When attempting to set a cover image in Project Task, the 'upload and set' button is not able to click sometimes. Desired Behavior After PR is Merged: - This pull request resolves the non-functional 'upload and set' button, ensuring it works seamlessly for setting a cover image in Project Task. task-3623
Original PR description
Description of the Issue/Feature this PR Addresses:
The 'upload and set' button in the Project Task Cover Image is currently non-functional.
Current Behavior Before PR:
- When attempting to set a cover image in Project Task, the 'upload and set' button is not able to click sometimes.
Desired Behavior After PR is Merged:
- This pull request resolves the non-functional 'upload and set' button, ensuring it works seamlessly for setting a cover image in
Project Task.
task-3623759
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#150033
Forward-Port-Of: odoo/odoo#145204Before this commit, when the task_count is too huge, the number of open tasks displayed in each kanban card of project returns `NaN` value the reason is because the number is too huge and using `value` will format the value and return `NaN` in that case. This commit fixes the issue by using `raw_value` instead of `value` to avoid using the formatter for `task_count` and `closed_task_count` fields. Forward-Port-Of: odoo/odoo#149637
Original PR description
Before this commit, when the task_count is too huge, the number of open tasks displayed in each kanban card of project returns `NaN` value the reason is because the number is too huge and using `value` will format the value and return `NaN` in that case. This commit fixes the issue by using `raw_value` instead of `value` to avoid using the formatter for `task_count` and `closed_task_count` fields. Forward-Port-Of: odoo/odoo#149637
## [FIX] web: fix searchbar menu position Before this commit, the searchbar menu was misplaced after opening the advanced search dialog. After this commit, the searchbar menu is always at the correct position. task-id: 3673493 ## [FIX] web: batch position updates Before this commit, a component that uses the `usePosition` hook could trigger multiple position update in the same tick and the update would be call as much as it was called. In this commit, the hook batches the calls t
Original PR description
## [FIX] web: fix searchbar menu position Before this commit, the searchbar menu was misplaced after opening the advanced search dialog. After this commit, the searchbar menu is always at the correct position. task-id: 3673493 ## [FIX] web: batch position updates Before this commit, a component that uses the `usePosition` hook could trigger multiple position update in the same tick and the update would be call as much as it was called. In this commit, the hook batches the calls to the update to call it once. task-id: 3673493 Forward-Port-Of: odoo/odoo#149655 Forward-Port-Of: odoo/odoo#148814
Problem: Discount lines are not reflected on invoices when the invoice policy is set to delivered quantities. Loyalty products' invoice policy should be defaulted to invoice on ordered quantities. Thus, if the default is set to invoice on delivered quantities for all products, loyalty products are incorrectly defaulted to invoice on delivered. This feature was removed when loyalty programs was refactored, refer to commit: https://github.com/odoo/odoo/commit/71499bbd23c0e94ffd9b7f82f9d28a5afe0451
Original PR description
Problem: Discount lines are not reflected on invoices when the invoice policy is set to delivered quantities. Loyalty products' invoice policy should be defaulted to invoice on ordered quantities.…
Problem: Discount lines are not reflected on invoices when the invoice policy is set to delivered quantities. Loyalty products' invoice policy should be defaulted to invoice on ordered quantities. Thus, if the default is set to invoice on delivered quantities for all products, loyalty products are incorrectly defaulted to invoice on delivered. This feature was removed when loyalty programs was refactored, refer to commit: https://github.com/odoo/odoo/commit/71499bbd23c0e94ffd9b7f82f9d28a5afe045197 Solution: Initialize the loyalty product to have its invoice policy to be on ordered quantities. Steps to Reproduce: Navigate to Sales > Configuration > Settings > Pricing and ensure the Discounts, Loyalty & Gift Card check box is checked Navigate to Sales > Configuration > Settings > Invoicing and set the invoicing policy to Invoice what is delivered Navigate to Sales > Products > Discount and Loyalty Create a new promotion that is available on Sales. Make sure the conditional rules is if minimum $50.00 spent and the rewards is 10.00% discount on your order (which should be set as the defaults) Navigate to Sales and create a new quotation Add a product that costs more than $50 and then click on PROMOTIONS and apply the promotion that was just created and confirm the sale order Navigate to the delivery by clicking on the delivery smart button and click on validate Navigate back to the sales order and click on CREATE INVOICE Then click on CREATE AND VIEW INVOICE You should see the issue that the promotion is not applied on the invoice opw-3582958 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149869
**Description of the issue/feature this PR addresses:** In order to avoid failing on this computation make sure actual ids are available to be used in query. **Current behavior before PR:** - Go to payment transaction list view (activate on the list view the possibility to create a new transaction manually) - Try to create a new transaction You will get a trace-back as `invoices_count` can not be computed due to a missing/empty result of `self.ids` **Desired behavior after PR is
Original PR description
**Description of the issue/feature this PR addresses:** In order to avoid failing on this computation make sure actual ids are available to be used in query. **Current behavior before PR:** - Go to payment transaction list view (activate on the list view the possibility to create a new transaction manually) - Try to create a new transaction You will get a trace-back as `invoices_count` can not be computed due to a missing/empty result of `self.ids` **Desired behavior after PR is merged:** You will be able to create as expected a new transaction Info: @wt-io-it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#150095 Forward-Port-Of: odoo/odoo#149850
To reproduce the issue: 1. Create two companies C1, C2 2. Select C1 and enable C2 3. Confirm a PO with a FIFO product in C2 4. Process the receipt 5. Bill the PO with a landed cost 6. Generate and post the LC Few errors will happen: on the LC, the journal used belongs to C1, not C2. Another one: in C2, on the product's form view, the standard price does not include the LC OPW-3651022 Forward-Port-Of: odoo/odoo#150200 Forward-Port-Of: odoo/odoo#150094
Original PR description
To reproduce the issue: 1. Create two companies C1, C2 2. Select C1 and enable C2 3. Confirm a PO with a FIFO product in C2 4. Process the receipt 5. Bill the PO with a landed cost 6. Generate and post the LC Few errors will happen: on the LC, the journal used belongs to C1, not C2. Another one: in C2, on the product's form view, the standard price does not include the LC OPW-3651022 Forward-Port-Of: odoo/odoo#150200 Forward-Port-Of: odoo/odoo#150094
_PR created in 17.0 for review but probably needs to be backported_ Everytime somebody leaves a review, it sends a message to every follower of the subtype "Discussion". Portal users were subscribed
Original PR description
_PR created in 17.0 for review but probably needs to be backported_ Everytime somebody leaves a review, it sends a message to every follower of the subtype "Discussion". Portal users were subscribed…
_PR created in 17.0 for review but probably needs to be backported_
Everytime somebody leaves a review, it sends a message to every
follower of the subtype "Discussion". Portal users were subscribed
without realising it.
Issue 1:
When subscribing via the controller, a user was subscribed to the
"Discussion" subtype instead of "Presentation Published".
Issue 2:
When requesting access, if there is no responsible for a channel, the
activity_schedule method fallsback on the current user (portal) and
subscribe him to the channel at the same time.
If there is no responsible, there is nobody to request access to.
Disable the o_wslides_js_channel_enroll to hide the request access
popup and skip the activity_schedule if the method was called anyway
(i.e. fix for stable without updating the view)
Task-id: 3635426
<details><summary>to fix an existing db</summary>
... if your subtype Discussion is 1 obviously
<pre>
DELETE FROM mail_followers_mail_message_subtype_rel r
USING mail_followers f,
res_users u
WHERE u.partner_id=f.partner_id
AND r.mail_followers_id=f.id
AND r.mail_message_subtype_id=1
AND f.res_model = 'slide.channel'
AND u.share = true;
</pre>
</details>
Forward-Port-Of: odoo/odoo#145742**Current behaviour before commit:** In tablepicker, number of the selected cells (rows X cols) is not visible at the bottom. This happens because of unnecessary css property applied by `.oe-tablepicker-size` class. **Desired behaviour after commit:** Now, `.oe-tablepicker-size` is removed. As result the number of the selected cells is visible at the bottom of tablepicker. task-3662728 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit
Original PR description
**Current behaviour before commit:** In tablepicker, number of the selected cells (rows X cols) is not visible at the bottom. This happens because of unnecessary css property applied by `.oe-tablepicker-size` class. **Desired behaviour after commit:** Now, `.oe-tablepicker-size` is removed. As result the number of the selected cells is visible at the bottom of tablepicker. task-3662728 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#148045
Fix the rounding of the percentpie field value as it was sometimes displaying a very long number due to python rounding precision. The value is now displayed rounded to 2 decimals using half to even rounding and keeps being displayed as an integer if there's only zeros as decimals. Task-3648755 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149226
Original PR description
Fix the rounding of the percentpie field value as it was sometimes displaying a very long number due to python rounding precision. The value is now displayed rounded to 2 decimals using half to even rounding and keeps being displayed as an integer if there's only zeros as decimals. Task-3648755 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149226
Steps to reproduce: --- 1. Go to Settings 2. In Document Layout 3. Click on Configure Document Layout 4. Preview looks right 5. Click on Download PDF Preview 6. Open the PDF 7. Preview is not right 8. The bottom right table is squished Cause of the issue: --- Introduced by https://github.com/odoo/odoo/commit/778cc239010f3bb8618824fdaf06cb19922d6498 Fix: --- Copied report_invoice_document opw-3651311 --- I confirm I have signed the CLA and read the PR guidelines at www.o
Original PR description
Steps to reproduce: --- 1. Go to Settings 2. In Document Layout 3. Click on Configure Document Layout 4. Preview looks right 5. Click on Download PDF Preview 6. Open the PDF 7. Preview is not right 8. The bottom right table is squished Cause of the issue: --- Introduced by https://github.com/odoo/odoo/commit/778cc239010f3bb8618824fdaf06cb19922d6498 Fix: --- Copied report_invoice_document opw-3651311 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#148102
**Current behavior before PR:** Attempting to delete a selected table row does not result in the removal of the row in Firefox. **Desired behavior after PR is merged:** Now deleting a selected table row results in removal of the row in FIrefox. task-3610789 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143747
Original PR description
**Current behavior before PR:** Attempting to delete a selected table row does not result in the removal of the row in Firefox. **Desired behavior after PR is merged:** Now deleting a selected table row results in removal of the row in FIrefox. task-3610789 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#143747
- define a relational global filter without any default value. - reference that filter with `ODOO.FILTER.VALUE` => when loading the spreadsheet, a `read` RPC is triggered with an empty list of ids. This is: - useless network call - useless evaluation when the RPC resolves --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149741
Original PR description
- define a relational global filter without any default value. - reference that filter with `ODOO.FILTER.VALUE` => when loading the spreadsheet, a `read` RPC is triggered with an empty list of ids. This is: - useless network call - useless evaluation when the RPC resolves --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149741
**Steps:** - Navigate to the project module. - Choose any project and click on a Kanban card. - Inside the form view, click the start button from the status bar. - Observe the status bar. **Issue:** - Status bar flickering when starting/stopping timer **Cause:** - When clicking the start button in the project module's form view, the timer_start field causes flickering in the status bar due to excess padding. **Fix:** - Removing the excessive padding from the timer_start field wil
Original PR description
**Steps:** - Navigate to the project module. - Choose any project and click on a Kanban card. - Inside the form view, click the start button from the status bar. - Observe the status bar. **Issue:** - Status bar flickering when starting/stopping timer **Cause:** - When clicking the start button in the project module's form view, the timer_start field causes flickering in the status bar due to excess padding. **Fix:** - Removing the excessive padding from the timer_start field will resolve the flickering issue. **Task**-3610481 Forward-Port-Of: odoo/enterprise#54616 Forward-Port-Of: odoo/enterprise#51930
Thanks to the safe_eval call https://github.com/odoo/enterprise/blob/0ae2e56fc3e14ee0afdf314fda5c028ba9d33242/hr_payroll/controllers/main.py#L43 in `get_payroll_report_print`, whenever a non-ASCII character is passed, a Python `SyntaxError: invalid character` will occur because this character will be passed to `compile` https://github.com/odoo/odoo/blob/e7a511b7b5af57696e691f6f0a71bec63053f860/odoo/tools/safe_eval.py#L216 which expects only valid python code. Therefore we remove the
Original PR description
Thanks to the safe_eval call https://github.com/odoo/enterprise/blob/0ae2e56fc3e14ee0afdf314fda5c028ba9d33242/hr_payroll/controllers/main.py#L43 in `get_payroll_report_print`, whenever a non-ASCII character is passed, a Python `SyntaxError: invalid character` will occur because this character will be passed to `compile` https://github.com/odoo/odoo/blob/e7a511b7b5af57696e691f6f0a71bec63053f860/odoo/tools/safe_eval.py#L216 which expects only valid python code. Therefore we remove the unneccessary non-ASCII quote from the .po file that was probably a mistake in the first place. opw-3688140 Forward-Port-Of: odoo/enterprise#54729
Before this commit, creating a related field toward a monetary field caused a crash. Since #40597, Studio handles monetary field differently and related field has not been taken into account. With this commit, it is now possible to create a related monetary field. This commit also removes the currency dialog which is not longer used thanks to this fix. Steps to reproduce: - Open Sales and a record - Open studio - Drag&Drop a new related field - Select Customer->Total received field and
Original PR description
Before this commit, creating a related field toward a monetary field caused a crash. Since #40597, Studio handles monetary field differently and related field has not been taken into account. With this commit, it is now possible to create a related monetary field. This commit also removes the currency dialog which is not longer used thanks to this fix. Steps to reproduce: - Open Sales and a record - Open studio - Drag&Drop a new related field - Select Customer->Total received field and confirm - Crash opw-3663307 Forward-Port-Of: odoo/enterprise#54388 Forward-Port-Of: odoo/enterprise#54214
Currently the form sheet have a flex-grow-1, the chatter could use less horizontal space to leave more space for the form sheet's content. This commit follows it's community counterpart, removing the icon of the whatsapp button in the chatter to save space. Community PR: https://github.com/odoo/odoo/pull/147136 task-3641988 Forward-Port-Of: odoo/enterprise#53208
Original PR description
Currently the form sheet have a flex-grow-1, the chatter could use less horizontal space to leave more space for the form sheet's content. This commit follows it's community counterpart, removing the icon of the whatsapp button in the chatter to save space. Community PR: https://github.com/odoo/odoo/pull/147136 task-3641988 Forward-Port-Of: odoo/enterprise#53208
We need to get rid of this button because it could raise potential legal issues (see linked task). It is marked invisible s.t. new databases won't have it. For the existing databases, we rewrite the returned action to return the content of the first xml attachment on the async export. Also remove the IAP controller `_get_recipient_reports_v2` to make sure it can no longer be called. task-3640693 Forward-Port-Of: odoo/enterprise#52805
Original PR description
We need to get rid of this button because it could raise potential legal issues (see linked task). It is marked invisible s.t. new databases won't have it. For the existing databases, we rewrite the returned action to return the content of the first xml attachment on the async export. Also remove the IAP controller `_get_recipient_reports_v2` to make sure it can no longer be called. task-3640693 Forward-Port-Of: odoo/enterprise#52805
Before this commit: By default, all the datetime fields are stored according to `UTC`. If the user tries to send a template whose template variable is set to a field type of `datetime` then no logic is written in `_find_value_from_field_path` to update the field's value according to the user's timezone. It will be sent according to `UTC`. After this commit: In the `_find_value_from_field_path` function, if `field_value` will be received of `datetime` type then a new function `_what
Original PR description
Before this commit: By default, all the datetime fields are stored according to `UTC`. If the user tries to send a template whose template variable is set to a field type of `datetime` then no logic…
Before this commit: By default, all the datetime fields are stored according to `UTC`. If the user tries to send a template whose template variable is set to a field type of `datetime` then no logic is written in `_find_value_from_field_path` to update the field's value according to the user's timezone. It will be sent according to `UTC`. After this commit: In the `_find_value_from_field_path` function, if `field_value` will be received of `datetime` type then a new function `_whatsapp_get_timezone` is used, which is added to the base that will return the desired timezone. By default, `_whatsapp_get_timezone` will return the user's timezone. The `_find_value_from_field_path` will update the `field_value` according to the timezone returned and if no timezone is returned then it will take `UTC` by default. This function can be overridden by any model. e.g. `event.registration` will override `_whatsapp_get_timezone` and return the event's time zone. Task - 3636178 Forward-Port-Of: odoo/enterprise#52208
This commit fixes a bug where the user would click outside the editor space in Knowledge after editing a behavior and this would not be seen as changes inside the record. What is happening is that the editor, and the majority of Odoo, uses the event *blur* to check if any changes has been made to the document. But this event does not bubble, in opposition to *focusout*, which means that any blur done on an element that is lower than the editable would not trigger the *onBlur* method.
Original PR description
This commit fixes a bug where the user would click outside the editor space in Knowledge after editing a behavior and this would not be seen as changes inside the record. What is happening is that the editor, and the majority of Odoo, uses the event *blur* to check if any changes has been made to the document. But this event does not bubble, in opposition to *focusout*, which means that any blur done on an element that is lower than the editable would not trigger the *onBlur* method. What we have done to fix this is simulate a blur event on the editable when we focus out of a behavior => mimicking an event bubbling to the editable and thus triggering the onBlur method. This enables the editable to handle changes done and to save/discard more efficiently and robustly. task-3662914 Forward-Port-Of: odoo/enterprise#54656 Forward-Port-Of: odoo/enterprise#53531
This commit adds the new mandatory fields according to Version 3.0 of the delivery guide. It also extends the functionality of the delivery guide to Receipts. task-3608164 Forward-Port-Of: odoo/enterprise#53506 Forward-Port-Of: odoo/enterprise#52580
Original PR description
This commit adds the new mandatory fields according to Version 3.0 of the delivery guide. It also extends the functionality of the delivery guide to Receipts. task-3608164 Forward-Port-Of: odoo/enterprise#53506 Forward-Port-Of: odoo/enterprise#52580
Filter 'hide zero lines' wasn't saving the option, so I was not persistent between pages reload. Forward-Port-Of: odoo/enterprise#54486
Original PR description
Filter 'hide zero lines' wasn't saving the option, so I was not persistent between pages reload. Forward-Port-Of: odoo/enterprise#54486
Forward-Port-Of: odoo/enterprise#54623 Forward-Port-Of: odoo/enterprise#54552
Original PR description
Forward-Port-Of: odoo/enterprise#54623 Forward-Port-Of: odoo/enterprise#54552
This commit fix a bad usage of the notification service which leads to a crash. Steps to reproduce: - Go to calendar - Click on studio in the systray - Click on views - Click on the activity view to create one <details> <summary> Show the flow </summary>  </details> Current Behaviour ----------------- Crash: `Caused by: TypeError: this.child.mount
Original PR description
This commit fix a bad usage of the notification service which leads to a crash. Steps to reproduce: - Go to calendar - Click on studio in the systray - Click on views - Click on the activity view to create one <details> <summary> Show the flow </summary>  </details> Current Behaviour ----------------- Crash: `Caused by: TypeError: this.child.mount is not a function` Expected Behaviour ------------------ Display a notification indicating that the view cannot be created on this model. opw-3686237 Forward-Port-Of: odoo/enterprise#54624 Forward-Port-Of: odoo/enterprise#54545
This commit converts server actions from python to more user friendly interface. The commit also improves `_create_records_with_xml_ids`, by removing try/except block and doing same thing using ORM. Commit also adds test, that tests the functionality of `_create_records_with_xml_ids` function. task-3597555 Forward-Port-Of: odoo/enterprise#50898
Original PR description
This commit converts server actions from python to more user friendly interface. The commit also improves `_create_records_with_xml_ids`, by removing try/except block and doing same thing using ORM. Commit also adds test, that tests the functionality of `_create_records_with_xml_ids` function. task-3597555 Forward-Port-Of: odoo/enterprise#50898
Issue: ------ A user who has access rights for payroll but not for expenses will not be able to calculate the payslip. Cause: ------ An additional security check [^1] has been added to the `_flush_search` method to check which fields have groups. Unfortunately, payroll groups are not mentioned in the `groups` attribute of the `refund_in_payslip` field. Solution: --------- Add the group in the `groups` attribute. opw-3691235 [^1]: https://github.com/odoo/odoo/blob/4b096631ad23
Original PR description
Issue: ------ A user who has access rights for payroll but not for expenses will not be able to calculate the payslip. Cause: ------ An additional security check [^1] has been added to the `_flush_search` method to check which fields have groups. Unfortunately, payroll groups are not mentioned in the `groups` attribute of the `refund_in_payslip` field. Solution: --------- Add the group in the `groups` attribute. opw-3691235 [^1]: https://github.com/odoo/odoo/blob/4b096631ad23298c12bbd12593e9358c3e9f404a/odoo/models.py#L5330-L5332 Forward-Port-Of: odoo/enterprise#54619