Thursday, October 31, 2024
23 changes · master
Enhancements to existing features
Article share and trash notifications now display more cleanly by removing an unnecessary blank line and background styling. This improves readability, especially for users viewing notifications in dark mode.
Original PR description
For the "share" and "send to trash" article notifications, remove the extra blank line and the white background which was preventing a good display in dark mode. Task-4273407
This update reorganizes how Odoo loads interface template assets by separating XML bundles from JavaScript bundles. The change supports cleaner asset management and should make future maintenance and performance work easier without changing day-to-day business workflows.
Original PR description
Related to https://github.com/odoo/odoo/pull/161254
Resolved issues and error corrections
Subscription pages no longer show an invoice amount field that was being used beyond its original purpose. This reduces confusion for users and helps ensure credit limit checks rely on clearer, more appropriate information.
Original PR description
When it was originally introduced on 'sale.order', the 'amount_to_invoice' field was only intended to be used to trigger the credit limit warnings on sale orders and invoices. With time, it came to be used for other unintended purposes, which created confusion regarding the computation method and ensuing fixes that did more harm than good. This is why it was decided to remove all unintended usaged of the field in the views, and rename it to further clarify its meaning. task-4213628
Code cleanup and technical improvements
The Point of Sale popup-related files were moved into a clearer shared folder structure across related modules. This is an internal cleanup that makes future maintenance easier without changing day-to-day user workflows.
Original PR description
Reorganization of all popup files of `point_of_sale` and submodules into a unique `popups` directory. task-id: 4290514
Miscellaneous changes
This commit fixes a position issue with the total row title which should be center aligned. task-4251407 Forward-Port-Of: odoo/enterprise#73121
Original PR description
This commit fixes a position issue with the total row title which should be center aligned. task-4251407 Forward-Port-Of: odoo/enterprise#73121
This PR fixes an issue about a `z-index` CSS property defined in Documents that is affecting the whole back-end and front-end environment as it is not scoped within a Documents related selector. While this CSS is actually needed if you have a dropdown with a `+ X` item at the end to prevent the button from being rendered under the view, it needs to be scoped to Documents only. We also take that opportunity to use the `SCSS` variable related to that `z-index` value. | 18.0 | This PR | |---
Original PR description
This PR fixes an issue about a `z-index` CSS property defined in Documents that is affecting the whole back-end and front-end environment as it is not scoped within a Documents related selector. While this CSS is actually needed if you have a dropdown with a `+ X` item at the end to prevent the button from being rendered under the view, it needs to be scoped to Documents only. We also take that opportunity to use the `SCSS` variable related to that `z-index` value. | 18.0 | This PR | |--------|--------| |  |  | task-4270185 Forward-Port-Of: odoo/enterprise#72379
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For example: * Unit per CLP: 0.001057876419 * CLP per Unit:945.29 - Create an invoice in USD with 2 lines having different amount: * 15.80 * 15.00 - Save the invoice - Print the invoice **Issue:** On the printed invoice, a slightly different currency rate is displayed for each invoice l
Original PR description
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For…
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For example: * Unit per CLP: 0.001057876419 * CLP per Unit:945.29 - Create an invoice in USD with 2 lines having different amount: * 15.80 * 15.00 - Save the invoice - Print the invoice **Issue:** On the printed invoice, a slightly different currency rate is displayed for each invoice line. **Cause:** The currency rate to display is computed for each invoice line, based on the following formula: abs(self.balance) / self.price_subtotal However, the value of balance is rounded to the unit because of the CLP currency and therefore it generates a different rate when trying to compute it. **Solution:** Compute the rate from the total values instead of the subtotal of each line. The real rate configured on the currency cannot be used because it can be modified after the creation of the invoice. opw-4242448 Linked community PR: https://github.com/odoo/odoo/pull/185230 Forward-Port-Of: odoo/enterprise#73120 Forward-Port-Of: odoo/enterprise#73035
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by tax calculators are only informational. When they return e.g. 5% tax, the actual amount can be different from 5% because of differences in rounding or (partial) exemptions. The authoritative tax is returned as a value amount (e.g. $10). Because of this, we cannot rely on Odoo to calculate the tax from
Original PR description
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by…
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by tax calculators are only informational. When they return e.g. 5% tax, the actual amount can be different from 5% because of differences in rounding or (partial) exemptions. The authoritative tax is returned as a value amount (e.g. $10). Because of this, we cannot rely on Odoo to calculate the tax from account.tax records. It's not always going to match. It's not possible to fix this by externally calculating taxes on the down payment invoice. The single down payment line cannot accomodate all different tax categories. Creating a down payment line per tax category (e.g. avatax_category_id) was considered, but a specific down payment product would need to be created per used tax category which would clutter the database. On top of that, down payment products are removed in later versions [1] which would complicate this approach even further. This solves the issue by not calculating taxes on down payments at all. The down payment invoice will not be sent to external tax calculators. The resulting down payment lines on the SO won't have taxes set, and those lines will be excluded from the request to the external tax calculator. The final, "regular invoice" transaction will happen as if no down payments were made. The down payment lines won't be sent, so this will look like a regular invoice from the external calculator's view. By default, the downpayment lines equal the subtotal of the selected down payment amount. We remove tax_ids from the lines because we cannot count on calculating tax locally (see above). To keep the behavior analogous we override the downpayment wizard to create a single down payment line with a total equal to the entered total in the wizard. [1] odoo/odoo@9aa52dd6418e5881adc2d96d15d062b55d6150c5 opw-3971513 Forward-Port-Of: odoo/enterprise#73027 Forward-Port-Of: odoo/enterprise#70517
After odoo/odoo@45b90b8b7ce252e1558728f4fc03e52459817565 `test: true` is not a valid tour key anymore Forward-Port-Of: odoo/enterprise#73116
Original PR description
After odoo/odoo@45b90b8b7ce252e1558728f4fc03e52459817565 `test: true` is not a valid tour key anymore Forward-Port-Of: odoo/enterprise#73116
The check for the sequence of the group_s was always true because the length was not compared. Now it is compared to the max length of the sequence. task-4203261 Forward-Port-Of: odoo/enterprise#72886
Original PR description
The check for the sequence of the group_s was always true because the length was not compared. Now it is compared to the max length of the sequence. task-4203261 Forward-Port-Of: odoo/enterprise#72886
On the employee, we should clarify the view to tell what is editable or not. On the contract, the index is monetary but shouldn't. Forward-Port-Of: odoo/enterprise#71794
Original PR description
On the employee, we should clarify the view to tell what is editable or not. On the contract, the index is monetary but shouldn't. Forward-Port-Of: odoo/enterprise#71794
### Description of the issue/feature this PR addresses: It is needed to be able to create Factura B for a foreign customer. Legal reference: Here is some useful documentation : https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id=8555970 https://www.afip.gob.ar/EspaciosdeDialogoInstitucional/documentos/Acta-15-Espacio-de-Dialogo-AFIP-Camaras-Empresariales-14-11.pdf ### Current behavior before PR: It is not possible to create Factura B for a foreign customer. ### Desired
Original PR description
### Description of the issue/feature this PR addresses: It is needed to be able to create Factura B for a foreign customer. Legal reference: Here is some useful documentation : https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id=8555970 https://www.afip.gob.ar/EspaciosdeDialogoInstitucional/documentos/Acta-15-Espacio-de-Dialogo-AFIP-Camaras-Empresariales-14-11.pdf ### Current behavior before PR: It is not possible to create Factura B for a foreign customer. ### Desired behavior after PR is merged: It is possible to create Factura B for a foreign customer. Task Adhoc side: 30008 Task latam side: 913 Forward-Port-Of: odoo/enterprise#72728 Forward-Port-Of: odoo/enterprise#71562
This command's purpose was to dispatch the event at each individual external step, but it was only used for embedded components, and `onExternalHistorySteps` resource (which handles every batch of collaborative steps) is enough for embedded components, and it is called less often. This commit therefore removes `ADD_EXTERNAL_STEP` command. task-4281356 Forward-Port-Of: odoo/enterprise#72681
Original PR description
This command's purpose was to dispatch the event at each individual external step, but it was only used for embedded components, and `onExternalHistorySteps` resource (which handles every batch of collaborative steps) is enough for embedded components, and it is called less often. This commit therefore removes `ADD_EXTERNAL_STEP` command. task-4281356 Forward-Port-Of: odoo/enterprise#72681
Steps: Create a ticket with no partner. Click on 'Plan Intervention'. The modal opens. Issue: See that a partner "@" has been created and set. Cause: Clicking on the button calls `action_generate_fsm_task`, which calls `_find_or_create_partner`, but the args, `self.partner_name` and `self.partner_email`, are empty. Solution: Not try to create a partner when the fields both empty. Also, if there was no partner on the ticket, it takes the value of the wizard's partner when savin
Original PR description
Steps: Create a ticket with no partner. Click on 'Plan Intervention'. The modal opens. Issue: See that a partner "@" has been created and set. Cause: Clicking on the button calls `action_generate_fsm_task`, which calls `_find_or_create_partner`, but the args, `self.partner_name` and `self.partner_email`, are empty. Solution: Not try to create a partner when the fields both empty. Also, if there was no partner on the ticket, it takes the value of the wizard's partner when saving the wizard (clicking on "Create (& View) Task". task-4265584 Forward-Port-Of: odoo/enterprise#72304
Steps ----- - Install timesheet_grid - Set monday as the first day of the week in the language settings - Set the timezone of the user's working schedule to a more advanced timezone, e.g. UTC+10 - Go to Timesheets and add some hours on monday -> The under/over time is calculated relative to a lower number of hours than the real number of working hours for that day. Cause ----- `get_daily_working_hours` uses UTC's start/end of day for the start and end of the period, causing some workin
Original PR description
Steps ----- - Install timesheet_grid - Set monday as the first day of the week in the language settings - Set the timezone of the user's working schedule to a more advanced timezone, e.g. UTC+10 - Go to Timesheets and add some hours on monday -> The under/over time is calculated relative to a lower number of hours than the real number of working hours for that day. Cause ----- `get_daily_working_hours` uses UTC's start/end of day for the start and end of the period, causing some working hours near the start/end of the period to be missed. opw-4163183 Forward-Port-Of: odoo/enterprise#73010 Forward-Port-Of: odoo/enterprise#72526
Versions: ------------ 17.0 Steps to Reproduce: ----------------------------- 1. go to sign document 2. add sign item in document 3. click on sign document now 4. click on start seems be not working properly 5. video link: https://nimb.ws/WKMlFjB Issue: ------- stacking order of sign item navigator seems to be low Solution: ------------ increase z-index value of `o_sign_sign_item_navigator`. task-4191542 Forward-Port-Of: odoo/enterprise#70170
Original PR description
Versions: ------------ 17.0 Steps to Reproduce: ----------------------------- 1. go to sign document 2. add sign item in document 3. click on sign document now 4. click on start seems be not working properly 5. video link: https://nimb.ws/WKMlFjB Issue: ------- stacking order of sign item navigator seems to be low Solution: ------------ increase z-index value of `o_sign_sign_item_navigator`. task-4191542 Forward-Port-Of: odoo/enterprise#70170
Since #69952 the name of the final amount has been changed in the dict from `amount_total` to `total_amount` but not in the get. task-id: 4242134 Forward-Port-Of: odoo/enterprise#72120
Original PR description
Since #69952 the name of the final amount has been changed in the dict from `amount_total` to `total_amount` but not in the get. task-id: 4242134 Forward-Port-Of: odoo/enterprise#72120
The module was removed in odoo/enterprise@53098e18 Forward-Port-Of: odoo/enterprise#73084
Original PR description
The module was removed in odoo/enterprise@53098e18 Forward-Port-Of: odoo/enterprise#73084
**Steps to reproduce:** Create a folder in 'My Drive' e.g: "New". Add 2 files in New folder. Open the folder and only select those 2 files and move them to trash. Now, go back to My drive, select that empty New folder and move it to Trash. Go to Trash workspace. Select one of the file and try to restore it. **Technical:** The folder whose parent has a folder_id 'False'. In the domain, we check the id and active status for the folder_id but since there is no folder_id, that record will no
Original PR description
**Steps to reproduce:** Create a folder in 'My Drive' e.g: "New". Add 2 files in New folder. Open the folder and only select those 2 files and move them to trash. Now, go back to My drive, select that empty New folder and move it to Trash. Go to Trash workspace. Select one of the file and try to restore it. **Technical:** The folder whose parent has a folder_id 'False'. In the domain, we check the id and active status for the folder_id but since there is no folder_id, that record will not be considered as archived_top_parent_documents. **Specifications:** Show the appropriate error message when restoring from TRASH, consistent with the error for other documents. Task-4274176 Forward-Port-Of: odoo/enterprise#72469
Specs: Replace the pin icons with the 'v' tick icon from the drop-down items. Technical: Remove the '<i class='fa fa-thumb-tack me-1'/>' pin icon and, based on a condition, add the 'selected' class to the existing 'o-dropdown-item dropdown-item' element. Task-4266470 Forward-Port-Of: odoo/enterprise#72250
Original PR description
Specs: Replace the pin icons with the 'v' tick icon from the drop-down items. Technical: Remove the '<i class='fa fa-thumb-tack me-1'/>' pin icon and, based on a condition, add the 'selected' class to the existing 'o-dropdown-item dropdown-item' element. Task-4266470 Forward-Port-Of: odoo/enterprise#72250
The SLA success rate was previously being computed using the entire history of closed tickets as the domain. This is contrary to the expected behavior, given the helper text on Odoo and the list view of tickets that opens up if you click the percentage. This commit changes the domain to only consider tickets that were closed in the last 7 days. To reproduce on Runbot, follow the steps laid out here, as the process involves forcing tickets to fail and be older than 7 days closed: htt
Original PR description
The SLA success rate was previously being computed using the entire history of closed tickets as the domain. This is contrary to the expected behavior, given the helper text on Odoo and the list view of tickets that opens up if you click the percentage. This commit changes the domain to only consider tickets that were closed in the last 7 days. To reproduce on Runbot, follow the steps laid out here, as the process involves forcing tickets to fail and be older than 7 days closed: https://www.odoo.com/odoo/49/tasks/4206255 opw-4206255 Forward-Port-Of: odoo/enterprise#71600
## Description Following a32825ee00f2b330d99113f4d8c1488903fe744e, the "Documents" menu-item is hidden when there are no documents in it. The presence of the field `document_count` in the view triggers `_compute_documents`, which is relatively slow for projects with a lot of tasks. It's not worth to incure the cost at each load of this view (which is a hot path) just for hiding a button in a sub-menu. ## Spec Change The menu-item "Documents" is present even if there are no document and you
Original PR description
## Description Following a32825ee00f2b330d99113f4d8c1488903fe744e, the "Documents" menu-item is hidden when there are no documents in it. The presence of the field `document_count` in the view triggers `_compute_documents`, which is relatively slow for projects with a lot of tasks. It's not worth to incure the cost at each load of this view (which is a hot path) just for hiding a button in a sub-menu. ## Spec Change The menu-item "Documents" is present even if there are no document and you have differnet than `'none'` permission on the folder. ## Benchmark Loading "Projects" kanban view with 5 favourite projects, one of which has 1M+ tasks on next.odoo.com | | Before | After | Speedup | |---------------|--------|-------|---------| | Timings (hot) | 10.2s | 790ms | 12.9x | Forward-Port-Of: odoo/enterprise#72394
Version: 17.0+ Issue: In the Deferred Expense Report, there is a missing check for if the `period_end` is before the `period_start` for when the deferred method is 'day'. If the `period_end` is in the same month as selected month of the report, the later column will compute the amount to be negative of the `amount_per_day` times the difference of days. For example, if the end date is 2024-11-04 and we look at the month of November, the later column will display the negative amount of 26
Original PR description
Version: 17.0+ Issue: In the Deferred Expense Report, there is a missing check for if the `period_end` is before the `period_start` for when the deferred method is 'day'. If the `period_end` is in the same month as selected month of the report, the later column will compute the amount to be negative of the `amount_per_day` times the difference of days. For example, if the end date is 2024-11-04 and we look at the month of November, the later column will display the negative amount of 26 days. In this example the amount is expected to be 0. Purpose of this PR: To add an additional condition, if the `period_end` is before the `period_start` then the amount should be 0. opw-4231549 Forward-Port-Of: odoo/enterprise#72644