Tuesday, October 1, 2024
40 changes · saas-17.4
Resolved issues and error corrections
This update fixes broken automated tests caused by assumptions about unavailable fields and patching behavior. It helps keep Odoo's quality checks reliable without changing end-user functionality.
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
Fixes how profile images appear across Discuss and live chat so non-square photos are cropped neatly instead of being stretched or squeezed. This makes conversations look more polished and consistent for users without changing functionality.
Original PR description
Without it, images with ratio different than 1 had width or height either shrunk or expanded, which definitely makes these avatar look hideous. This commit fixes most of them. Note that the ones with `.o_avatar` have implicitly `o_object_fit_cover` so this was unnecessary to add them. Before / After <img width="51" alt="Screenshot 2024-10-01 at 00 51 05" src="https://github.com/user-attachments/assets/bee81b6c-b3cc-4610-b855-3a66f6defff9"> <img width="55" alt="Screenshot 2024-10-01 at 00 50 44" src="https://github.com/user-attachments/assets/f3d1937c-3a3a-4a8c-aa01-d91e25bceaac"> Before / After <img width="1280" alt="Screenshot 2024-10-01 at 00 51 40" src="https://github.com/user-attachments/assets/983aa74f-2904-4037-a373-517b13a014d9"> <img width="1280" alt="Screenshot 2024-10-01 at 00 49 40" src="https://github.com/user-attachments/assets/4227137a-aab4-48be-bbf0-803704cb9575">
Field Service tasks now correctly show only Field Service projects in the project selection field. This prevents users from accidentally linking tasks to unrelated projects, keeping operational data cleaner and aligned with Field Service workflows.
Original PR description
Steps to Reproduce: - Open Field Service app - Open any task - Click on the Project Field Issue: - You can select any project which should not be possible because we dont use non fsm projects. Reason: - Change in structure of form. - A new label is added before the project field which makes the current xpath being used to become obsolete. Fix: - Updated the xpath. Issue from https://github.com/odoo/odoo/pull/131015 task-4204896
The barcode picking screen now respects the setting to hide reserved lot or serial numbers when there is only one line and it has not been picked or scanned yet. This prevents warehouse users from seeing lot details that should stay hidden under that operation type configuration.
Original PR description
When 'Show reserved lots/SN' is unticked on the operation type, we don't want to show the lot/serial name when there's only a single line and it's not picked/scanned yet.
This fixes failing automated tests for inter-company sales and purchase workflows by avoiding an unnecessary currency field update. The change helps keep quality checks reliable without changing business behavior for users.
Miscellaneous changes
### Steps to reproduce: - Enable Multi-Step Routes - Inventory > Configuration > Warehouse Management > Warehouses - Change your warehouse settings to Manufacturing in 2 steps - Create a product P tracked by serial number with a BOM: - 1 x COMP (a storable product with 10 units in stock) - Create and confirm an MO for 10 units of P - Validate the delivery from stock to pre-production - Click on `Mass Produce` > `Generate` only 7 SN - Click No back order (split and generate only 7 MO's)
Original PR description
### Steps to reproduce: - Enable Multi-Step Routes - Inventory > Configuration > Warehouse Management > Warehouses - Change your warehouse settings to Manufacturing in 2 steps - Create a product P…
### Steps to reproduce: - Enable Multi-Step Routes - Inventory > Configuration > Warehouse Management > Warehouses - Change your warehouse settings to Manufacturing in 2 steps - Create a product P tracked by serial number with a BOM: - 1 x COMP (a storable product with 10 units in stock) - Create and confirm an MO for 10 units of P - Validate the delivery from stock to pre-production - Click on `Mass Produce` > `Generate` only 7 SN - Click No back order (split and generate only 7 MO's) #### > Looking at the quant of the product you see that 0 units are reserved in pre-production but 7 should be - validate one of the 7 MO #### > Looking at the quant of the product you see that -1 units are reserved in pre-production but 6 should be ### Cause of the issue: By processing the "Mass produce" wizzard you will call the `_assign_serial_numbers` method and hence the `split_productions`: https://github.com/odoo/odoo/blob/af4055e2ccce399f94bc465e2dd529c9f14953e0/addons/mrp/wizard/stock_assign_serial_numbers.py#L65-L68 During this `split_productions` call, the quant reserved quantity will be updated by these lines: https://github.com/odoo/odoo/blob/af4055e2ccce399f94bc465e2dd529c9f14953e0/addons/mrp/models/mrp_production.py#L1931-L1938 However, since the stock pocalypse, the quant is already updated once you write and change the quantity of the stock move line of the raw move of the inital MO because of these lines: https://github.com/odoo/odoo/blob/af4055e2ccce399f94bc465e2dd529c9f14953e0/addons/stock/models/stock_move_line.py#L437-L439 Hence, the `stock.quant` reserved quantity will end up to be updated twice opw-4145680 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181864 Forward-Port-Of: odoo/odoo#181255
### Steps to reproduce: - Create a product P tracked by serial number with a BOM: - 1 x COMP (a storable prodcut that you do not have in stock) - Create and confirm an MO for 10 units of P - Click on the [+] button to generate one serial number of P > This steps updates the qty_producting to 1 and the set the consumed_qty of the raw move to 1. - Click on `Mass Produce` > `Generate` > Apply (to generate the remaining SN) > This generates 9 backorders each for 1 unit of P with a set SN ###
Original PR description
### Steps to reproduce: - Create a product P tracked by serial number with a BOM: - 1 x COMP (a storable prodcut that you do not have in stock) - Create and confirm an MO for 10 units of P - Click on…
### Steps to reproduce: - Create a product P tracked by serial number with a BOM: - 1 x COMP (a storable prodcut that you do not have in stock) - Create and confirm an MO for 10 units of P - Click on the [+] button to generate one serial number of P > This steps updates the qty_producting to 1 and the set the consumed_qty of the raw move to 1. - Click on `Mass Produce` > `Generate` > Apply (to generate the remaining SN) > This generates 9 backorders each for 1 unit of P with a set SN #### > However raw moves are **picked with a consumed_qty of 0** ### Cause of the issue: Since the stockpocalypse commit 7dda6bb the `_split_productions` did not consume quantities anymore. This behavior was fixed by commit 4be8cac for mass production notably by the addittion of these lines: https://github.com/odoo/odoo/blob/6995d65437ba6b2cd0df7503d589260bedcce67d/addons/mrp/models/mrp_production.py#L1879-L1887 However, in our flow, when we assigned the firt serial number by clicking on the [+] button we had set the quantity of the `initial_move` to 1 and associated a `move_line` with the corresponding quantity to it. As such, none of the move line of the raw moves of the back order is going to be created and the issue remains. opw-4119702 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#182216 Forward-Port-Of: odoo/odoo#179062
When overtime is converted to time off, an hr.attendance.overtime record is created with a negative amount to offset the total overtime amount available with adjustment set to True. Those records should not be taking into account when computing overtime itself. Forward-Port-Of: odoo/odoo#181701
Original PR description
When overtime is converted to time off, an hr.attendance.overtime record is created with a negative amount to offset the total overtime amount available with adjustment set to True. Those records should not be taking into account when computing overtime itself. Forward-Port-Of: odoo/odoo#181701
**Steps to reproduce:** - Install Accounting - Go to Accounting settings - Set "Quick encoding" to "Customer Invoices and Vendor Bills" - Create an invoice - Set "Total (Tax inc.)" to any value - Add a section and a note - Check Journal Items **Issue:** A tax is set on the section and the note lines. opw-4204583 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181519
Original PR description
**Steps to reproduce:** - Install Accounting - Go to Accounting settings - Set "Quick encoding" to "Customer Invoices and Vendor Bills" - Create an invoice - Set "Total (Tax inc.)" to any value - Add a section and a note - Check Journal Items **Issue:** A tax is set on the section and the note lines. opw-4204583 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181519
Steps to reproduce: 1. Install the `sale_project` module. 2. Create a product with the following properties: - Type: 'Service' - Create on Order: 'Project & Task' 4. Create a sale order and add the product to it. 5. Confirm the sale order. 6. In another tab, change the product type to 'Consumable' in the product form (a popup will appear informing you that you cannot change the type, but it can be dismissed.) The issue arises because the 'Project' smart button remains visible
Original PR description
Steps to reproduce:
1. Install the `sale_project` module.
2. Create a product with the following properties:
- Type: 'Service'
- Create on Order: 'Project & Task'
4. Create a sale order and add the product to it.
5. Confirm the sale order.
6. In another tab, change the product type to 'Consumable' in the product form (a popup will appear informing you that you cannot change the type, but it can be dismissed.)
The issue arises because the 'Project' smart button remains visible in the sale order tab until the page is reloaded, and there are no longer any order lines with a product of type 'Service', resulting in a StopIteration error.
Closes #180340
Forward-Port-Of: odoo/odoo#181946Description 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#179676
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#179676
Overriding the _compute_field_value in order to only prefetch the currently requested field. opw-4213262 Forward-Port-Of: odoo/odoo#181705 Forward-Port-Of: odoo/odoo#181534
Original PR description
Overriding the _compute_field_value in order to only prefetch the currently requested field. opw-4213262 Forward-Port-Of: odoo/odoo#181705 Forward-Port-Of: odoo/odoo#181534
When a user clicks in the catalog record input to change the quantity manually the input content isn't autoselect and the user has to delete the former one to enter the desired value. Autoselecting the value seems more conveniant in the majority of cases. Also, after one of these edits, if the user click right away in the Back to order button, the redirection to the order form will too fast and it will miss the last edition. Current behavior before PR:  Desired behavior after PR is merged:  @Tecnativa --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180003
Backport of 0a60ea114f690b18d7ef8d06e5f659d0122f1ea6 In the prop definition of `MoneyDetailsPopup` it is specified that the `moneyDetails` prop either not be passed or be an object. There are instances where the prop is passed with value `null`. We adapt the definition to reflect this reality. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#182183
Original PR description
Backport of 0a60ea114f690b18d7ef8d06e5f659d0122f1ea6 In the prop definition of `MoneyDetailsPopup` it is specified that the `moneyDetails` prop either not be passed or be an object. There are instances where the prop is passed with value `null`. We adapt the definition to reflect this reality. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#182183
__Current behavior before commit:__ When making a search through `/website/search`, the `website_search_box` view is cached. This includes the search term and the search count. Therefore when a user makes a search, a previous search term might be displayed. It may even be a search that another user made. This bug appeared since the search bar has been added to header templates [`7559626`][1]. __Description of the fix:__ Add `t-nocache` to the whole searchbox so that the search term a
Original PR description
__Current behavior before commit:__ When making a search through `/website/search`, the `website_search_box` view is cached. This includes the search term and the search count. Therefore when a user makes a search, a previous search term might be displayed. It may even be a search that another user made. This bug appeared since the search bar has been added to header templates [`7559626`][1]. __Description of the fix:__ Add `t-nocache` to the whole searchbox so that the search term and the search count is updated with each search. __Steps to reproduce the issue in local:__ (For the issue to appear consistently everytime there should be only a single worker) 1. Click on the search button in the website header and make a search 2. Do the same thing again with another search 3. Click again on the search button The previous search term is shown inside the searchbar opw-4114511 [1]: https://github.com/odoo/odoo/commit/7559626 Forward-Port-Of: odoo/odoo#180548
Currently when invoicing through pos, multiple values related to price discounts are incorrect. Steps to reproduce: ------------------- * Go to the **Point of sale** app * Under **Configuration**, select **Settings** * Enable **Flexible Pricelists** * Select **Advanced price rules** * Create a pricelist, 10% discount on all products, visible on the invoice * Go to the **Products list** * Select any product and apply a tax (price excl) * Open shop session * Select the product with th
Original PR description
Currently when invoicing through pos, multiple values related to price discounts are incorrect. Steps to reproduce: ------------------- * Go to the **Point of sale** app * Under **Configuration**,…
Currently when invoicing through pos, multiple values related to price discounts are incorrect. Steps to reproduce: ------------------- * Go to the **Point of sale** app * Under **Configuration**, select **Settings** * Enable **Flexible Pricelists** * Select **Advanced price rules** * Create a pricelist, 10% discount on all products, visible on the invoice * Go to the **Products list** * Select any product and apply a tax (price excl) * Open shop session * Select the product with the tax * Pay and invoice it > Observation: In some cases the line "Price discounted from" does not appear on the invoice. And when it appears, values are not correct. If you also plied a discount on the product line in addition to the pricelist, values are completely mixed. Why the fix: ------------ We see that we are curently comparing `line.price_subtotal_incl` with `line.product_id.lst_price * line.qty`. https://github.com/odoo/odoo/blob/b49159db74cf4c8212a7bd3dfe551eb852df99f3/addons/point_of_sale/models/pos_order.py#L213-L219 To simplify, we consider a quantity of 1. * `line.price_subtotal_incl` includes discounts (order line discounts and pricelist) and always represent a price with taxes included. * `line.product_id.lst_price` reprensents the price set on the prodcut form. It does not account for any sort of discount. If the tax applied on the product is tax excl(resp. incl) it will be a price tex excl(resp. incl). In the case where the pricelist discount is smaller than the tax amount, for products with tax excl, the `line.price_subtotal_incl` will still be greater than `line.product_id.lst_price` and that's why the invoice does not have the line "Price discounted from". I asked MOBT the behavior expected. For the line "Price discounted from", this should only reflect discounts related to pricelist, and should represent the price tax excl/incl depending on the tax set up on the product page. Line discounts are already reflected on the invoice with `Disc.%`. We choose to compare two values that reflect the same price tax configuration. We compare `line.product_id.lst_price` with `line.price_unit` as both will be tax excl(resp. incl) if the tax applied on the product is tax excl(resp. incl). We also remove the `line.qty` as both represent a price per qty. opw-4170357 Forward-Port-Of: odoo/odoo#181674 Forward-Port-Of: odoo/odoo#181007
To reporoduce: ============== 1. install "l10n_mx" 2. send an email to the vendor bill alias with both XML and PDF attached (use the ones on the ticket) -> Odoo only retrieves the XML file and PDF is deleted Problem: ======== when processing the files, `l10n_mx` may set `process_if_existing_lines = True` on some files, if one of these files is processed first, the other files will be ignored then deleted. Solution: ========= process all files. opw-4054484 --- I confirm I hav
Original PR description
To reporoduce: ============== 1. install "l10n_mx" 2. send an email to the vendor bill alias with both XML and PDF attached (use the ones on the ticket) -> Odoo only retrieves the XML file and PDF is deleted Problem: ======== when processing the files, `l10n_mx` may set `process_if_existing_lines = True` on some files, if one of these files is processed first, the other files will be ignored then deleted. Solution: ========= process all files. opw-4054484 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180576
Issue: ====== We can't move elements in mass mailing. Steps to reproduce the issue: ============================= - Create a new mass mailing with a template that have some blocks - Try to drag one of the blocks to another position - When you click on the button to drag, the right sidebar refreches Origin of the issue: ==================== The issue was first introduced by [1]. The problem when we have the wysiwyg inside an iframe `document.activeElement` will be equal to the i
Original PR description
Issue: ====== We can't move elements in mass mailing. Steps to reproduce the issue: ============================= - Create a new mass mailing with a template that have some blocks - Try to drag one of the blocks to another position - When you click on the button to drag, the right sidebar refreches Origin of the issue: ==================== The issue was first introduced by [1]. The problem when we have the wysiwyg inside an iframe `document.activeElement` will be equal to the iframe element and the `ev.target` is the button of dragging. In reality the button is inside the iframe but the content of the iframe is like this `<iframe> document <iframe>` so contains returns false. Solution: ========= When the `activeElement` is an iframe we search inside its `contentDocument`. opw-4196067 [1]: https://github.com/odoo/odoo/commit/ef97eaf9876bcf1712d4a6bfb91307875b0034ac Forward-Port-Of: odoo/odoo#181143
## Pull Request HOOT (PRHOOT) - part 24 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10
Original PR description
## Pull Request HOOT (PRHOOT) - part 24 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4:…
## Pull Request HOOT (PRHOOT) - part 24 Part 1: https://github.com/odoo/odoo/pull/152930 Part 2: https://github.com/odoo/odoo/pull/153018 Part 3: https://github.com/odoo/odoo/pull/153023 Part 4: https://github.com/odoo/odoo/pull/153203 Part 5: https://github.com/odoo/odoo/pull/153425 Part 6: https://github.com/odoo/odoo/pull/153700 Part 7: https://github.com/odoo/odoo/pull/154054 Part 8: https://github.com/odoo/odoo/pull/154579 Part 9: https://github.com/odoo/odoo/pull/155073 Part 10: https://github.com/odoo/odoo/pull/155639 Part 11: https://github.com/odoo/odoo/pull/156255 / https://github.com/odoo/enterprise/pull/58135 Part 12: https://github.com/odoo/odoo/pull/156869 Part 13: https://github.com/odoo/odoo/pull/158384 / https://github.com/odoo/enterprise/pull/59019 Part 14: https://github.com/odoo/odoo/pull/158916 Part 15: https://github.com/odoo/odoo/pull/160292 / https://github.com/odoo/enterprise/pull/59971 Part 15.5: https://github.com/odoo/odoo/pull/166463 Part 16: https://github.com/odoo/odoo/pull/166311 Part 17: https://github.com/odoo/odoo/pull/168328 Part 18: https://github.com/odoo/odoo/pull/171004 / https://github.com/odoo/enterprise/pull/65657 Part 19: https://github.com/odoo/odoo/pull/171242 / https://github.com/odoo/enterprise/pull/65767 Part 20: https://github.com/odoo/odoo/pull/173332 / https://github.com/odoo/enterprise/pull/66895 Part 21: https://github.com/odoo/odoo/pull/174337 Part 22: https://github.com/odoo/odoo/pull/176777 / https://github.com/odoo/enterprise/pull/68721 Part 23: https://github.com/odoo/odoo/pull/179660 / https://github.com/odoo/enterprise/pull/69728 This pull requests brings various improvements and fixes to Hoot and the Odoo unit test ecosystem. See the different commit messages for more details. Note: these changes are made in stable to avoid having to support multiple versions of the HOOT API. As such, these changes are intended to be strictly limited to unit tests as to not put the rest of the code base at risk. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181971
odoo/odoo#114352 add some logic validation to avoid nonsensical configurations that attempt to e.g. add a follower to a model who does not inherit mail.thread This restriction is a tad too extreme in the case of the 'Send message' action - sending an email is supported on any kind of model as long as the email template supports it. Task-4203142 Forward-Port-Of: odoo/odoo#181763
Original PR description
odoo/odoo#114352 add some logic validation to avoid nonsensical configurations that attempt to e.g. add a follower to a model who does not inherit mail.thread This restriction is a tad too extreme in the case of the 'Send message' action - sending an email is supported on any kind of model as long as the email template supports it. Task-4203142 Forward-Port-Of: odoo/odoo#181763
Steps to reproduce: - Create a product with 2 vendors: - First one: quantity 10, delay 10, price 5 - Second one: quantity 5, delay 5, price 10 - Select the dropship route on the product - Create an SO with that product (quantity 5) and confirm it - Go on the purchase order created Bug: The vendor selected is not the correct one (it selects the first one, so the price should be 0, and the delay should be incorrect as well) Fix: In https://github.com/odoo/odoo/commit/a35be7b0dd52a5
Original PR description
Steps to reproduce: - Create a product with 2 vendors: - First one: quantity 10, delay 10, price 5 - Second one: quantity 5, delay 5, price 10 - Select the dropship route on the product - Create an…
Steps to reproduce: - Create a product with 2 vendors: - First one: quantity 10, delay 10, price 5 - Second one: quantity 5, delay 5, price 10 - Select the dropship route on the product - Create an SO with that product (quantity 5) and confirm it - Go on the purchase order created Bug: The vendor selected is not the correct one (it selects the first one, so the price should be 0, and the delay should be incorrect as well) Fix: In https://github.com/odoo/odoo/commit/a35be7b0dd52a5a02b6811cb95ad3189483b7327, the partner passed to _select_seller will always have a value, but an incorrect one for dropshipping routes. The problem resides in https://github.com/odoo/odoo/blob/c04fe54bf45509660ea94a9d7d431c74f1c6023b/addons/product/models/product_product.py#L656. The partner_id is the SO buyer, and it's not possible to have the vendor == to the buyer. It thus default the vendor to the first known vendor which is incorrect. task-id: 4207060 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181542
**Current behavior:** With a non-standard-costing, stored product appears in a purchase order with a discount and requiring a currency exchange, the price unit may be calculated in an inaccurate fashion. **Expected behavior:** The price_unit should be accurate. **Steps to reproduce:** 1. Enable another currency, set an exchange rate on it that is very small (like < 0.01) 2. Enable automatic valuation, create a product with both average costing method and real time valuation on its ca
Original PR description
**Current behavior:** With a non-standard-costing, stored product appears in a purchase order with a discount and requiring a currency exchange, the price unit may be calculated in an inaccurate…
**Current behavior:** With a non-standard-costing, stored product appears in a purchase order with a discount and requiring a currency exchange, the price unit may be calculated in an inaccurate fashion. **Expected behavior:** The price_unit should be accurate. **Steps to reproduce:** 1. Enable another currency, set an exchange rate on it that is very small (like < 0.01) 2. Enable automatic valuation, create a product with both average costing method and real time valuation on its category, give it some initial cost e.g., 500 3. Create a new purchase order, add a line like: - product_id: from step 2 - quantity: 13 - discount: 1% 4. Set the currency on the purchase order to be the one from step 1, so it is different from the active company's 5. Confirm the purchase order and validate the receipt, look at the SVL generated and note its remaining value 6. Create a bill for the purchase order, post the invoice, then look at the SVL's remaining value again -> it changed **Cause of the issue:** The price unit being converted between currencies and rounded causes some discrepancy with the final value, also the calculation for gross price unit on AML model is somewhat primitive. **Fix:** Stop rounding base and update the formula used when calculating gross price unit. opw-4103167 Forward-Port-Of: odoo/odoo#181866 Forward-Port-Of: odoo/odoo#181527
Steps to reproduce: - Time off > Configuration > Accrual Plan > New - Set 'Accrued Gain Time' to 'At the start' - New Milestone > Set 'Milestone reached' to 0 days after... - Accrue 1 day Monthly on the last day of the month > Save - Management > Allocations > New - Tick 'Accrual allocation' > Set the 'Accrual Plan' to your newly created plan - Set the start date to today - 0 days of allocation for 'Time off type' of your choice > Validate - My time > Dashboard > Use 'Balance at the mm/
Original PR description
Steps to reproduce: - Time off > Configuration > Accrual Plan > New - Set 'Accrued Gain Time' to 'At the start' - New Milestone > Set 'Milestone reached' to 0 days after... - Accrue 1 day Monthly on…
Steps to reproduce:
- Time off > Configuration > Accrual Plan > New
- Set 'Accrued Gain Time' to 'At the start'
- New Milestone > Set 'Milestone reached' to 0 days after...
- Accrue 1 day Monthly on the last day of the month > Save
- Management > Allocations > New
- Tick 'Accrual allocation' > Set the 'Accrual Plan' to your newly created plan
- Set the start date to today
- 0 days of allocation for 'Time off type' of your choice > Validate
- My time > Dashboard > Use 'Balance at the mm/dd/yyyy'
The accrual grants 1 day of leave for the upcoming month on the last day of each month, you will however notice that no leave is granted for the current month until we reach its last day. According to the logic of our accrual, 1 leave day should have been granted on the last day of the previous month so we should get our partial credit for the current month immediately instead.
The first step is to simply add the leave days of the corresponding period but this leads to other issues. When computing accruals that are granted at the start of start of the accrual period we use the already_accrued flag to avoid re-computations, but this flag can be raised by a call chain in the write method of hr.leave.allocation starting from _get_consumed_leaves.
This call chain passes through _process_accrual_plans, and invalidates the cache on its way out though _get_future_leaves_on. This notably happens when computing leaves_taken in _process_accrual_plans which can mess with the record's fields, including but not limited to the already_accrued flag which induces errors in the number_of_days we are trying to compute.
Also, the domain we use to restrict the leaves type that can be picked when asking for a leave prevents us from using allocations that start with 0 days. ('max_leaves', '>', 0) rules out these leaves, even after they have accrued enough time off to legitimately request a leave of this type. Disabling max_leaves = 0 does not seem to serve much purpose as a non-accrual leave starting with 0 days should only be able to fulfill the other conditions if it has 'allows_negative', in which case we would want it to show up anyway.
opw-4192703
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#181115Steps to reproduce: - Survey > New > Tick 'Survey' - Create a question - Test > Complete the survey - Edit survey > See results The banner displays 'This is a test survey entry', despite no longer being in the test. The condition to display this text was removed in c983f8a5343ac623ebc9d6dbddc506db4079ee5e but it is still relevant here. opw-4160109 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#182103 Forward-Port
Original PR description
Steps to reproduce: - Survey > New > Tick 'Survey' - Create a question - Test > Complete the survey - Edit survey > See results The banner displays 'This is a test survey entry', despite no longer being in the test. The condition to display this text was removed in c983f8a5343ac623ebc9d6dbddc506db4079ee5e but it is still relevant here. opw-4160109 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#182103 Forward-Port-Of: odoo/odoo#179726
The taxes on Peru localization no not have the percentage added by default on the invoice_label field. Currently, the tax name is simply IGV (for the 18% tax) which makes the invoice PDF feel incomplete. This Pr adds the percentage on the invoice label. task: 4114767 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181283 Forward-Port-Of: odoo/odoo#179132
Original PR description
The taxes on Peru localization no not have the percentage added by default on the invoice_label field. Currently, the tax name is simply IGV (for the 18% tax) which makes the invoice PDF feel incomplete. This Pr adds the percentage on the invoice label. task: 4114767 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#181283 Forward-Port-Of: odoo/odoo#179132
Steps : - Set the company of the first pricelist in list view to false - Create a product and set it's company and the go to extra price tab and group by product - Now when adding a new, opens form view, try saving the record Issue : Returns a warning message not allowing to save Cause : The company for pricelist that is default selected and the product have different companies Fix : Updated the action so that it does not open form view as the pricelist tree view is multi-edit
Original PR description
Steps : - Set the company of the first pricelist in list view to false - Create a product and set it's company and the go to extra price tab and group by product - Now when adding a new, opens form view, try saving the record Issue : Returns a warning message not allowing to save Cause : The company for pricelist that is default selected and the product have different companies Fix : Updated the action so that it does not open form view as the pricelist tree view is multi-edit opw-3943830 Forward-Port-Of: odoo/odoo#171032
Before: The Schedule by Sales Order menu was not visible to planning users, even if they had the necessary access rights. After: The Schedule by Sales Order menu is now visible to planning users who have the appropriate access rights. Fix: Add the user group so that the menu will now be visible based on the user's access rights. Task:4192098 Forward-Port-Of: odoo/enterprise#70331
Original PR description
Before: The Schedule by Sales Order menu was not visible to planning users, even if they had the necessary access rights. After: The Schedule by Sales Order menu is now visible to planning users who have the appropriate access rights. Fix: Add the user group so that the menu will now be visible based on the user's access rights. Task:4192098 Forward-Port-Of: odoo/enterprise#70331
before this commit, if user need to pass any different value to the sale order creation, there is no direct hook available to do the same after this commit, this hook can be used to pass any value or to modify any existing value passed to the create method Forward-Port-Of: odoo/enterprise#70961 Forward-Port-Of: odoo/enterprise#70151
Original PR description
before this commit, if user need to pass any different value to the sale order creation, there is no direct hook available to do the same after this commit, this hook can be used to pass any value or to modify any existing value passed to the create method Forward-Port-Of: odoo/enterprise#70961 Forward-Port-Of: odoo/enterprise#70151
Steps to reproduce: - Timesheet > Register time for any task The display of time spent on the task also contains the diff with the expected time for the day, which should not be displayed here. I mistakenly left in a display meant for testing purposes only added in commit 56c7e8ccf5eb92baee258842fe72efa3d1956b96 opw-4123649 Forward-Port-Of: odoo/enterprise#71174
Original PR description
Steps to reproduce: - Timesheet > Register time for any task The display of time spent on the task also contains the diff with the expected time for the day, which should not be displayed here. I mistakenly left in a display meant for testing purposes only added in commit 56c7e8ccf5eb92baee258842fe72efa3d1956b96 opw-4123649 Forward-Port-Of: odoo/enterprise#71174
Versions -------- - saas-17.2+ Steps ----- 1. Activiate Stripe, Sips, or Demo as payment provider; 2. create a subscription & confirm; 3. invoice subscription & confirm; 4. click share link & copy; 5. open link in a private window/different browser; 6. pay invoice. Issue ----- The access token is invalid, which is important if you as user don't have regular access to the document (or are logged out). Cause ----- When a subscription payment flow is followed via an invoice, i
Original PR description
Versions -------- - saas-17.2+ Steps ----- 1. Activiate Stripe, Sips, or Demo as payment provider; 2. create a subscription & confirm; 3. invoice subscription & confirm; 4. click share link & copy;…
Versions -------- - saas-17.2+ Steps ----- 1. Activiate Stripe, Sips, or Demo as payment provider; 2. create a subscription & confirm; 3. invoice subscription & confirm; 4. click share link & copy; 5. open link in a private window/different browser; 6. pay invoice. Issue ----- The access token is invalid, which is important if you as user don't have regular access to the document (or are logged out). Cause ----- When a subscription payment flow is followed via an invoice, it sets the `access_token` in the controller and adds a `transaction_route_subscription` value. The `access_token` is valid for the `transaction_route_subscription`, but this route is only followed when payments are automated (added in 36b238b934f). Initially, the invoice token was passed, which worked for non-automated payments getting passed as regular invoices to `account_payment`. Commit 60fd12a6c65 changed this to a subscription token, to allow automated payments, but broke non-automated payments in the process, as those still go via `account_payment`, which expects an invoice token. Solution -------- Concatenate the access tokens, and decide which one to use in the `_submitForm` override. Also partially undo 2b34ba49ef7: `payment_utils.check_access_token` expects a payment access token, the commit made it pass a invoice access token instead. opw-4152257 Forward-Port-Of: odoo/enterprise#70503
Before this PR When multiple appointments are selected and duplicated a traceback occurs. **Technical** **_get_default_range_slots** method in appointment_hr expects single record, so when appointment_hr is installed and try to duplicate the record singelton traceback occurs. After this PR Without any traceback, appointments can be duplicated. Task-4210180 Forward-Port-Of: odoo/enterprise#70537
Original PR description
Before this PR When multiple appointments are selected and duplicated a traceback occurs. **Technical** **_get_default_range_slots** method in appointment_hr expects single record, so when appointment_hr is installed and try to duplicate the record singelton traceback occurs. After this PR Without any traceback, appointments can be duplicated. Task-4210180 Forward-Port-Of: odoo/enterprise#70537
Currently, even tough the quick_create view are defined in the code base, and defines on the kanban view, the quick create view is not used. Step to reproduce: - Install helpdesk - Open helpdesk app - Open the 'all tickets' or the 'My tickets' view - Select the kanban view - Click on the 'new' button A ticket view form is opened. Expected behavior : the quick create view form should be open in the kanban view. Source of the issue: the 'on_create' attribute is missing in the kanba
Original PR description
Currently, even tough the quick_create view are defined in the code base, and defines on the kanban view, the quick create view is not used. Step to reproduce: - Install helpdesk - Open helpdesk app - Open the 'all tickets' or the 'My tickets' view - Select the kanban view - Click on the 'new' button A ticket view form is opened. Expected behavior : the quick create view form should be open in the kanban view. Source of the issue: the 'on_create' attribute is missing in the kanban definition task - 4047630 version 15.0 - master Forward-Port-Of: odoo/enterprise#70513 Forward-Port-Of: odoo/enterprise#66491
The definition of the records `hr_payroll.hr_work_entry_type_out_of_contract` and `l10n_be_hr_payroll.work_entry_type_partial_incapacity` reset the field `is_leave` to False, but not the field `is_unforeseen`. Because of the constraint `is_unforeseen_is_leave`, if `is_unforeseen` had been previously set as True, when the record gets updated (eg during an upgrade), only one of the fields gets changed and it will trigger the constraint. Steps to reproduce: - Edit 'Out of Contract' work entr
Original PR description
The definition of the records `hr_payroll.hr_work_entry_type_out_of_contract` and `l10n_be_hr_payroll.work_entry_type_partial_incapacity` reset the field `is_leave` to False, but not the field `is_unforeseen`. Because of the constraint `is_unforeseen_is_leave`, if `is_unforeseen` had been previously set as True, when the record gets updated (eg during an upgrade), only one of the fields gets changed and it will trigger the constraint. Steps to reproduce: - Edit 'Out of Contract' work entry type and set Time Off and Unforeseen Absence as True. - Upgrade to the next version. Forward-Port-Of: odoo/enterprise#70104
### Steps to reproduce: - Install Field Service module - Set 12-hour time format in the languages - Navigate to My tasks kanban view in Field Service ### Current behavior before PR: When having 12-hour time format for Field Service it will be shown in the kanban view as '02:00 A' for example. This is happening because when formatting the time in the fsm_date widget the format we are using have a typo 'hh:mm A' where the 'AM, PM' should be represented with lowercase 'a' not uppercase 'A
Original PR description
### Steps to reproduce: - Install Field Service module - Set 12-hour time format in the languages - Navigate to My tasks kanban view in Field Service ### Current behavior before PR: When having 12-hour time format for Field Service it will be shown in the kanban view as '02:00 A' for example. This is happening because when formatting the time in the fsm_date widget the format we are using have a typo 'hh:mm A' where the 'AM, PM' should be represented with lowercase 'a' not uppercase 'A' ### Desired behavior after PR is merged: Fixed the typo and added the correct format opw-4178726 Forward-Port-Of: odoo/enterprise#70922 Forward-Port-Of: odoo/enterprise#70250
The tour `spreadsheet_dashboard_document_add_document_to_dashboard_group` was never actually run because the python method wasn't prefixed by `test_`. The toru was also broken since we allowed to create a dashboard based on a new spreadsheet. Task: [4199036](https://www.odoo.com/web#id=4199036&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#70355
Original PR description
The tour `spreadsheet_dashboard_document_add_document_to_dashboard_group` was never actually run because the python method wasn't prefixed by `test_`. The toru was also broken since we allowed to create a dashboard based on a new spreadsheet. Task: [4199036](https://www.odoo.com/web#id=4199036&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#70355
Steps to reproduce the bug: - Log in as a Kenyan company - Create a storable product “P1” with the following Bill of Materials (BoM): - Type: Subcontracting - Subcontractor: Azure Interior - Component: - C1: - Routes: “Resupply Subcontractor on Order” - Create a purchase order for one unit of “P1” - Confirm the PO - Create a second PO for one unit of “C1” and receive it - Confirm the resupply picking of C1 - Confirm the receipt of P1 **Problem:** A validation error is
Original PR description
Steps to reproduce the bug: - Log in as a Kenyan company - Create a storable product “P1” with the following Bill of Materials (BoM): - Type: Subcontracting - Subcontractor: Azure Interior -…
Steps to reproduce the bug:
- Log in as a Kenyan company
- Create a storable product “P1” with the following Bill of Materials (BoM):
- Type: Subcontracting
- Subcontractor: Azure Interior
- Component:
- C1: - Routes: “Resupply Subcontractor on Order”
- Create a purchase order for one unit of “P1”
- Confirm the PO
- Create a second PO for one unit of “C1” and receive it
- Confirm the resupply picking of C1
- Confirm the receipt of P1
**Problem:**
A validation error is triggered: “You cannot end up with a negative stock quantity.”
We added a constraint to prevent negative stock quantities in internal locations for a company in Kenya. However, the location linked to subcontracting is internal but has no warehouse, so we don’t care if its quantity is negative, and it should be ignored. This could also happen with other internal locations that don’t have a warehouse.
Additionally, when reporting stock quantities, we only consider
quantities in locations that have a warehouse:
https://github.com/odoo/enterprise/blob/9dea0f2696084235ee1192b0a14adfa43eb732ef/l10n_ke_edi_oscu_stock/models/product.py#L47
opw-4184857
Forward-Port-Of: odoo/enterprise#70808Allow viewing the fiscal folio for vendor invoices and all payments in the tree view, as it currently only displays for customer invoices. Related https://github.com/odoo/enterprise/pull/69359 Forward-Port-Of: odoo/enterprise#70698
Original PR description
Allow viewing the fiscal folio for vendor invoices and all payments in the tree view, as it currently only displays for customer invoices. Related https://github.com/odoo/enterprise/pull/69359 Forward-Port-Of: odoo/enterprise#70698
Create a bank statement line with: - Label - No partner - Bank Account number [BNK1] - Amount Go to reconciliation widget Reconcile with a manual statement having partner [TEST] [BNK1] will be added to the bank accounts of [TEST] Repeat the steaps with another account [BNK2] Issue: [BNK2] will not be added to the bank accounts of [TEST] This occurs because, when validating a statement line, we don't add a new bank account to the partner if there is already one defined opw-4
Original PR description
Create a bank statement line with: - Label - No partner - Bank Account number [BNK1] - Amount Go to reconciliation widget Reconcile with a manual statement having partner [TEST] [BNK1] will be added to the bank accounts of [TEST] Repeat the steaps with another account [BNK2] Issue: [BNK2] will not be added to the bank accounts of [TEST] This occurs because, when validating a statement line, we don't add a new bank account to the partner if there is already one defined opw-4145124 Forward-Port-Of: odoo/enterprise#69658
Issue: ====== `paid_amount` is not calculated correctly when the schedule pay isn't month. Steps to reproduce the issue: ============================= - Switch to MX company - Go to roque and employee and add these values to his contract : salary structure type( Mexico:Employee) - both schedule pay fields (weekly) - add any amount in wage. - Go to payslips and create one for roque and click on compute sheet - Go to salary computation tab - Basic salary is wrong it should be the amount
Original PR description
Issue: ====== `paid_amount` is not calculated correctly when the schedule pay isn't month. Steps to reproduce the issue: ============================= - Switch to MX company - Go to roque and employee and add these values to his contract : salary structure type( Mexico:Employee) - both schedule pay fields (weekly) - add any amount in wage. - Go to payslips and create one for roque and click on compute sheet - Go to salary computation tab - Basic salary is wrong it should be the amount you put at the start. Origin of the issue and solution: ================================= We were dividing by the coefficient of the pay schedule but in reality we didn't have to since we create the payslip for the period of the schedule pay so it will have the full mentioned wage. But for the christmas we need to divide by the coefficient since it's computed by `days/year`. opw-413332 Forward-Port-Of: odoo/enterprise#70136
The `RuntimeError: dictionary changed size during iteration` occurred in the `_generate_tax_closing_entries` method when iterating over the `closing_moves_by_company` dictionary. This happened because accessing a key in a `defaultdict` that doesn't exist automatically creates that key with a default value. Specifically, the line: ```py if from_post and move == closing_moves_by_company[self.env.company]: ``` triggered the insertion of a new key when `self.env.company` was not already present,
Original PR description
The `RuntimeError: dictionary changed size during iteration` occurred in the `_generate_tax_closing_entries` method when iterating over the `closing_moves_by_company` dictionary. This happened because accessing a key in a `defaultdict` that doesn't exist automatically creates that key with a default value. Specifically, the line: ```py if from_post and move == closing_moves_by_company[self.env.company]: ``` triggered the insertion of a new key when `self.env.company` was not already present, leading to the runtime error. This commit changes the access method to use `.get()` instead of directly accessing the key allowing, safe retrieval of the value without modifying the dictionary. opw-4089738 Forward-Port-Of: odoo/enterprise#70500