Monday, February 6, 2023
39 changes · master
Enhancements to existing features
The web editor now reuses the initial ICE server configuration instead of loading it every time, reducing repeated background work. User permission checks are also cached, which can reduce unnecessary server calls and make related screens feel more responsive.
Original PR description
Before this commit, the web editor loaded the configuration for ice servers each time it was created. It is useless to do it more than once, so this commit simply keep the initial value around. 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 refreshes Odoo's spreadsheet engine with better formatting controls, faster rendering, and several fixes for selection, copy-paste, drag-and-drop, and chart display. Users should see a smoother spreadsheet experience with fewer editing issues and more presentation options.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/b1f3dd55e [FIX] Cell/clipboard: Fix last cell deletion https://github.com/odoo/o-spreadsheet/commit/7a183b176…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/b1f3dd55e [FIX] Cell/clipboard: Fix last cell deletion https://github.com/odoo/o-spreadsheet/commit/7a183b176 [REF/IMP] figure: refactor figure container and handle scroll https://github.com/odoo/o-spreadsheet/commit/64b9f825c [REF] sheetview: split getter "getActiveSheetScrollInfo" https://github.com/odoo/o-spreadsheet/commit/be9540654 [IMP] top bar: add 'text wrapping' options https://github.com/odoo/o-spreadsheet/commit/a7d59e34f [IMP] top bar: add 'vertical alignment' options https://github.com/odoo/o-spreadsheet/commit/d4663158d [FIX] menu: use capture for events https://github.com/odoo/o-spreadsheet/commit/29fa62c35 [FIX] figures: copy paste through context menu not working https://github.com/odoo/o-spreadsheet/commit/8cdc7c193 [FIX] selection processor: expose only interface https://github.com/odoo/o-spreadsheet/commit/ab6c4d86e [FIX] selection: avoid scroll when using ctrl+a loop https://github.com/odoo/o-spreadsheet/commit/fd1140c72 [FIX] Renderer: Speed up rendering https://github.com/odoo/o-spreadsheet/commit/0358a76d5 [FIX] components: Fix static colors for spreadsheet https://github.com/odoo/o-spreadsheet/commit/8497bf562 [REF] tests: introduce click helper https://github.com/odoo/o-spreadsheet/commit/662996755 [FIX] drag & drop: mouse outside the grid & freeze panes https://github.com/odoo/o-spreadsheet/commit/472852266 [IMP] chart: format Y values https://github.com/odoo/o-spreadsheet/commit/b561936fd [IMP] tests: Speed up composer tests
Tasks created from recurring sales subscriptions now inherit the subscription's end date or recurrence pattern when applicable. When a subscription is closed, related tasks stop being marked as recurring, helping service work stay aligned with customer contracts.
Original PR description
On SO confirmation: - If all of the following conditions are met, set the end_date of the Subscription as the repeat_until date of the Task: The Product is recurrent and creates a Task, The Task Template is recurrent, The end_date field is set on the Subscription. - If all of the following conditions are met, apply the Subscription's recurrence to the Task's: The Product is recurrent and creates a Task, There is no Task Template on the Product. - If the Subscription is closed, set the recurring_task field of the related Task to false. task-2868306
This update improves how Odoo distributes database queries when multiple databases are available, helping reduce pressure on any single database connection. It also marks several web controllers as read-only where appropriate, improving efficiency for common web interactions without changing the user experience.
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
This change adds automated checks for the Knowledge cover selector, including behavior when Unsplash is not configured and when Unsplash image search is available. It helps ensure users can reliably add and search for article cover images without regressions.
Original PR description
Purpose: ======== Add test tours to make sure the cover selector works as expected. A "normal" test tour has been added to check the behaviour of the cover selector when no unsplash credentials are set, and an external test has been added to check that the integration with Unsplash's API works as expected (ie, add a random cover when clicking on "add cover" button, and allow searching in Unsplash's library). To test or debug the external test, one can create free "demo" keys on Unsplash's website. Task-3113191
Website appointment and Twitter wall pages now use shorter, cleaner links that include readable page identifiers and no longer include the full site address. This makes shared links easier to read and helps keep website content URLs consistent across the platform.
Original PR description
*: website_appointment, website_twitter_wall See related community commit for details.
Users who install Odoo as a progressive web app can now access key apps directly from the app shortcut menu. The shortcuts make it faster to open Discuss, CRM, Project, and Notes, bringing the web app experience closer to the mobile app.
Original PR description
The main goal of this commit is like we did inside the `Android Odoo Mobile App`, allowing users to have some Odoo application shortcuts. We added the following apps in the key `shortcuts` on `web.manifest` in these orders: `Discuss`, `CRM`, `Project`, `Notes`. Task ID: 3123607 Links: - https://w3c.github.io/manifest/#shortcuts-member - https://developer.mozilla.org/en-US/docs/Web/Manifest/shortcuts
The Belgian payroll eco voucher wizard is easier to use and can be launched earlier in the payroll batch process. It now selects or creates the correct open payslips for voucher lines, reducing manual corrections and helping payroll teams process vouchers more reliably.
Original PR description
The following changes have been made to the eco voucher wizard: - The default reference year is now the next year starting from july 1st. This is because eco vouchers are paid at the end of june. - The order and style of the buttons in the wizard has been changed for better UX. - The eco voucher wizard is now accessible as soon as the batch has payslips associated with it. Previously, the wizard was only accessible when the batch was in the 'done' state. - The logic to which payslip the eco voucher line is added has also been fixed. Only open payslips that are associated with the batch can be chosen. If they do not exist, they are created. task-3063614
When a subscription order creates service tasks, those tasks can now inherit the subscription's recurrence schedule and end date where appropriate. Closing a subscription also stops recurrence on its related tasks, helping teams keep service work aligned with customer contracts.
Original PR description
\* = industry_fsm_sale_subscription, project_enterprise, project_sale_subscription, sale_subscription On SO confirmation: - If all of the following conditions are met, set the end_date of the Subscription as the repeat_until date of the Task: The Product is recurrent and creates a Task, The Task Template is recurrent, The end_date field is set on the Subscription. - If all of the following conditions are met, apply the Subscription's recurrence to the Task's: The Product is recurrent and creates a Task, There is no Task Template on the Product. - If the Subscription is closed, set the recurring_task field of the related Task to false. related PR: https://github.com/odoo/odoo/pull/92696 task-2868306
Resolved issues and error corrections
This change makes an internal Web Studio test more reliable by adding a small wait so older interface components can finish reporting errors. It helps reduce random test failures in automated checks, improving confidence in releases without changing user-facing behavior.
Original PR description
Before this commit, there was a test failing undeterministically because it did not wait enough, given the stack contained legacy widgets. After this commit, we wait an extra tick to ensure the legacy widgets had time to throw the error. fixes runbot-15766
Features or functions removed from Odoo
This change removes an internal benchmarking suite from the web module because it was not providing enough practical value. Developers will rely on browser profiling tools instead, with no expected impact on day-to-day users.
Original PR description
It was never really as useful as I hoped it would be. It turns out that creating a benchmarking suite is quite difficult. In practice, it is much better to use the browser profiler: this makes it easier to see what code actually takes a lot of time, and why. 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
Code cleanup and technical improvements
The stock forecast screen has been rebuilt so it opens as a full application view instead of appearing cramped inside a small embedded frame. This makes inventory forecasting easier to read and use across stock, manufacturing, purchasing, and sales workflows.
Original PR description
Description of the issue/feature this PR addresses: Refactor report_stock_forecasted from legacy report to owl client action Current behavior before PR: Since conversion to owl, report_stock_forecasted is badly displayed in a small iframe Desired behavior after PR is merged: Fully functional stock_forecast in master/16.1 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Steps to reproduce: - have a Swiss configuration for qr-code 1) make sure your customer company is in Switzerland and has all the address information 2) make sure the customer set an Invoicing address in Switzerland (address + Country) 3) have set for your bank account in in Accounting/Journals/Bank: the Iban AND the QR iban - create an invoice for a Swiss client * monthly * confirm - Preview the invoice Issue: error, we should be able to see the invoice without qr code. Solution:
Original PR description
Steps to reproduce: - have a Swiss configuration for qr-code 1) make sure your customer company is in Switzerland and has all the address information 2) make sure the customer set an Invoicing address in Switzerland (address + Country) 3) have set for your bank account in in Accounting/Journals/Bank: the Iban AND the QR iban - create an invoice for a Swiss client * monthly * confirm - Preview the invoice Issue: error, we should be able to see the invoice without qr code. Solution: the user will still see the error when trying to print the invoice opw-3104890 Forward-Port-Of: odoo/odoo#109009
Odoo websites no longer include an unused company name data field in the page markup. This is a small cleanup that reduces obsolete code without changing website behavior for users or visitors.
Original PR description
The `<html>` element of websites had a `data-oe-company-name` attribute which was dead code since a long time. This commit removes it. Some history: - [1] introduced the SEO dialog which suggested…
The `<html>` element of websites had a `data-oe-company-name` attribute which was dead code since a long time. This commit removes it. Some history: - [1] introduced the SEO dialog which suggested the company name as keyword value. That value was retrieved through a `<meta>` which was added in the DOM at the time. - [2] converted the `<meta>` tag into valid HTML code, by introducing `data-oe-company-name`. - [3] suddenly stopped caring about the company name value... but left `data-oe-company-name` as dead code, alongside a JS method reading it (in the SEO dialog class). - [4] removed the JS method dead code by refactoring the whole SEO dialog during the website-in-backend refactoring... but still left the `data-oe-company-name` dead code. This commit finally cleans it. It was judged that not using the company name value (as step [3] decided) is ok. [1]: https://github.com/odoo/odoo/commit/f50b273ae12493e227806670d9a866b6be162551 [2]: https://github.com/odoo/odoo/commit/e28c8101232d527c2d3ea2e619013ca70602d957 [3]: https://github.com/odoo/odoo/commit/d52ec7fc42cbeecafea921ea30d1d0723a59078a [4]: https://github.com/odoo/odoo/commit/ac55f2bb113ecf7c774fe6e96d28e716184a97d1
The Studio report kanban screen has been modernized behind the scenes using Odoo’s newer interface framework. This helps keep the report management experience maintainable and aligned with current platform standards, with minimal expected change for end users.
Original PR description
This commit converts one of the last occurrence of legacy view into owl. Part of task 3168640
Removing the async header from the setup() function because this function is not entirely async, and inserting it alongside an onWillStart hook to be awaited before rendering the component. Task: 3141281 Forward-Port-Of: odoo/odoo#110732
Original PR description
Removing the async header from the setup() function because this function is not entirely async, and inserting it alongside an onWillStart hook to be awaited before rendering the component. Task: 3141281 Forward-Port-Of: odoo/odoo#110732
After unlock a picking/MO, it's possible to change the qty_done of a cancelled move. This change won't have any result on product's stock. In this commit, we raise an error when user changing cancelled moves. We advise user to create a new line instead. Task-3116125 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111368 Forward-Port-Of: odoo/odoo#110083
Original PR description
After unlock a picking/MO, it's possible to change the qty_done of a cancelled move. This change won't have any result on product's stock. In this commit, we raise an error when user changing cancelled moves. We advise user to create a new line instead. Task-3116125 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111368 Forward-Port-Of: odoo/odoo#110083
**Description of the issue/feature this PR addresses:** Currently when clicking on the upgrade button in the upgrade widget, the pricing page is opened in the same tab. Instead of opening in same tab, open the pricing page in new tab, similar to the working of upgrade button in the apps menu. **Current behavior before PR:** Open any settings, click on enterprise label or click any fields with this widget, click on upgrade button Pricing page will be opened in the same tab.  **Desired behavior after PR is merged:** pricing page will be opened in new tab.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#104409
Before this commit, _onClipboardCut removed the selected text but did not register it as a history step. Other than not storing history properly, this caused unexpected behavior when followed by an action that leads to a historyRollback on the current step, such as those in _onInput. task-3142995 Forward-Port-Of: odoo/odoo#110453
Original PR description
Before this commit, _onClipboardCut removed the selected text but did not register it as a history step. Other than not storing history properly, this caused unexpected behavior when followed by an action that leads to a historyRollback on the current step, such as those in _onInput. task-3142995 Forward-Port-Of: odoo/odoo#110453
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#111753 Forward-Port-Of: odoo/odoo#109925
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 Forward-Port-Of: odoo/odoo#111753 Forward-Port-Of: odoo/odoo#109925
**Steps to reproduce the bug:** - Create a product category “Fifo”: - set the costing method to Fifo - Create a storable product “P1”: - category: All (costing method = standard) - Update the qty to 10 units - Go to inventory → Product variant → “P1” - Change the category from “All” to “Fifo” - Go to inventory → Reporting → stock valuation - Add “reaming_qty” field in the list view **Problem:** The empty_stock layer (the layer created to empty the product) has `remaini
Original PR description
**Steps to reproduce the bug:**
- Create a product category “Fifo”:
- set the costing method to Fifo
- Create a storable product “P1”:
- category: All (costing method = standard)
- Update the qty to 10 units
- Go to inventory → Product variant → “P1”
- Change the category from “All” to “Fifo”
- Go to inventory → Reporting → stock valuation
- Add “reaming_qty” field in the list view
**Problem:**
The empty_stock layer (the layer created to empty the product) has `remaining_qty` of -10 instead of 0 whereas we change from standard to Fifo
The write method of `product.product` is triggered, leading to Product Variant having another category than Product Template when the write method of `product.template` is triggered
opw-3138061
Forward-Port-Of: odoo/odoo#111370
Forward-Port-Of: odoo/odoo#110982Group lines in a list view of sample date should not be clickable. Before : Create a new partner and make an invoice for him in 2020. Post it, and open the partner ledger for 2023. The partner appears. If you unfold his line, you'll see the initial balance amount. So far, so good. Now, click on the "journal items" button on the partner line. Since there is no aml in period for him, it shouldn't show any. Indeed, nothing is shown, and the mockup data are displayed ... However, the "group by p
Original PR description
Group lines in a list view of sample date should not be clickable. Before : Create a new partner and make an invoice for him in 2020. Post it, and open the partner ledger for 2023. The partner appears. If you unfold his line, you'll see the initial balance amount. So far, so good. Now, click on the "journal items" button on the partner line. Since there is no aml in period for him, it shouldn't show any. Indeed, nothing is shown, and the mockup data are displayed ... However, the "group by partner" filter applied on the list view make is so that group lines are displayed for mockup data ... and they are not greyed and not-clickable as they should. Task: 3126138 Forward-Port-Of: odoo/odoo#109733
SO/PO accrued entries date should be the last day of the previous month since it necessarily concerns a bygone period. Task: 3045028 Forward-Port-Of: odoo/odoo#111322 Forward-Port-Of: odoo/odoo#105114
Original PR description
SO/PO accrued entries date should be the last day of the previous month since it necessarily concerns a bygone period. Task: 3045028 Forward-Port-Of: odoo/odoo#111322 Forward-Port-Of: odoo/odoo#105114
Withholding ------------------------------- Italian invoices may have a special fiscal feature which is "Ritenuta" It means "withholding" and we implement it as a tax. The Withholding's main use case is for professional consultants who can ask their services' buyer to pay their income taxes on their behalf. This way, the invoice lines will have a negative tax, and the buyer will not all the money that is billed. The withheld amount will be sent to the tax collector by the buyer at a later ti
Original PR description
Withholding ------------------------------- Italian invoices may have a special fiscal feature which is "Ritenuta" It means "withholding" and we implement it as a tax. The Withholding's main use case…
Withholding ------------------------------- Italian invoices may have a special fiscal feature which is "Ritenuta" It means "withholding" and we implement it as a tax. The Withholding's main use case is for professional consultants who can ask their services' buyer to pay their income taxes on their behalf. This way, the invoice lines will have a negative tax, and the buyer will not all the money that is billed. The withheld amount will be sent to the tax collector by the buyer at a later time. Professionals have any threshold of how much money can be withhold in an year. We added two fields to account.tax, l10n_it_withholding_type and l10n_it_withholding_reason, for EDI import/export purposes. New taxes with those fields filled out and a tax group have been added. The view has been updated, to see the fields, the tax amount must be negative. In the EDI import, the new DatiRitenuta tag is now read and handled. The correct l10n_it_withholding_type tax must be found, or a message is logged to the invoice chatter. Pension fund ------------------------------- Under Italian fiscal rules, there are cases in which professionals may ask the buyer of their services to pay income taxes on the invoice itself, and that's managed withholding taxes. In addition to that, the buyer may also be asked to pay for the seller's national pension fund, as a percentage of the invoice's total. This information needs to be imported/exported through the EDI Ticket link: https://www.odoo.com/web#id=2936606&model=project.task Task link: https://www.odoo.com/web#id=2903280&model=project.task v14 Community PR: https://github.com/odoo/odoo/pull/96930 v14 Enterprise PR: https://github.com/odoo/enterprise/pull/33083 task-2903280 opw-2936606 Forward-Port-Of: odoo/odoo#111312 Forward-Port-Of: odoo/odoo#102527
before this commit, traceback is raised when trying to create accrued revenue entry without entering the order lines. open a sale order, enter customer and save it, from the action button, click Accrued Revenue Entry and enter an amount in the amount field, exception will be raised. after this commit, no exception will be raised.  --- I c
Original PR description
before this commit, traceback is raised when trying to create accrued revenue entry without entering the order lines. open a sale order, enter customer and save it, from the action button, click Accrued Revenue Entry and enter an amount in the amount field, exception will be raised. after this commit, no exception will be raised.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#110308
before this commit, the action name was not translatable into user language and always displayed in english. after this commit, the action name will be translatable and will be showing the value based on user language preference.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/od
Original PR description
before this commit, the action name was not translatable into user language and always displayed in english. after this commit, the action name will be translatable and will be showing the value based on user language preference.  --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#110494
Strings must be trimmed in the XML output because the Tax Agency has requisites on the length. Specs: https://www.fatturapa.gov.it/export/documenti/fatturapa/v1.2.2/RappresentazioneTabellareFattOrdinaria.pdf Ticket link: https://www.odoo.com/web#id=3044072&model=project.task opw-3044072 Forward-Port-Of: odoo/odoo#111926 Forward-Port-Of: odoo/odoo#107443
Original PR description
Strings must be trimmed in the XML output because the Tax Agency has requisites on the length. Specs: https://www.fatturapa.gov.it/export/documenti/fatturapa/v1.2.2/RappresentazioneTabellareFattOrdinaria.pdf Ticket link: https://www.odoo.com/web#id=3044072&model=project.task opw-3044072 Forward-Port-Of: odoo/odoo#111926 Forward-Port-Of: odoo/odoo#107443
Before this commit: if a non-admin user captured a payment with PoS Stripe, an error occurred in UI. The problem is that only the "Administration / Settings" group can have access to the payment provider. The solution is to use super user mode. opw-3120441 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111747
Original PR description
Before this commit: if a non-admin user captured a payment with PoS Stripe, an error occurred in UI. The problem is that only the "Administration / Settings" group can have access to the payment provider. The solution is to use super user mode. opw-3120441 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#111747
opw-3097856 Forward-Port-Of: odoo/odoo#111917 Forward-Port-Of: odoo/odoo#111819
Original PR description
opw-3097856 Forward-Port-Of: odoo/odoo#111917 Forward-Port-Of: odoo/odoo#111819
Some html structures are not well mirrored in RTL directions. Fix it by changing to rtl frienldy structure. STEPS: * switch to any RTL language * open list view for any model * click Action -> Export opw-3063763 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#110867
Original PR description
Some html structures are not well mirrored in RTL directions. Fix it by changing to rtl frienldy structure. STEPS: * switch to any RTL language * open list view for any model * click Action -> Export opw-3063763 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#110867
Before it wasn't done for simplicity, but turns out it is actually quite simple to do. [task-3167055](https://www.odoo.com/web#id=3167055&cids=1&model=project.task) Forward-Port-Of: odoo/odoo#111680
Original PR description
Before it wasn't done for simplicity, but turns out it is actually quite simple to do. [task-3167055](https://www.odoo.com/web#id=3167055&cids=1&model=project.task) Forward-Port-Of: odoo/odoo#111680
TLDR: The `_disable_recursion` wasn't working properly because it didn't disable recursive calls if they used the context of a recordset that is not in the container. It is really easy to do if we use `self` for instance. In order to avoid this, we just change the environment of all `self` recordsest temporarily when inside of the context manager. ________________________________________________________________________ account_avatax sets tax_ids in account.move's _compute_avalara
Original PR description
TLDR: The `_disable_recursion` wasn't working properly because it didn't disable recursive calls if they used the context of a recordset that is not in the container. It is really easy to do if we…
TLDR:
The `_disable_recursion` wasn't working properly because it didn't disable recursive calls if they used the context of a recordset that is not in the container. It is really easy to do if we use `self` for instance.
In order to avoid this, we just change the environment of all `self` recordsest temporarily when inside of the context manager.
________________________________________________________________________
account_avatax sets tax_ids in account.move's _compute_avalara_taxes() function:
line.tax_ids = detail['tax_ids']
In certain cases tax lines (lines with tax_line_id) were not generated. This resulted in errors about the journal entry being unbalanced.
The tax line is supposed to be generated by account.move's _sync_dynamic_line() as follows:
Before the yield dirty lines (lines with a True compute_all_tax_dirty field) are recorded and are then marked as not being dirty. During the yield tax_ids is updated. This is a dependency of _compute_all_tax() which will cause compute_all_tax_dirty to be set to True again. When the yield in the _sync_dynamic_line() contextmanager returns we again search for dirty lines, if dirty lines exist this early return is bypassed and tax lines are generated:
if dirty_recs_before and not dirty_recs_after:
return
However, when writing tax_ids on a single line we end up with following nested _sync_dynamic_line() contextmanagers:
1. old taxes and wrote false on compute_all_tax_dirty ...
2. new taxes and wrote false on compute_all_tax_dirty
3. taxes changed and compute_all_tax_dirty is [False, False]
The contextmanager on line 1 is supposed to generate the tax line. Line 1 shows that before the yield it sees the original tax_ids (before the write), It sets the dirty field of the lines to False and yields. The problem occurs on line 2: a _sync_dynamic_line() call has occurred via the self.line_ids._sync_invoice() call in _sync_dynamic_lines(), it does:
line.balance = amount_currency
This write on account.move.line calls _sync_dynamic_lines() again. When _sync_dynamic_lines() calls a new _sync_dynamic_line() the dirty field is True, because the write on tax_ids has now happened. It sets it to False. When the yield of the line 1 contextmanager returns the dirty field remains False and the if statement early returns, causing no tax line to be generated.
No existing tests fail because the issue doesn't occur when writing on multiple lines at the same time. This also explains why the issue can not be reproduced manually in the webclient by setting a tax_ids on a line; the webclient will always send the tax_ids of all the lines, even when just changing one:
```
[
[1, 967, {"tax_ids": [[6, false, [1]]]}]
[4, 968, false]
]
```
test_setting_tax_separately() was added to cover this case.
The _disable_recursion() contextmanager will prevent nested calls like the one on line 2, but it did not work because it sets context on the container, not self.
[opw-3016530](https://www.odoo.com/web#id=3016530&model=project.task)
________________________
Related
* https://github.com/odoo/odoo/pull/111304
* https://github.com/odoo/odoo/pull/103172
Forward-Port-Of: odoo/odoo#103286ISC is the tax that you pay to the Sunat when you buy goods such as alcoholic beverages, cigarettes or fuel. Support for this tax is added to electronic invoices The ISC is supported which is based on the percentage of sale price The Sunat requires that the "cbc:TaxableAmount" field reflect the amount of the product base. Since there are two taxes on the same line, we must subtract the value of the ISC that is used as the basis for calculating the IGV.  Legal Reference: Guide for the Preparation of Electronic Invoice: https://cpe.sunat.gob.pe/sites/default/files/inline-files/gu%C3%ADa%20xml%20para%20factura%20electr%C3%B3nica%20%28ubl%202.0%29_0.pdf Impuesto selectivo al consumo (ISC): https://www.gob.pe/7918-impuesto-selectivo-al-consumo-isc Task Latam: https://latam-localizations.odoo.com/web#id=927&menu_id=88&cids=1&action=188&model=project.task&view_type=form Forward-Port-Of: odoo/enterprise#36429 Forward-Port-Of: odoo/enterprise#35280
The cleanup cron would sometimes timeout on databases with a large number of records and the changes would not be commited to the database, hence creating an infinite loop of failing crons. The cleanup operations are now performed on small batches and the changes commited to ensure smooth operations. task-2977145 Forward-Port-Of: odoo/enterprise#36571
Original PR description
The cleanup cron would sometimes timeout on databases with a large number of records and the changes would not be commited to the database, hence creating an infinite loop of failing crons. The cleanup operations are now performed on small batches and the changes commited to ensure smooth operations. task-2977145 Forward-Port-Of: odoo/enterprise#36571
## Current behaviour The aggregated allocated hours are based on company calendar when the associated slots don't have an attached resource. ## Expected behaviour The aggregated allocated hours shouldn't be based on company calendar when there is no resource to the assigned slot. (To follow current behaviour of the computation of individual slots' allocated hours) ## Steps to reproduce - Install Planning - Create a new slot from 10AM -> 18:30PM - The allocated hours on the slot is
Original PR description
## Current behaviour The aggregated allocated hours are based on company calendar when the associated slots don't have an attached resource. ## Expected behaviour The aggregated allocated hours…
## Current behaviour The aggregated allocated hours are based on company calendar when the associated slots don't have an attached resource. ## Expected behaviour The aggregated allocated hours shouldn't be based on company calendar when there is no resource to the assigned slot. (To follow current behaviour of the computation of individual slots' allocated hours) ## Steps to reproduce - Install Planning - Create a new slot from 10AM -> 18:30PM - The allocated hours on the slot is 8h (because when the slot doesn't have resource, we take the min between the diff of `end_time` and `start_time` and the `hours_per_day` of the company's calendar) - But the aggregated allocation for the day is 6h (instead of 8h), because it takes the company calendar into consideration, which has worktime internals 10->12 + 13->17 (6h in total). ## Reason for the problem The front-end fallbacks to the company's working calendar when there are no resources on the slots. ## Fix When computing the aggregate, if the resource is empty, we use the same formula as the backend to compute the allocation_hours for the day. We add an rpc call to retrieve the company's hours_per_day. ## Affected versions - 16.0 - saas-16.1 - master --- opw-3134643 Forward-Port-Of: odoo/enterprise#36302
Steps to reproduce the bug: - Create a new user “User 1” with the following roles: - Inventory - user - Manufacturing - user - Quality - user - Create Employee for that user and set PIN Code - Create a work center and require login and assign the employee “User 1” to the workcenter - Create a Manufacturing Order using the Work Center, Confirm and Plan - Login as the new user: - go to Manufacturing view work orders from Overview - click the Work Order button for the
Original PR description
Steps to reproduce the bug:
- Create a new user “User 1” with the following roles:
- Inventory - user
- Manufacturing - user
- Quality - user
- Create Employee for that user and set PIN Code
- Create a work center and require login and assign the employee “User 1” to the workcenter
- Create a Manufacturing Order using the Work Center, Confirm and Plan
- Login as the new user:
- go to Manufacturing view work orders from Overview
- click the Work Order button for the Work Center
Problem:
An access error is triggered, "The fields "barcode" you try to read is not available on the public employee profile."
The “User 1” has access only to the public profile of the employees, so access is limited only to specific fields, but for the tablet view we need the barcodes of the employees which is a private field, so we must access the field as a super user
opw-3077401
opw-3123556
Forward-Port-Of: odoo/enterprise#35931Three fields labels in the portal were being shown when their contents were empty: 'Current Plan', 'Reference' and 'Start date'. To solve the problem, three 't-if' conditions were added to only show each field label when those fields have content to show. These changes provide a cleaner view for the customer in the portal and also a better purchasing experience. Task: 3129020 Forward-Port-Of: odoo/enterprise#36162
Original PR description
Three fields labels in the portal were being shown when their contents were empty: 'Current Plan', 'Reference' and 'Start date'. To solve the problem, three 't-if' conditions were added to only show each field label when those fields have content to show. These changes provide a cleaner view for the customer in the portal and also a better purchasing experience. Task: 3129020 Forward-Port-Of: odoo/enterprise#36162
Since odoo/enterprise#33789 the applicant's token was only generated when clicking on the `Send` button, therefore the link that was shown in the wizard had a `False` token. task-3167806 Forward-Port-Of: odoo/enterprise#36672
Original PR description
Since odoo/enterprise#33789 the applicant's token was only generated when clicking on the `Send` button, therefore the link that was shown in the wizard had a `False` token. task-3167806 Forward-Port-Of: odoo/enterprise#36672
Operator should be 'in', not '='. It remove this warning message in logs : WARNING production odoo.osv.expression: The domain term '('partner_id', '=', [92235])' should use the 'in' or 'not in' operator. Forward-Port-Of: odoo/enterprise#36145
Original PR description
Operator should be 'in', not '='.
It remove this warning message in logs : WARNING production odoo.osv.expression: The domain term '('partner_id', '=', [92235])' should use the 'in' or 'not in' operator.
Forward-Port-Of: odoo/enterprise#36145