Friday, August 2, 2024
36 changes · saas-17.1
Resolved issues and error corrections
This fixes an issue in the sales timesheet timer grid so the timer-related view behaves correctly. It helps teams relying on timesheet tracking avoid display or interaction problems when recording work time.
Miscellaneous changes
Steps to reproduce: - Install `l10n_ec_website_sale` - Go to website and select the website of the 'EC Company' - Add a product and go to checkout - Save the demo address - Add an address Issues: When adding a new address VAT is not shown when logged in, however it's required by some localization (Ecuador for instance). opw-3921156 Forward-Port-Of: odoo/odoo#168930
Original PR description
Steps to reproduce: - Install `l10n_ec_website_sale` - Go to website and select the website of the 'EC Company' - Add a product and go to checkout - Save the demo address - Add an address Issues: When adding a new address VAT is not shown when logged in, however it's required by some localization (Ecuador for instance). opw-3921156 Forward-Port-Of: odoo/odoo#168930
Numerous terms were missing from the translation template file. Forward-Port-Of: odoo/odoo#175206
Original PR description
Numerous terms were missing from the translation template file. Forward-Port-Of: odoo/odoo#175206
Currently, when a loyalty program has a reward of type product and uses `reward_product_tag_id` (set up for at least 2 products), the addition of rewards to the pos order will have mismatched reward lines when adding the second free product (the first product needed to be added first). Steps to reproduce: ------------------- * Go to **Point of Sale** App * Go to **Products** and add a tag (the same) for two products * Under **Products** select `Discount & Loyalty` * Create a new program
Original PR description
Currently, when a loyalty program has a reward of type product and uses `reward_product_tag_id` (set up for at least 2 products), the addition of rewards to the pos order will have mismatched reward…
Currently, when a loyalty program has a reward of type product and uses `reward_product_tag_id` (set up for at least 2 products), the addition of rewards to the pos order will have mismatched reward lines when adding the second free product (the first product needed to be added first).
Steps to reproduce:
-------------------
* Go to **Point of Sale** App
* Go to **Products** and add a tag (the same) for two products
* Under **Products** select `Discount & Loyalty`
* Create a new program of type **Buy X Get Y**
* Rule:
* Min qty: 2 products $0.00
* Among Products: Put all chairs products for example
* Reward:
* Type: Free Product
* Product: None
* Product tag: The tag put on the products previously
* Open shop session
* Add 2 chairs
* Select reward, add the first one
> Everything ok until now
* Add 2 chairs
* Select reward, add the second one
> Observation: Reward computation is wrong we have the following lines:
```
4 Chairs,
Reward 1,
Reward 2,
Free product reward 1
```
> We are missing the free product line related to the second product added and the button to select reward is still highlighted.
Why the fix:
------------
To explain this fix I will use the example given above.
Here are the steps that have been executed already
* Add 2 chairs
* Add the first reward product
* Add 2 chairs
We are currently in the middle of the step "Add second reward product". During that process, we end up in the function `_computeUnclaimedFreeProductQty` while computing values for the reward line. At this very moment in time, the order has the following lines:
* 4 Chairs
* Product 1
* Free product (related to Product 1)
* Product 2
Where Product 1 and Product 2 are the reward products, having the same tag.
Let's focus on this piece of code, with the current example: https://github.com/odoo/odoo/blob/76023820c4d725c81677d2bf3e010c8cee1edd19/addons/pos_loyalty/static/src/js/Loyalty.js#L1464-L1475
Where `product` in this case is `Product 2`. What is happening here at the end is that we have `available = 1` because of line 4 and `claimed = 1` because of line 3. The program considers that we have already claimed the quantity and is the reason why it is not adding the reward line.
The first idea to fix this issue was to write the condition:
```js
if (reward.reward_product_ids.includes(product.id) && reward.reward_product_ids.includes(line.product.id)) {
```
instead of this one
```js
if (line.get_product().id === product.id) {
```
Now both line 2 and 4 are counted toward the `available` quantity. This way the code knows that we have two availaible free product but only 1 was claimed.
While this fixed the original issue, a new issue was created. Now, when we add the second product, the two reward lines were grouped together, using the price of the first free product added. Why was this happening?
Well, once the fist call to the function `_computeUnclaimedFreeProductQty` was done and the reward line was added we had the following order (temporarily)
* 4 Chairs
* Product 1
* Free product (related to Product 1)
* Product 2
* Free product (related to Product 2)
Which is what we expect but we face an issue when the loyalty programs are updated. When the programs update, we go through the function `_updateRewardLines`. In this function we discard the reward lines from the order and then for each claimed reward (Product 1 and Product 2) we re-apply the reward.
While applying the reward for Product 1, we again go through the function `_computeUnclaimedFreeProductQty`. In this case, the order looks like this:
* 4 Chairs
* Product 1
* Product 2
and the function will say that there are 2 available free product and 0 claimed. Were it is technically true, in this case we want to have the available quantity to 1. We want the initial condition:
```js
if (line.get_product().id === product.id) {
```
In the second passage, for product 2, we have `available = 2` and `claimed = 2`.
opw-3587020
Forward-Port-Of: odoo/odoo#175406
Forward-Port-Of: odoo/odoo#173529This fix removes the analytic account distribution as a criteria to split down payments lines (like the taxes are) and weight its distribution according to the line amounts and analytic account distributions. opw-4033706 Forward-Port-Of: odoo/odoo#175078
Original PR description
This fix removes the analytic account distribution as a criteria to split down payments lines (like the taxes are) and weight its distribution according to the line amounts and analytic account distributions. opw-4033706 Forward-Port-Of: odoo/odoo#175078
Steps to reproduce: - In website edit mode. - Click on the header. - Select the "Vertical" template in the "Header" options. - Drag and drop a "Search" block from the inner content section into the header. - Click on the header. - Select "On Hover" for the "Sub Menus" option of the "Navbar". - Save the page. - Enter a letter (e.g., "a") in the search input. - Click outside the page to lose the focus on the input. - Hover over the search results with the mouse. - Traceback: "Cannot r
Original PR description
Steps to reproduce: - In website edit mode. - Click on the header. - Select the "Vertical" template in the "Header" options. - Drag and drop a "Search" block from the inner content section into the header. - Click on the header. - Select "On Hover" for the "Sub Menus" option of the "Navbar". - Save the page. - Enter a letter (e.g., "a") in the search input. - Click outside the page to lose the focus on the input. - Hover over the search results with the mouse. - Traceback: "Cannot read properties of null (reading 'blur')" The bug occurred after commit [1], which didn't account for a dropdown missing a "dropdown-toggle" element. [1]: https://github.com/odoo/odoo/commit/0f7cbf2969b3c4b6c496e5b54814c4a9b3081af4 opw-4012850 Forward-Port-Of: odoo/odoo#175309
Issue: ====== Image changes aren't auto saved. Steps to reproduce the issue: ============================= - Add cover snippet and text-image snipets - Change cover image or the image in the text-image snippet - Don't click anywhere after that - Switch tab to A/B testing for example - Go back to mail body - The image changes aren't saved Origin of the issue and solution: ================================= When we choose an image from the media dialog, we loose the focus from t
Original PR description
Issue: ====== Image changes aren't auto saved. Steps to reproduce the issue: ============================= - Add cover snippet and text-image snipets - Change cover image or the image in the…
Issue: ====== Image changes aren't auto saved. Steps to reproduce the issue: ============================= - Add cover snippet and text-image snipets - Change cover image or the image in the text-image snippet - Don't click anywhere after that - Switch tab to A/B testing for example - Go back to mail body - The image changes aren't saved Origin of the issue and solution: ================================= When we choose an image from the media dialog, we loose the focus from the editable which means `onWysiwygBlur` is not called and as consequence `commitChanges` isn't called too. Since the flow of the destroy and the `commitChanges` in `onWysiwygBlur` are in parallel, the following happens: - We don't update the value in the blur flow because we will wait for some promises which may take some time and the component gets destroyed and we never call the `updateValue` at the end of the function. - Now in the `commitChanges` coming from `onWillUnmount` we need to pass the `urgent` flag in mass_mailing too. opw-3947516 Forward-Port-Of: odoo/odoo#174448 Forward-Port-Of: odoo/odoo#172312
On Bank/Cash journals, there is some inconsistencies between Balance value and what we see in GL when opening it. This is due to a specific configuration when the default account of the journal is used as outstanding payments/receipts account of the journal. Steps: - Create a bank journal and set the default account to be the same as the outstanding payments account - Create a customer payment in this journal - Go to Accounting Dashboard -> The payment value is not taken into account in the
Original PR description
On Bank/Cash journals, there is some inconsistencies between Balance value and what we see in GL when opening it. This is due to a specific configuration when the default account of the journal is used as outstanding payments/receipts account of the journal. Steps: - Create a bank journal and set the default account to be the same as the outstanding payments account - Create a customer payment in this journal - Go to Accounting Dashboard -> The payment value is not taken into account in the Balance value opw-3882204 Forward-Port-Of: odoo/odoo#173338
### [FIX] hr_recruitment: use context lang for partner creation When partner is created from Applicant's email_from inverse, in a situation when job application is submitted, we should use context lang for him. Useful when submiting application for multi-lang website and becuase partner's lang is used to send appropriate translations of recruitment templates. ### [Reproduce Original Error] - Install website,hr_recruitment - Set couple of languages on the website (e.g., en_US as def
Original PR description
### [FIX] hr_recruitment: use context lang for partner creation When partner is created from Applicant's email_from inverse, in a situation when job application is submitted, we should use context lang for him. Useful when submiting application for multi-lang website and becuase partner's lang is used to send appropriate translations of recruitment templates. ### [Reproduce Original Error] - Install website,hr_recruitment - Set couple of languages on the website (e.g., en_US as default, es_MX as the second language). - In incognito, using non-default language, apply for some position (url: /es_MX/jobs ) - BUG: The email sent to the applicant is in the default language opw-3984176 Forward-Port-Of: odoo/odoo#173212
Since #169396, the hr_expense_test_tour is failing on community nightly runs as the "save the new report" step does not succeed without demo. runbot-70701 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174476
Original PR description
Since #169396, the hr_expense_test_tour is failing on community nightly runs as the "save the new report" step does not succeed without demo. runbot-70701 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174476
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a saudi company - Install the Arabic language - Go in Accounting > Customers > Invoices and create a new one - Add an internal note with a list (using /) - Add a translation in arabic with the "EN" button - Click Preview - The points of the list appear in the middle of the page ### Cause: The lists are not adapted to be displayed from right to left. ### Solution: Add the option `dir="rtl"` in the span of the Arab
Original PR description
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a saudi company - Install the Arabic language - Go in Accounting > Customers > Invoices and create a new one - Add an internal note with a list (using /) - Add a translation in arabic with the "EN" button - Click Preview - The points of the list appear in the middle of the page ### Cause: The lists are not adapted to be displayed from right to left. ### Solution: Add the option `dir="rtl"` in the span of the Arabic text to make the lists appear the right way. opw-4043175 Forward-Port-Of: odoo/odoo#175333 Forward-Port-Of: odoo/odoo#174541
Steps to reproduce the bug: - Create a maintenance request: - repeat_type: forever, - Maintenance Type: preventive, - recurring_maintenance: True, - Move this request to the 'done' stage. Problem: A new maintenance request is duplicated but with the same last stage of this maintenance request opw-4060845 Forward-Port-Of: odoo/odoo#174411
Original PR description
Steps to reproduce the bug: - Create a maintenance request: - repeat_type: forever, - Maintenance Type: preventive, - recurring_maintenance: True, - Move this request to the 'done' stage. Problem: A new maintenance request is duplicated but with the same last stage of this maintenance request opw-4060845 Forward-Port-Of: odoo/odoo#174411
Behaviour before this change ----- In the "My time off" dashboard, an user belonging to "Administrator" or "Officer" groups will see a list of all public holidays regardless of which working hours they are defined for. Confirmed to be unintended behaviour by HR PO (gmf). Behaviour after this change ----- The list of public holidays displayed on the time off dashboard is the same for all users. The same change is also applied to stress days. opw-4019868 Forward-Port-Of: odoo/odoo#175
Original PR description
Behaviour before this change ----- In the "My time off" dashboard, an user belonging to "Administrator" or "Officer" groups will see a list of all public holidays regardless of which working hours they are defined for. Confirmed to be unintended behaviour by HR PO (gmf). Behaviour after this change ----- The list of public holidays displayed on the time off dashboard is the same for all users. The same change is also applied to stress days. opw-4019868 Forward-Port-Of: odoo/odoo#175075 Forward-Port-Of: odoo/odoo#173205
[FIX] project: add a validation to _onchange_task_company Steps to reproduce the bug: 1. Activate developer mode. 2. Create a project 'project x' and link it to a company. 3. Create a task for 'project x'. 4. Set the default project for tasks to 'project x'. 5. Create a new task and check the default project. The default project is not set correctly. This issue occurs due to how default values are assigned. Initially, a record is created, and then the default values are populated, whic
Original PR description
[FIX] project: add a validation to _onchange_task_company Steps to reproduce the bug: 1. Activate developer mode. 2. Create a project 'project x' and link it to a company. 3. Create a task for 'project x'. 4. Set the default project for tasks to 'project x'. 5. Create a new task and check the default project. The default project is not set correctly. This issue occurs due to how default values are assigned. Initially, a record is created, and then the default values are populated, which triggers the onchange methods. By default `company_id` is not set even when the task is affiliated with a project witch means when `_onchange_task_company` is triggered, the value of `self.company_id` is False, which inturn sets `self.project_id` to False. Reference: opw-400472 Forward-Port-Of: odoo/odoo#173625
The pages/links were changed in the documentation. Update the documentation buttons in the settings to match. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175308 Forward-Port-Of: odoo/odoo#175135
Original PR description
The pages/links were changed in the documentation. Update the documentation buttons in the settings to match. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175308 Forward-Port-Of: odoo/odoo#175135
Steps to reproduce: 1. Drop a pop-up snippet 2. Change the Shown on: This Page to All Pages 3. Save and Edit again 4. Changing Shown on: All Pages to This Page won't work and Snippet Duplicate and Remove options are not visible. Issue reason: Commit [1] relocates the `#o_search_modal` element to `#o_shared_blocks`. Once the Shown on option of popup is changed to All Pages and Saved then again when you Go to Edit mode it adds `o_editable`and `o_dirty` class to popup even when no change
Original PR description
Steps to reproduce: 1. Drop a pop-up snippet 2. Change the Shown on: This Page to All Pages 3. Save and Edit again 4. Changing Shown on: All Pages to This Page won't work and Snippet Duplicate and…
Steps to reproduce: 1. Drop a pop-up snippet 2. Change the Shown on: This Page to All Pages 3. Save and Edit again 4. Changing Shown on: All Pages to This Page won't work and Snippet Duplicate and Remove options are not visible. Issue reason: Commit [1] relocates the `#o_search_modal` element to `#o_shared_blocks`. Once the Shown on option of popup is changed to All Pages and Saved then again when you Go to Edit mode it adds `o_editable`and `o_dirty` class to popup even when no changes are made. So after changing the option, the observer checks for `o_dirty` and changes get rollbacked. Solution: Instead of adding `#o_search_modal` element to `#o_shared_blocks` it is relocated to the new element `#o_search_block` inside the `main` element. This commit ensures that the popup/newsletter popup Shown on option and Snippet Duplicate and Remove options are visible and working. [1] : https://github.com/odoo/odoo/commit/a1858a task-4011237 Forward-Port-Of: odoo/odoo#173473
Added spacing between label and field tags in setting --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175036 Forward-Port-Of: odoo/odoo#174972
Original PR description
Added spacing between label and field tags in setting --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#175036 Forward-Port-Of: odoo/odoo#174972
**Before this PR:** In link tracker form, if there is no campaign/medium/source, 'No matches found' message is directly displayed and the text-box for input disappears quickly. **Specifications:** We need to keep the input text-box open to be able to create new records on the fly. **Technical Reason:** defined 'formatNoMatches' as false to keep text-box open. **After this PR:** Text-box for input will remain open and will not disappear. Task-4065969 Forward-Port-Of: odoo/odoo#17
Original PR description
**Before this PR:** In link tracker form, if there is no campaign/medium/source, 'No matches found' message is directly displayed and the text-box for input disappears quickly. **Specifications:** We need to keep the input text-box open to be able to create new records on the fly. **Technical Reason:** defined 'formatNoMatches' as false to keep text-box open. **After this PR:** Text-box for input will remain open and will not disappear. Task-4065969 Forward-Port-Of: odoo/odoo#174360
In no-demo tests, there is no link tracker, so the expected length is not max+1 but 3. Follow up of e5b88d3a Task-3502174 Forward-Port-Of: odoo/odoo#174391 Forward-Port-Of: odoo/odoo#173303
Original PR description
In no-demo tests, there is no link tracker, so the expected length is not max+1 but 3. Follow up of e5b88d3a Task-3502174 Forward-Port-Of: odoo/odoo#174391 Forward-Port-Of: odoo/odoo#173303
Current behavior before PR: -Resized column widths were lost when moving the top row down or the second row up. -This happened because the new widths after resizing were only applied to the `<td>` elements of the first `<tr>.` Desired behavior after PR is merged: -When moving the top row down or second row up, column widths are copied from the first row to the second row. -Tables don't lose resizing after moving the first row up or down. task-4019025 --- I confirm I hav
Original PR description
Current behavior before PR: -Resized column widths were lost when moving the top row down or the second row up. -This happened because the new widths after resizing were only applied to the `<td>` elements of the first `<tr>.` Desired behavior after PR is merged: -When moving the top row down or second row up, column widths are copied from the first row to the second row. -Tables don't lose resizing after moving the first row up or down. task-4019025 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174429 Forward-Port-Of: odoo/odoo#171695
### Steps to reproduce: - In the settings enable: - Multi-Step Routes - Batch Transfers > Wave Transfers - Inventory > operations > Transfers > Internal Transfer - Create a transfer for 10 units of a product P and mark as to do. - Set the quantity of P to 5 units on the move. - Go back to the list view of internal transfers - Select the box of the internal transfer linked to your partial move - Click on the wheel Action and Add to wave > add to a new wave transfer - Select your pic
Original PR description
### Steps to reproduce: - In the settings enable: - Multi-Step Routes - Batch Transfers > Wave Transfers - Inventory > operations > Transfers > Internal Transfer - Create a transfer for 10 units of a…
### Steps to reproduce: - In the settings enable: - Multi-Step Routes - Batch Transfers > Wave Transfers - Inventory > operations > Transfers > Internal Transfer - Create a transfer for 10 units of a product P and mark as to do. - Set the quantity of P to 5 units on the move. - Go back to the list view of internal transfers - Select the box of the internal transfer linked to your partial move - Click on the wheel Action and Add to wave > add to a new wave transfer - Select your picking to add to the operations and Add to wave #### > A new picking is created and added to the wave transfer while your old picking is emptied and displayed as a draft picking. ### Cause of the issue: During the call of the `_add_to_wave` method, only the picking whose moves quantities completely match the demands are linked to the wave transfer because of these lines: https://github.com/odoo/odoo/blob/4ac6722aec4a638882c41f1df563da6f051849ad/addons/stock_picking_batch/models/stock_move_line.py#L58-L66 In the rest of the call, a new picking linked to all the partially assigned moves of our picking will be created in the wave transfer: https://github.com/odoo/odoo/blob/4ac6722aec4a638882c41f1df563da6f051849ad/addons/stock_picking_batch/models/stock_move_line.py#L68-L89 This action unlinks them from our original picking. However, they will not be reassigned to our original picking during the `action_confirm` of the wave transfer since the original picking was not linked to the batch. This leaves the picking empty recomputing its state to be 'draft'. ### Fix: The lines that prevent the original picking from being linked to the wave have been introduced by commit 8d0e49c in order to prevent the picking from being linked if at least one of its moves is not be added to the wave transfer (i.e. when the associated quantity is 0). Thus, the picking should still be linked to the wave transfer if all its moves are partially assigned. opw-3985566 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169987
l10n_in_* = l10n_in_edi,l10n_in_edi_ewaybill In the context of Indian EDI and e-waybill regulations, the cancellation service fails if more than 24 hours have passed since the document was submitted. However, these documents can still be canceled through other channels. To ensure users can cancel their invoices in Odoo even if the initial cancellation request fails, we've implemented a new feature. A 'Force Cancel' button has been added to the EDI cancellation flow. If a cancellation
Original PR description
l10n_in_* = l10n_in_edi,l10n_in_edi_ewaybill In the context of Indian EDI and e-waybill regulations, the cancellation service fails if more than 24 hours have passed since the document was submitted. However, these documents can still be canceled through other channels. To ensure users can cancel their invoices in Odoo even if the initial cancellation request fails, we've implemented a new feature. A 'Force Cancel' button has been added to the EDI cancellation flow. If a cancellation request fails, the user can click this button to cancel the invoice immediately. Additionally, we have provided a hook that can be inherited to specify whether this force-cancellation option is applicable to each invoice. **task**-3997285 Forward-Port-Of: odoo/odoo#170257
We filter `amba` subystem on serial devices to avoid having a fake scale being detected by Odoo. Problem was that Windows serial Python package does not have a subsystem attribute: we are now making the distinction between Linux and Windows IoT. Forward-Port-Of: odoo/odoo#175310
Original PR description
We filter `amba` subystem on serial devices to avoid having a fake scale being detected by Odoo. Problem was that Windows serial Python package does not have a subsystem attribute: we are now making the distinction between Linux and Windows IoT. Forward-Port-Of: odoo/odoo#175310
Steps: - Install project. - Create a project and share that project. - Create a task and archive that task - Open project sharing view in mobile device. - Open that archive task. Issue: - State selection and archive badge is not displaying property in project sharing task form view. Cause: - Issue about this display was fix in backend but forgot to fix that in frontend, Fix: - Fix aligment issue by making state field display differently when task is archive in mobile like we di
Original PR description
Steps: - Install project. - Create a project and share that project. - Create a task and archive that task - Open project sharing view in mobile device. - Open that archive task. Issue: - State selection and archive badge is not displaying property in project sharing task form view. Cause: - Issue about this display was fix in backend but forgot to fix that in frontend, Fix: - Fix aligment issue by making state field display differently when task is archive in mobile like we did in backend similer to this pr https://github.com/odoo/odoo/pull/125532 task-3690532 Forward-Port-Of: odoo/odoo#149515
At the moment, if any of the taxes for which l10n_ke_edi_oscu adds tax types doesn't exist, the upgrade to 17.0 fails, because l10n_ke_edi_oscu is set to auto_install. We don't want this upgrade to fail, especially given that this might affect customers who have no intention of using l10n_ke_edi_oscu. Solution: we simply don't set the tax type on those taxes which don't exist. If the user wants to use l10n_ke_edi_oscu properly, they should re-load the taxes via the Reload button in the Acc
Original PR description
At the moment, if any of the taxes for which l10n_ke_edi_oscu adds tax types doesn't exist, the upgrade to 17.0 fails, because l10n_ke_edi_oscu is set to auto_install. We don't want this upgrade to fail, especially given that this might affect customers who have no intention of using l10n_ke_edi_oscu. Solution: we simply don't set the tax type on those taxes which don't exist. If the user wants to use l10n_ke_edi_oscu properly, they should re-load the taxes via the Reload button in the Accounting settings. Forward-Port-Of: odoo/enterprise#67180
Steps to reproduce: - Manufacturing > Products > BoM - Create BoM with at least 1 operation - New MO with Quantity to produce >= 1000 - Shop Floor > Remove filters What happens: Work order card truncates number of units to produce by 3 digits, i.e. a quantity of 2500 displays as 2, 34000 as 34, etc... This is caused by the successive conversions in formatFloat, they go: Number (quantityToProduce) > String (formatFloat) > Number (ParseFloat) > String (String()) Which looks to be a dirty
Original PR description
Steps to reproduce: - Manufacturing > Products > BoM - Create BoM with at least 1 operation - New MO with Quantity to produce >= 1000 - Shop Floor > Remove filters What happens: Work order card…
Steps to reproduce: - Manufacturing > Products > BoM - Create BoM with at least 1 operation - New MO with Quantity to produce >= 1000 - Shop Floor > Remove filters What happens: Work order card truncates number of units to produce by 3 digits, i.e. a quantity of 2500 displays as 2, 34000 as 34, etc... This is caused by the successive conversions in formatFloat, they go: Number (quantityToProduce) > String (formatFloat) > Number (ParseFloat) > String (String()) Which looks to be a dirty solution to forcefully display the float as an integer value. What this fix does: Getting rid of the superfluous conversions fixes the truncating issue. The decimal precision was set to default to integer values if the precision props is not defined to conserve the original behavior since manufacturing fractions of a product seems nonsensical, but it seems a precision was passed all along and simply failed to display because of the aforementioned issue. So now 2500 displays as 2500.00 not sure if that was intended or just ignored because of the previous display weirdness. opw-4040457 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#66570
**Current behavior:** There are several related bugs when operating in a multi-company environment with the barcode app: *Given:* we have three companies in the selector (A, B, C) where company A is the first/default/primary of the three. ***Case 1: (CompanyB and CompanyC are checked, either can be focused)*** 1) Scanning the barcode for CompanyC's manufacturing operation and then, within the barcode view, scanning a product which belongs exclusively to CompanyB will make it impossib
Original PR description
**Current behavior:** There are several related bugs when operating in a multi-company environment with the barcode app: *Given:* we have three companies in the selector (A, B, C) where company A is…
**Current behavior:** There are several related bugs when operating in a multi-company environment with the barcode app: *Given:* we have three companies in the selector (A, B, C) where company A is the first/default/primary of the three. ***Case 1: (CompanyB and CompanyC are checked, either can be focused)*** 1) Scanning the barcode for CompanyC's manufacturing operation and then, within the barcode view, scanning a product which belongs exclusively to CompanyB will make it impossible to use the back button (despite the product correctly not being added as a line in the operation). 2) Repeating the setup with a different operation type (e.g., receipt) *will* add the product to the picking but it will not be possible to validate/take out of draft from either the barcode app nor from the backend. ***Case 2: (only CompanyC checked and focused)*** 1) Scanning the barcode for CompanyC's manufacturing operation type will open the barcode operation view for CompanyA's manufacture operation. Products available to CompanyC can be added. Trying to validate the order will cause an access error, however the MO is still created in the backend. 2) Scanning the barcode for either CompanyB or CompanyA's non-manufacturing operations will show an access error dialog, but an (empty) transfer will still be created in the backend for the respective company. --- **Expected behavior:** In case 1, scanning a product which is not available to the current company should not trap the user in the barcode operation view. It should also not add these inaccessible products to a picking thereby making them unable to be validated. In case 2, we should respect the company defined on a manufacturing operation type which corresponds to a scanned barcode. Additionally, it should not be possible to create empty transfers for companies which are not currently checked/active. --- **Cause of the issue:** Problem 1: production records (unlike pickings) cannot be created until a product is added in the barcode view. Because of this different flow, they are created with less context than other operation types and there was no mechanism by which their `company_id` could be inferred. This caused them to use the default value as defined in the `MrpProduction` model (`self.env.company`)- which is problematic in the barcode app, as this field does not actually correspond to the focused/active company. Problem 2: when scanning a picking type from the main menu of the barcode app, the company of the picking type was not getting respected which would cause a new picking record to be created even when the current user/environment did not have permission. --- **Fix:** 1. Create production records using a default `company_id` value informed by their `picking_type_id` rather than the environment 2. In the main_menu barcode scan route, use the current user's allowed company ids (from their cookies) to restrict searchable records 3. When scanning products in a barcode operation view, use the company_id of the opened operation type to restrict the domain of searchable records. opw-3999622 Forward-Port-Of: odoo/enterprise#65433
Steps to reproduce the bug: - Log in as Mitchell Admin. - Go to Work Centers > Assembly Line 1 > Select Mark Demo in the allowed employees. - Create a storable product P1 with BoM: - Components: Select any product. - Operation: OP1 in Assembly Line 1. - Create a manufacturing order to produce one unit of P1. - Try to start the work order with Mitchell from the form view. Problem: No user error is triggered when it should be. opw-4045726 Forward-Port-Of: odoo/enterprise#671
Original PR description
Steps to reproduce the bug:
- Log in as Mitchell Admin.
- Go to Work Centers > Assembly Line 1 > Select Mark Demo in the allowed employees.
- Create a storable product P1 with BoM:
- Components: Select any product.
- Operation: OP1 in Assembly Line 1.
- Create a manufacturing order to produce one unit of P1.
- Try to start the work order with Mitchell from the form view.
Problem:
No user error is triggered when it should be.
opw-4045726
Forward-Port-Of: odoo/enterprise#67194ISSUE 1 ======= **Steps to reproduce** 1). Create an event in any appointment type 2). Remove the start date from it -> Traceback occurs **video ref** - https://youtu.be/5NpfiKNdjbc **Technical** in the interval_from_events function when the end time or start time is not defined, it will not be able to unpack the values to their appropriate variables, due to this error occurred. ISSUE 2 ======= **How to reproduce** Step 1) Create an event on resources and set the start time
Original PR description
ISSUE 1 ======= **Steps to reproduce** 1). Create an event in any appointment type 2). Remove the start date from it -> Traceback occurs **video ref** - https://youtu.be/5NpfiKNdjbc **Technical** in the interval_from_events function when the end time or start time is not defined, it will not be able to unpack the values to their appropriate variables, due to this error occurred. ISSUE 2 ======= **How to reproduce** Step 1) Create an event on resources and set the start time = end time Step 2) Click on the edit button -> Traceback video ref - https://youtu.be/csFkJjO6hMQ **Technical** When we set the start = stop then we won't be able to find the interval so we failed to assign the value of the field due to this traceback occurs. **After this PR** Now traceback will not occur. Task-4010880 Forward-Port-Of: odoo/enterprise#67179
When creating an asset from sub company when both sub company and parent company are selected, the asset's depreciation moves have the parent company instead of the child one. Steps: - Have a parent company P and a child company C - With companies set to P + C, and company set to C - Create an asset and compute board - Click on "Posted Entries" smart button -> Entries have P as company instead of C opw-4059496 Forward-Port-Of: odoo/enterprise#67126
Original PR description
When creating an asset from sub company when both sub company and parent company are selected, the asset's depreciation moves have the parent company instead of the child one. Steps: - Have a parent company P and a child company C - With companies set to P + C, and company set to C - Create an asset and compute board - Click on "Posted Entries" smart button -> Entries have P as company instead of C opw-4059496 Forward-Port-Of: odoo/enterprise#67126
The product_pricing_ids didn't exclude archived pricelist which could lead to wrong price. While also displaying unnecessary data. opw-4053690 Forward-Port-Of: odoo/enterprise#67535
Original PR description
The product_pricing_ids didn't exclude archived pricelist which could lead to wrong price. While also displaying unnecessary data. opw-4053690 Forward-Port-Of: odoo/enterprise#67535
Currently, when printing reports using the iot, if we don't select a device when the wizard prompts ut to do so, nothing will be printed and it will be saved in the browser storage that no printer should print this report. Steps to reproduce: ------------------- * Connect the IOT to the db * In developper mode go to: **Settings** > **Technical** > **Actions** > **Reports** * Select `PDF Quote` for example and associate a printer * Go to the **Sale** App and select any quotation * Select
Original PR description
Currently, when printing reports using the iot, if we don't select a device when the wizard prompts ut to do so, nothing will be printed and it will be saved in the browser storage that no printer…
Currently, when printing reports using the iot, if we don't select a device when the wizard prompts ut to do so, nothing will be printed and it will be saved in the browser storage that no printer should print this report. Steps to reproduce: ------------------- * Connect the IOT to the db * In developper mode go to: **Settings** > **Technical** > **Actions** > **Reports** * Select `PDF Quote` for example and associate a printer * Go to the **Sale** App and select any quotation * Select the gear icon * Select **Print** > `PDF Quote` * Select `Print` without selecting a printer > Observation: Nothing is printed * Select **Print** > `PDF Quote` > Observation: Nothing is printed and the prompt does not appear Why the fix: ------------ The idea behind this fix is to make it mandatory to choose at least one of the devices on the wizard prompt. If at least one printer is selected we continue with the printing. If not, we put a notification on screen and don't do anything else. opw-4019575 Current behavior with the fix: --------------------------------------  Forward-Port-Of: odoo/enterprise#67579
This commit is a backport of a04d119. The _compute_display_name needed more fields inside its depends to make it efficient. This commit handles this issue and updates the associated query counters. task-4061715 Forward-Port-Of: odoo/enterprise#67729
Original PR description
This commit is a backport of a04d119. The _compute_display_name needed more fields inside its depends to make it efficient. This commit handles this issue and updates the associated query counters. task-4061715 Forward-Port-Of: odoo/enterprise#67729
Currently we just check whether the company has 'BE' fiscal country code. But this can be incorrect: We may want to create a report for a foreign VAT fiscal position. This situation can lead to a traceback (see below). After this commit we use the dedicated helper function `_get_report_country_code` to determine the right country code. Reproduce: 1. Install `l10n_be_reports` and `l10n_fr_reports` 2. On the Belgian company create a fiscal position with country 'France' and a 'Foreign Tax
Original PR description
Currently we just check whether the company has 'BE' fiscal country code. But this can be incorrect: We may want to create a report for a foreign VAT fiscal position. This situation can lead to a traceback (see below). After this commit we use the dedicated helper function `_get_report_country_code` to determine the right country code. Reproduce: 1. Install `l10n_be_reports` and `l10n_fr_reports` 2. On the Belgian company create a fiscal position with country 'France' and a 'Foreign Tax ID' 3. On the Belgian company open the tax report and select the French tax report 4. Click on the "Closing Entry" button to create a draft closing entry move 5. Try to post the move 6. Traceback (in which `l10n_be_reports_post_wizard` appears) task-4063968 Forward-Port-Of: odoo/enterprise#67548 Forward-Port-Of: odoo/enterprise#67122
When a user deletes buttons with sequences 0, 1, or 2, and buttons with sequences greater than 2 still exist, the template preview does not display any buttons as expected. Steps to produce: - Create a template with 5 buttons. - Delete the first 3 buttons (sequences 0, 1, and 2). - Preview the template. - No buttons will be shown in the preview. Problem: The template preview shows buttons based on their sequence field (0, 1, 2, etc.). When buttons with sequences 0, 1, and 2 are de
Original PR description
When a user deletes buttons with sequences 0, 1, or 2, and buttons with sequences greater than 2 still exist, the template preview does not display any buttons as expected. Steps to produce: - Create a template with 5 buttons. - Delete the first 3 buttons (sequences 0, 1, and 2). - Preview the template. - No buttons will be shown in the preview. Problem: The template preview shows buttons based on their sequence field (0, 1, 2, etc.). When buttons with sequences 0, 1, and 2 are deleted, and only buttons with higher sequences remain, none of the remaining buttons are displayed. Solution: Rather than rendering all buttons and displaying buttons based on sequence, render limited buttons based on the button length to achieve the same preview as Meta. This ensures that when buttons with lower sequences are deleted, the remaining buttons are still shown correctly in the preview. Forward-Port-Of: odoo/enterprise#66978
This commit fixes an issue with locked/readonly empty articles. If a user opens an article which is locked/readonly for them, when switching articles the browser will try to update the article's name. This operation is of course not possible, but this leads to the user not able to leave said article. This is caused by the update method on the record which sets it as dirty so that it can be saved when possible. In order to fix, this when the user has no write access on the article or if it is
Original PR description
This commit fixes an issue with locked/readonly empty articles. If a user opens an article which is locked/readonly for them, when switching articles the browser will try to update the article's name. This operation is of course not possible, but this leads to the user not able to leave said article. This is caused by the update method on the record which sets it as dirty so that it can be saved when possible. In order to fix, this when the user has no write access on the article or if it is locked, we return early so that the record doesn't set itself as dirty. task-4047722 Forward-Port-Of: odoo/enterprise#66589