Monday, October 17, 2022
33 changes · master
Enhancements to existing features
The spreadsheet app is updated with many additional financial formulas, making it easier to model loans, investments, depreciation, treasury bills, and cash flows directly in Odoo. The update also fixes small usability issues in search, calculation display, and column resizing for a smoother spreadsheet experience.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/ab6f7e4b [FIX] find_and_replace: clear input clears search matches…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/ab6f7e4b [FIX] find_and_replace: clear input clears search matches https://github.com/odoo/o-spreadsheet/commit/fe6afd61 [REF] header_visibility_ui: rewrite findLastVisibleColRowIndex https://github.com/odoo/o-spreadsheet/commit/4c987a64 [REF] grid: remove useless clip https://github.com/odoo/o-spreadsheet/commit/25a3168b [REF] functions: naming convention of assert helpers https://github.com/odoo/o-spreadsheet/commit/ab896cac [IMP] functions: add demo data for financial functions https://github.com/odoo/o-spreadsheet/commit/1e5912ad [IMP] functions: add AMORLINC function https://github.com/odoo/o-spreadsheet/commit/cee8339f [IMP] functions: add XNPV function https://github.com/odoo/o-spreadsheet/commit/dd17ff13 [IMP] functions: add XIRR function https://github.com/odoo/o-spreadsheet/commit/d6813dc4 [IMP] functions: add VDB function https://github.com/odoo/o-spreadsheet/commit/83ea4da8 [IMP] functions: add TBILLYIELD function https://github.com/odoo/o-spreadsheet/commit/b2bd8be3 [IMP] functions: add TBILLEQ function https://github.com/odoo/o-spreadsheet/commit/d1e70d63 [IMP] functions: add TBILLPRICE function https://github.com/odoo/o-spreadsheet/commit/ea1bef1c [IMP] functions: add SYD function https://github.com/odoo/o-spreadsheet/commit/31605fd4 [IMP] functions: add SLN function https://github.com/odoo/o-spreadsheet/commit/816d31af [IMP] functions: add RRI function https://github.com/odoo/o-spreadsheet/commit/a4a83a4b [IMP] functions: add RECEIVED function https://github.com/odoo/o-spreadsheet/commit/28feb878 [IMP] functions: add MIRR function https://github.com/odoo/o-spreadsheet/commit/a289a941 [IMP] functions: add INTRATE function https://github.com/odoo/o-spreadsheet/commit/62da0927 [IMP] functions: add FVSCHEDULE function https://github.com/odoo/o-spreadsheet/commit/b6789bd7 [IMP] functions: add DOLLARFR function https://github.com/odoo/o-spreadsheet/commit/5db4064f [IMP] functions: add DOLLARDE function https://github.com/odoo/o-spreadsheet/commit/cdc73ce5 [IMP] functions: add DISC function https://github.com/odoo/o-spreadsheet/commit/cd0ee521 [IMP] functions: add DDB function https://github.com/odoo/o-spreadsheet/commit/161134e6 [IMP] functions: add CUMPRINC function https://github.com/odoo/o-spreadsheet/commit/c89c64ec [IMP] functions: add CUMIPMT function https://github.com/odoo/o-spreadsheet/commit/4608ce74 [IMP] functions: add ACCRINTM function https://github.com/odoo/o-spreadsheet/commit/c0bbf544 [IMP] functions: add DAYS360 function https://github.com/odoo/o-spreadsheet/commit/2a59663c [IMP] functions: add PRICEMAT function https://github.com/odoo/o-spreadsheet/commit/1c28a0ff [IMP] functions: add PRICEDISC function https://github.com/odoo/o-spreadsheet/commit/dabffa30 [IMP] functions: add ISPMT function https://github.com/odoo/o-spreadsheet/commit/f7351b21 [FIX] evaluation: prevent minus 0 (-0) values https://github.com/odoo/o-spreadsheet/commit/3fca53c9 [IMP] functions: add IPMT function https://github.com/odoo/o-spreadsheet/commit/418c9f4a [IMP] functions: add PPMT function https://github.com/odoo/o-spreadsheet/commit/8ea85442 [IMP] functions: add NPER function https://github.com/odoo/o-spreadsheet/commit/b9eb40b8 [IMP] functions: add PMT function https://github.com/odoo/o-spreadsheet/commit/27228ad7 [IMP] functions: add YIELDDISC function https://github.com/odoo/o-spreadsheet/commit/ca54b439 [IMP] functions: add coupon functions https://github.com/odoo/o-spreadsheet/commit/7f0b3703 [IMP] functions: add RATE formula https://github.com/odoo/o-spreadsheet/commit/9940b6d9 [IMP] functions: add NOMINAL and EFFECT functions https://github.com/odoo/o-spreadsheet/commit/97ddfdd6 [FIX] functions: rename financial test file https://github.com/odoo/o-spreadsheet/commit/16f7d2af [REF] sheetview: don't reset viewports uselessly https://github.com/odoo/o-spreadsheet/commit/4dfa2142 [REF] grid: remove useless anonymous function https://github.com/odoo/o-spreadsheet/commit/e3f64551 [FIX] ui_sheet: do not resize empty columns
Grouped data queries were simplified to avoid unnecessary database work when calculating and counting records. This should improve performance for reports and list views that group records, with only a small compatibility note for ordering by record ID in advanced uses.
Original PR description
[IMP] core: simplify SQL query generated from read_group - The query aggreagate the `min(<table>.id)` but the result of it is removed later in `_read_group_format_result`. Then it generates a waste of CPU/IO for PostgreSQL. It was usefull only to able to sort only by `id`, but it always better to sort on the groupby key, because PostgreSQL need to already do to create groups. - Also `<table>.id` inside the `count` generate extra work from PostgreSQL because it needs to check if each `id` is NOT NULL (always) and fetch `id` from disk for nothing. task-2994273
The company form no longer shows an option to duplicate a company, because duplicating companies is not supported. This prevents users from trying an action that would fail and reduces confusion in company administration.
Original PR description
Ducplicating a company is not allowed (see copy override in base/res_company.py), therefore removing the button from the view altogether can avoid user confusion. Task-3000228
The Discuss sidebar code was reorganized so more of its behavior is managed in shared data models rather than screen components. This makes the mail and live chat areas easier to maintain and should reduce future development risk without changing the user experience.
Original PR description
\* = im_livechat + Create DiscussSidebarView + Replace the use of useUpdate with useUpdateToModel Task-3004215.
The messaging and live chat typing indicators were reorganized so their behavior is handled more consistently behind the scenes. This helps keep the user experience reliable while making future maintenance easier, with no major visible workflow changes expected.
Original PR description
*: im_livechat Task-3004018.
The mail app’s messaging menu code was reorganized to make it easier to maintain and evolve. This internal cleanup helps reduce future development risk without changing the user experience.
Original PR description
Task-3004195.
The mail app's typing status logic was reorganized so it is handled in shared data models rather than screen components. This is an internal improvement that should make the feature easier to maintain without changing how users experience typing indicators.
Original PR description
Task-3002619.
The Discuss mobile mailbox selection code was reorganized so its behavior is handled in the underlying app model rather than directly in the screen component. This makes the mail interface easier to maintain and evolve, with minimal direct impact on daily users.
Original PR description
+ Create DiscussMobileMailboxSelectionView model + Pass DiscussMobileMailboxSelectionView record as props Task-3014747.
Bank statement reports now include fewer blank lines and show more available details about partners and bank accounts. For companies not using online synchronization, the report is generated when the statement is posted, making the final report timing better aligned with accounting workflows.
Original PR description
Improve the bank statement report by reducing the amount of blank lines in it, as well as adding more information about the partner and bank account when we have it. Also, when not using online sync the bank statement report will now be generated at the time of posting and not validating. Task id #2860753
Resolved issues and error corrections
The snailmail process now skips letters for accounts that have no remaining credits, preventing repeated resend attempts and reducing spam-like activity. Users can manually reset selected letters to pending when they want them retried after resolving credit issues.
Original PR description
We are spammed by some accounts that don't have credits anymore. With this commit, the snailmail `cron` does not take their messages into account anymore. There is a new server action (action_reset_to_pending) callable from the list view, for bulk updates on the snailmail_letter records. This action allows the user to reset the state of chosen letters, making those elligible again to the cron. __Pros & Cons__ Some drawbacks of this approach are: - Since the server action is in the views, the snailmail module needs to be upgraded. - The user needs to act (before it was in the background => less ui friendly, but probably rare enough). - Risk of abuse. Some upsides are: - Allows bulk and fine tuning reset (maybe some of the letters dont need to be sent anymore) - Fixes our issue, which is spam. task-2930455 
Code cleanup and technical improvements
This update reorganizes how several mail and live chat interface elements are powered behind the scenes. It should make future maintenance and improvements easier without introducing major visible changes for users.
Original PR description
[[IMP] mail, *: move code from components to models (DiscussSidebar)](https://github.com/odoo/odoo/commit/2a4986d954801500560212208b52166b8cacfea6) Task-3004215 [[IMP] mail: move code from components to models (MessagingMenuTab)](https://github.com/odoo/odoo/commit/27c3879955a8e4c0780266a3d7c39891e334c125) Task-3004195 [[IMP] mail: move code from components to models (ThreadTextualTypingStatus)](https://github.com/odoo/odoo/commit/94b5c8e3c9b0cf3fbaf39e180580dca7f895f32f) Task-3002619 [[IMP] mail, *: move code from components to models (ThreadTypingIcon)](https://github.com/odoo/odoo/commit/072a9d2b7d24ad022727690b1942742b853b128e) Task-3004018 [[IMP] mail: move code from components to models (DiscussMobileMailboxSelection)](https://github.com/odoo/odoo/commit/7381c03139742fdd118ef47c4d21e6a2598c018d) Task-3014747
Miscellaneous changes
On a receipt from a subcontractor, if the user prints the labels, it will also print the labels of the components. To reproduce the issue: 1. Create two storable products P_finished, P_compo 2. Create a BoM: - Product: P_finished - Type: Subcontracting - Subcontractors: a new subcontractor SC - Components: 1 x P_compo 3. Create and confirm a purchase order: - Vendor: SC - Products: 1 x P_finished 4. Open the receipt 5. Open the detailed operations of P_fini
Original PR description
On a receipt from a subcontractor, if the user prints the labels, it will also print the labels of the components. To reproduce the issue: 1. Create two storable products P_finished, P_compo 2.…
On a receipt from a subcontractor, if the user prints the labels, it
will also print the labels of the components.
To reproduce the issue:
1. Create two storable products P_finished, P_compo
2. Create a BoM:
- Product: P_finished
- Type: Subcontracting
- Subcontractors: a new subcontractor SC
- Components: 1 x P_compo
3. Create and confirm a purchase order:
- Vendor: SC
- Products: 1 x P_finished
4. Open the receipt
5. Open the detailed operations of P_finished
6. Set the producing quantity to 1 and record the production
7. Print the labels
Error: P_compo is in the labels, it should not
When opening the receipt (step 4), the tree view of all operations has a
context with a lot of default values:
https://github.com/odoo/odoo/blob/4248aac2d224363a6ac4a59881bdb7c321623e4b/addons/stock/views/stock_picking_views.xml#L355-L358
Among them, a default value for `picking_id`.
Step 5-6, the user opens the detailed operations and completes the
produced/consumed quantities. Here is the issue: when saving the
quantities, a SML is created for the consumption of P_compo and because
of the context, its `picking_id` field is defined with the receipt
(which is incorrect).
Finally, when opening the wizard to print the labels, we use the SML of
the picking to get the products that need to be printed:
https://github.com/odoo/odoo/blob/d6304b28b8de027ba6eaa44ebc9b4b28d2c166c0/addons/stock/models/stock_picking.py#L1505-L1507
So, we will print P_compo on the labels PDF.
OPW-2991592
Forward-Port-Of: odoo/odoo#103027
Forward-Port-Of: odoo/odoo#102189The stock forecast report now correctly shows and processes reserve and unreserve actions when deliveries use multiple steps. This helps warehouse teams manage availability across the full delivery chain without missing or unavailable controls.
Original PR description
Before this commit, the reserve/unreserve buttons did not work / were hidden with multi-step delivery settings. The report now works with the entire chain of moves linked to the delivery TaskId: 2858139 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The contribution guidelines now point contributors to the correct version 16 template. This helps people submit changes using the right format, reducing confusion and review friction.
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#103207
The `analytic_distribution` field is a Json. It was stored temporarily as a char. Search is not available yet, so we do queries by hand when we need to search on keys. Also added a constraint on account_analytic_distribution_model, so we don't have models with accounts specific to a company when the model has no company or another company. It would cause an issue when looking at the models from another company. Description of the issue/feature this PR addresses: Current behavior b
Original PR description
The `analytic_distribution` field is a Json. It was stored temporarily as a char. Search is not available yet, so we do queries by hand when we need to search on keys. Also added a constraint on account_analytic_distribution_model, so we don't have models with accounts specific to a company when the model has no company or another company. It would cause an issue when looking at the models from another company. 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#101701
classic layout issue due to the group that caused a wrong alignment Forward-Port-Of: odoo/odoo#103092
Original PR description
classic layout issue due to the group that caused a wrong alignment Forward-Port-Of: odoo/odoo#103092
Purpose: * To ensure consistency with rules configuration, some records should not be opened from there. * In sales team, the gauge showing the count of assigned leads in the members kanban cards was not shown anymore. In this commit, the style of previous version is restored. We also fix the unnecessarily large height of the embedded kanban view. * On teams kanban view, action field values were joined with their label. Task-3004227 Forward-Port-Of: odoo/odoo#101897
Original PR description
Purpose: * To ensure consistency with rules configuration, some records should not be opened from there. * In sales team, the gauge showing the count of assigned leads in the members kanban cards was not shown anymore. In this commit, the style of previous version is restored. We also fix the unnecessarily large height of the embedded kanban view. * On teams kanban view, action field values were joined with their label. Task-3004227 Forward-Port-Of: odoo/odoo#101897
**Description of the issue/feature this PR addresses:** Attachment count is always Zero on Job Positions **Impacted versions**: 14.0 15.0 16.0 **Current behaviour before PR:** Before this PR, the attachment is not shown and attachment count is always zero in the Job Positions. **Desired behaviour after PR is merged:** After this PR merge, the attachment will shown and attachment count will counted in the Job Positions. **Fix the issue** [#62643](https://github.com/odoo/odoo
Original PR description
**Description of the issue/feature this PR addresses:** Attachment count is always Zero on Job Positions **Impacted versions**: 14.0 15.0 16.0 **Current behaviour before PR:** Before this PR, the attachment is not shown and attachment count is always zero in the Job Positions. **Desired behaviour after PR is merged:** After this PR merge, the attachment will shown and attachment count will counted in the Job Positions. **Fix the issue** [#62643](https://github.com/odoo/odoo/issues/62643) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#101353
Forward-Port-Of: odoo/odoo#102925
Original PR description
Forward-Port-Of: odoo/odoo#102925
Steps to reproduce: - Go to reward and loyalty add a reward to a program - Select the free product reward in type - Select a product Current behavior: There is a JS traceback Explanation: The reward_product_uom_id was missing from the form Forward-Port-Of: odoo/odoo#103189
Original PR description
Steps to reproduce: - Go to reward and loyalty add a reward to a program - Select the free product reward in type - Select a product Current behavior: There is a JS traceback Explanation: The reward_product_uom_id was missing from the form Forward-Port-Of: odoo/odoo#103189
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#103206
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#103206
The analytic distribution widget in the Analytic Distribution Model form displayed its selection field on a new line, making it too large and odd. This PR fixes the styling to resemble the `many2many_tags` widget. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#102395
Original PR description
The analytic distribution widget in the Analytic Distribution Model form displayed its selection field on a new line, making it too large and odd. This PR fixes the styling to resemble the `many2many_tags` widget. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#102395
For the date filters with a default value set to "Automatically fitler on the current period", the clear button don't work. It does not clear the filter but revert it back to the default value. The bug happens in the global filters side panel as well as in the dashboards. Odoo task [2989909](https://www.odoo.com/web#id=2989909&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Description of the issue/feature this PR addresses: Current behavior before PR
Original PR description
For the date filters with a default value set to "Automatically fitler on the current period", the clear button don't work. It does not clear the filter but revert it back to the default value. The bug happens in the global filters side panel as well as in the dashboards. Odoo task [2989909](https://www.odoo.com/web#id=2989909&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) 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#100579
Before this PR, the last notification id known by the client was not reset after restoring the database. This was an issue since there can be a gap between the last notification and the one that has been restored with the database. In this scenario, messages are not received after restoring the database since the client subscribes to higher notification ids that the ones that are created. This PR fixes this issue by defaulting to the highest notification id known by the server if the
Original PR description
Before this PR, the last notification id known by the client was not reset after restoring the database. This was an issue since there can be a gap between the last notification and the one that has been restored with the database. In this scenario, messages are not received after restoring the database since the client subscribes to higher notification ids that the ones that are created. This PR fixes this issue by defaulting to the highest notification id known by the server if the one the client passed is higher. Forward-Port-Of: odoo/odoo#103025
With a configured MX company create an invoice register a payment send cfdi of the payment The cfdi will be rejected by the EDI system because a sign is not consistent Task: 2979040 Forward-Port-Of: odoo/enterprise#31250
Original PR description
With a configured MX company create an invoice register a payment send cfdi of the payment The cfdi will be rejected by the EDI system because a sign is not consistent Task: 2979040 Forward-Port-Of: odoo/enterprise#31250
Before this commit, the knowledge actions were editable with studio. In the worst case scenario, it lead to crashes, in the best, it lead to editing a view which made little sense. After this commit, for simplicity's sake, we forbid that any action that presents the knowledge.article model be editable in studio. Forward-Port-Of: odoo/enterprise#32817
Original PR description
Before this commit, the knowledge actions were editable with studio. In the worst case scenario, it lead to crashes, in the best, it lead to editing a view which made little sense. After this commit, for simplicity's sake, we forbid that any action that presents the knowledge.article model be editable in studio. Forward-Port-Of: odoo/enterprise#32817
With the new reporting engine, the report lines, when clicked on, would redirect to its basic form. As we already have a method to display specific views for specific types of account moves and account move lines, we now use them to get to the correct view. This is done for the report lines in: - The journal report: now links to the correct form or widget for payments, bank statements, journal entries - All other reports: now links to the bank reconciliation widget when
Original PR description
With the new reporting engine, the report lines, when clicked on,
would redirect to its basic form. As we already have a method to display
specific views for specific types of account moves and account move
lines, we now use them to get to the correct view.
This is done for the report lines in:
- The journal report: now links to the correct form or widget for
payments, bank statements, journal entries
- All other reports: now links to the bank reconciliation widget
when choosing the "View bank statement" caret option.
Forward-Port-Of: odoo/enterprise#32588Task : 2985735 When a Quality Control Point isn't only for a manufacturing picking type, the work order operation field isn't necessary and is hidden. Forward-Port-Of: odoo/enterprise#32534
Original PR description
Task : 2985735 When a Quality Control Point isn't only for a manufacturing picking type, the work order operation field isn't necessary and is hidden. Forward-Port-Of: odoo/enterprise#32534
Before this commit: if you install "pos_hr_mobile" and try to open a PoS session without the "barcodes_mobile" module, you will get a server error. The solution is adding "barcodes_mobile" to the manifest's depend. opw-3008817 Forward-Port-Of: odoo/enterprise#32411
Original PR description
Before this commit: if you install "pos_hr_mobile" and try to open a PoS session without the "barcodes_mobile" module, you will get a server error. The solution is adding "barcodes_mobile" to the manifest's depend. opw-3008817 Forward-Port-Of: odoo/enterprise#32411
Steps to reproduce: - Install data_merge & contacts modules - Go to Data Cleaning -> Deduplication - Add filter for field `Company` with operator `is set` Issue: Traceback raised. Cause: Search on company_id does not handle operator 'is set' (wich the related operator received by function will be `!=` with value `False`). Solution: This commit add the handling of operator "!=" and change the way the value is evaluated (to handle the case where the value i
Original PR description
Steps to reproduce: - Install data_merge & contacts modules - Go to Data Cleaning -> Deduplication - Add filter for field `Company` with operator `is set` Issue: Traceback raised. Cause: Search on company_id does not handle operator 'is set' (wich the related operator received by function will be `!=` with value `False`). Solution: This commit add the handling of operator "!=" and change the way the value is evaluated (to handle the case where the value is a boolean and searching on a `ir.model` type field). opw-3002090 Forward-Port-Of: odoo/enterprise#32734
*: quality_control_iot, quality_mrp_workorder_iot The iot extensions of the quality module and its dependents currently do not include the iot counterparts of the dependencies of their parent modules. For example: the `mrp_workorder_iot` module only includes the `quality` and `iot` modules as its dependencies. Functionally though, it also depends on the iot extension of the `quality` module (`quality_iot`). When these missing dependencies are not installed, this can result in missing model
Original PR description
*: quality_control_iot, quality_mrp_workorder_iot The iot extensions of the quality module and its dependents currently do not include the iot counterparts of the dependencies of their parent modules. For example: the `mrp_workorder_iot` module only includes the `quality` and `iot` modules as its dependencies. Functionally though, it also depends on the iot extension of the `quality` module (`quality_iot`). When these missing dependencies are not installed, this can result in missing models or fields, causing a failure to load the registry. Note: because these modules are generally automatically installed the bug does not often manifest itself, however it can be triggered by manual install or uninstall operations. Forward-Port-Of: odoo/enterprise#32787 Forward-Port-Of: odoo/enterprise#30632
The `analytic_distribution` field is a Json. It was stored as char which was poor. It has been decided that the Json field won't be made in core, as we need more time to have a solid implementation. So a simple implementation of the Json field has been made in the analytic module. Forward-Port-Of: odoo/enterprise#32089
Original PR description
The `analytic_distribution` field is a Json. It was stored as char which was poor. It has been decided that the Json field won't be made in core, as we need more time to have a solid implementation. So a simple implementation of the Json field has been made in the analytic module. Forward-Port-Of: odoo/enterprise#32089
Currently, all the taxes included in the invoices are being sent in the XML for the electronic invoices. There are a couple of common processes in Colombia that require the user to include taxes in the invoices only for accounting purposes but do not need to be reported in the XML. Like, Self-Withholding and StateWitholdings (Rete ICA). So in this commit, In the Taxes value of the `Tipo de Valor` code has 'ZZ' skip them on the XML creation for EDI. TaskID - 2976963 Forward-Port-Of: odo
Original PR description
Currently, all the taxes included in the invoices are being sent in the XML for the electronic invoices. There are a couple of common processes in Colombia that require the user to include taxes in the invoices only for accounting purposes but do not need to be reported in the XML. Like, Self-Withholding and StateWitholdings (Rete ICA). So in this commit, In the Taxes value of the `Tipo de Valor` code has 'ZZ' skip them on the XML creation for EDI. TaskID - 2976963 Forward-Port-Of: odoo/enterprise#32760 Forward-Port-Of: odoo/enterprise#31541