Thursday, October 31, 2024
25 changes · saas-17.4
Resolved issues and error corrections
This fixes a navigation issue in Discuss where using breadcrumbs could send users back to the first mailbox or thread they opened instead of the one they were viewing. Users can now move between inboxes, channels, and related records with breadcrumbs and return to the expected conversation, reducing confusion and wasted time.
Original PR description
Before this PR, going back to discuss from the breadcrumbs would always redirect to the thread discuss first opened. Steps to reproduce: - Go to `http://localhost:8069/odoo/discuss?active_id=mail_box.inbox`. - Switch to the starred inbox. - Go to the form view of the general channel. - Click on the breadcrumb "Starred". - You are on the Inbox channel. This happens because the action service restores the action. Discuss only has one action: the one that opens the app. Then upon navigation, the current thread is added to the URL. However, the changes in the URL are not taken into account by the action service. This PR fixes the issue by updating the action when the thread changes so that it can be restored. task-4210141
This fix prevents an error when website editors adjust the width of columns in a steps snippet and then click the handle. Editors can now interact with the snippet reliably, avoiding interruptions while building or updating pages.
Original PR description
Steps to Reproduce : 1. Drag and drop a steps snippet 2. Increase the length of any column, in such a way that connector line between the columns in such a way that it overlay handle button. 3. Click on handle button -> A trace-back error occurs Description: When the method is called, it filters out all the overlay elements and finds the first element behind the overlay to apply the click function on it. The issue arises because the method filters out overlay elements and selects the first underlying element to apply a click function on it. However, when the selected element is an SVG or path, which do not support native JavaScript click methods or events, this causes error. This fix resolves the trace-back by filtering out elements that lack native JavaScript click methods or event bindings before calling click. This prevents the error, ensuring smooth interaction with overlay elements. task-3911780
Recurring project tasks now only prepare the next occurrence when one is actually needed. This prevents extra child tasks from being created unnecessarily, reducing clutter and avoiding wasted processing.
Original PR description
Currently, the _create_next_occurence_values method is always called, even if no next occurences need to be created. This is bad, because if the next condition in the code is falsy, we would have created child tasks for nothing since childs are created using copy() in the method to handle recursion. This PR will fix it by checking beforehand if any next occurence should be made, and call _create_next_occurrence_values only if so. task-4269547
Miscellaneous changes
*l10n_fr,l10n_fr_facturx_chorus_pro,l10n_fr_fec,l10n_fr_invoice_addr, l10n_fr_pos_cert Related to https://github.com/odoo/enterprise/pull/73048 Forward-Port-Of: odoo/odoo#185918 Forward-Port-Of: odoo/odoo#185817
Original PR description
*l10n_fr,l10n_fr_facturx_chorus_pro,l10n_fr_fec,l10n_fr_invoice_addr, l10n_fr_pos_cert Related to https://github.com/odoo/enterprise/pull/73048 Forward-Port-Of: odoo/odoo#185918 Forward-Port-Of: odoo/odoo#185817
Currently, sending a Bis 3 xml on Peppol raises errors if an early payment discount is set on the invoice (the Belgian one: "Always (upon invoice)", for instance: "2/7 Net 30"). An example xml can be found in the attachments. It raises the error: ``` [BR-E-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Exempt from VAT" shall contain exactly one VAT breakdo
Original PR description
Currently, sending a Bis 3 xml on Peppol raises errors if an early payment discount is set on the invoice (the Belgian one: "Always (upon invoice)", for instance: "2/7 Net 30"). An example xml can be found in the attachments. It raises the error: ``` [BR-E-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Exempt from VAT" shall contain exactly one VAT breakdown (BG-23) with the VAT category code (BT-118) equal to "Exempt from VAT" ``` Looking at the documentation on [1], we realize we lack an additional VAT breakdown in the xml. [1] https://einvoice.belgium.be/en/article/business-expert-group-overview task-4283933 Forward-Port-Of: odoo/odoo#185138
…creating accrued revenue entries Problem: When using the generate accrued revenue entries action on a sale/purchase order where the first order line is a section or note leads to an invalid account move being created. The move contains a line with not account set. Purpose of this PR: To make sure only product lines are taken into account when generating these entries How to reproduce: 1) Create and confirm a sale order where the first order line is a section or note and the next con
Original PR description
…creating accrued revenue entries Problem: When using the generate accrued revenue entries action on a sale/purchase order where the first order line is a section or note leads to an invalid account move being created. The move contains a line with not account set. Purpose of this PR: To make sure only product lines are taken into account when generating these entries How to reproduce: 1) Create and confirm a sale order where the first order line is a section or note and the next contains a product 2) Run the Accrued Revenue Entry contextual action 3) Fill the Accrual Account and Amount fields with arbitrary data and hit Create Entry 4) Error appears, a move line is generated with no account --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#183230
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.4.1 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185965
Original PR description
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.4.1 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185965
Steps to reproduce the bug: - Create a storable product “P1”: - UoM: gram - Create a component “C1” - UoM: gram - Create a BoM for P1: - quantity: 1kg - Component: 1g of C1 - Create a Mo to produce 1kg of P1 - Confirm the MO - Create a landed cost: - Apply on manufacturing order - Select the created MO - Add a landed product with a unit price of 25 - Validate the landed cost - Go to the linked valuation layer Problem: A value of (25 * 1000) is
Original PR description
Steps to reproduce the bug:
- Create a storable product “P1”:
- UoM: gram
- Create a component “C1”
- UoM: gram
- Create a BoM for P1:
- quantity: 1kg
- Component: 1g of C1
- Create a Mo to produce 1kg of P1
- Confirm the MO
- Create a landed cost:
- Apply on manufacturing order
- Select the created MO
- Add a landed product with a unit price of 25
- Validate the landed cost
- Go to the linked valuation layer
Problem:
A value of (25 * 1000) is added instead of only $25
opw-4252901
Forward-Port-Of: odoo/odoo#185725opw-3971513 Forward-Port-Of: odoo/odoo#181103
Original PR description
opw-3971513 Forward-Port-Of: odoo/odoo#181103
Before this PR, pressing the `Escape` key in an open thread action within the chat window would close the entire chat window rather than just the thread action. This PR fixes the issue by ensuring `Escape` closes only the active thread action. task-4290661 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185792 Forward-Port-Of: odoo/odoo#185503
Original PR description
Before this PR, pressing the `Escape` key in an open thread action within the chat window would close the entire chat window rather than just the thread action. This PR fixes the issue by ensuring `Escape` closes only the active thread action. task-4290661 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185792 Forward-Port-Of: odoo/odoo#185503
Problem: Certain `ir.actions.act_window` actions contain a context with `active_id`, which causes issues when set as home actions, as `active_id` will not be defined in that context. Solution: Prevent the selection of actions that include `active_id` in their context from being set as home actions. Steps to reproduce: 1. Enable debug mode. 2. Navigate to `Settings / Users & Companies / Users`. 3. Select the current user from the list. 4. Under Preferences / Menus Customization set "H
Original PR description
Problem: Certain `ir.actions.act_window` actions contain a context with `active_id`, which causes issues when set as home actions, as `active_id` will not be defined in that context. Solution: Prevent the selection of actions that include `active_id` in their context from being set as home actions. Steps to reproduce: 1. Enable debug mode. 2. Navigate to `Settings / Users & Companies / Users`. 3. Select the current user from the list. 4. Under Preferences / Menus Customization set "Home Action" to "Quotations and Sales." 5. After that: each time you go to backend homepage (/) you get a traceback error instead of the app dashboard opw-4283156 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185867 Forward-Port-Of: odoo/odoo#185319
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For example: * Unit per CLP: 0.001057876419 * CLP per Unit:945.29 - Create an invoice in USD with 2 lines having different amount: * 15.80 * 15.00 - Save the invoice - Print the invoice **Issue:** On the printed invoice, a slightly different currency rate is displayed for each invoice l
Original PR description
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For…
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For example: * Unit per CLP: 0.001057876419 * CLP per Unit:945.29 - Create an invoice in USD with 2 lines having different amount: * 15.80 * 15.00 - Save the invoice - Print the invoice **Issue:** On the printed invoice, a slightly different currency rate is displayed for each invoice line. **Cause:** The currency rate to display is computed for each invoice line, based on the following formula: `abs(self.balance) / self.price_subtotal` However, the value of balance is rounded to the unit because of the CLP currency and therefore it generates a different rate when trying to compute it. **Solution:** Compute the rate from the total values instead of the subtotal of each line. The real rate configured on the currency cannot be used because it can be modified after the creation of the invoice. opw-4242448 Linked enterprise PR: https://github.com/odoo/enterprise/pull/73035 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185230
**Description of the issue/feature this PR addresses:** It is needed to be able to create Factura B for a foreign customer. Legal reference: Here is some useful documentation : https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id=8555970 https://www.afip.gob.ar/EspaciosdeDialogoInstitucional/documentos/Acta-15-Espacio-de-Dialogo-AFIP-Camaras-Empresariales-14-11.pdf **Current behavior before PR:** It is not possible to create Factura B for a foreign customer. **Desired b
Original PR description
**Description of the issue/feature this PR addresses:** It is needed to be able to create Factura B for a foreign customer. Legal reference: Here is some useful documentation : https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id=8555970 https://www.afip.gob.ar/EspaciosdeDialogoInstitucional/documentos/Acta-15-Espacio-de-Dialogo-AFIP-Camaras-Empresariales-14-11.pdf **Current behavior before PR:** It is not possible to create Factura B for a foreign customer. **Desired behavior after PR is merged:** It is possible to create Factura B for a foreign customer. Task Adhoc side: 30008 Task latam side: 913 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#185160 Forward-Port-Of: odoo/odoo#176604
From saas-17.2, the module `l10n_fr_fec` was merged into the module `l10n_fr_account`, but the translations were not moved. This change fixes that by reapplying the French translations for FEC related terms. [opw-4150020](https://www.odoo.com/odoo/all-tasks/4150020) Forward-Port-Of: odoo/odoo#184904
Original PR description
From saas-17.2, the module `l10n_fr_fec` was merged into the module `l10n_fr_account`, but the translations were not moved. This change fixes that by reapplying the French translations for FEC related terms. [opw-4150020](https://www.odoo.com/odoo/all-tasks/4150020) Forward-Port-Of: odoo/odoo#184904
Steps to reproduce ================== - Open any list/kanban view - Add a custom filter - Select a datetime field, for example Created on => The default value is the current datetime If you click on the datetime field, the datetimepicker is opened but the minutes are set to 00. If you click on apply, 00 is not set. Cause of the issue ================== The DateTimeInput has a rounding props (by default 5). If we open it with a value that has the minutes not rounded by
Original PR description
Steps to reproduce ================== - Open any list/kanban view - Add a custom filter - Select a datetime field, for example Created on => The default value is the current datetime If you click on the datetime field, the datetimepicker is opened but the minutes are set to 00. If you click on apply, 00 is not set. Cause of the issue ================== The DateTimeInput has a rounding props (by default 5). If we open it with a value that has the minutes not rounded by that amount, 00 will be displayed instead because a <select/> is used, and only the rounded values are present. Solution ======== Round the default value to the nearest 5 minutes opw-4170906 Forward-Port-Of: odoo/odoo#183938
When guessing the language at install (or upgrade) we cannot trigger a pre-fetch of all fields of `res.company` because some of its columns may be not initialized yet. One way to trigger this behaviour is to add a stored field whose default value uses translations, while at the same time adding any other stored field. If the translation is fetched in a sudo environment we can get an error when the System partner has `NULL` language. Steps to reproduce: 1. On a cleanly initialized DB (only `b
Original PR description
When guessing the language at install (or upgrade) we cannot trigger a pre-fetch of all fields of `res.company` because some of its columns may be not initialized yet. One way to trigger this…
When guessing the language at install (or upgrade) we cannot trigger a pre-fetch of all fields of `res.company` because some of its columns may be not initialized yet. One way to trigger this behaviour is to add a stored field whose default value uses translations, while at the same time adding any other stored field. If the translation is fetched in a sudo environment we can get an error when the System partner has `NULL` language.
Steps to reproduce:
1. On a cleanly initialized DB (only `base`) add any extra language (en_GB would do).
2. Open Users & Companies (show inactive users) open System user.
3. Open Related Partner.
3. In the form view of the System partner set the language to None.
4. Try to install via the command line a module with the fields as described above (see below for a code example).
We get an error like:
```
2024-10-30 08:48:40,831 41180 INFO test_16 odoo.modules.registry: module mymodule: creating or updating database tables
2024-10-30 08:48:40,839 41180 ERROR test_16 odoo.sql_db: bad query: SELECT "res_company"."id" AS "id", "res_company"."name" AS "name"
... <many more fields, redacted> ... "res_company"."bar" AS "bar", "res_company"."foo" AS "foo" FROM "res_company" WHERE "res_company".id IN (1)
ERROR: column res_company.foo does not exist
LINE 1: ...e" AS "write_date", "res_company"."bar" AS "bar", "res_compa...
```
The solution we propose is to skip the prefetch of `res.company` fields when we are in the process of guessing the language. In this case the language is correctly picked from the System partner's company.
This issue has been observed in many upgrades to 18, but it's present in older Odoo versions as well. The language field in `res.partner` is not required, thus it is also possible to set the language to `NULL` via code.
Example data observed in upgrades:
```
> select id,name,active,lang from res_partner where lang is null
+----+-----------------------+--------+--------+
| id | name | active | lang |
|----+-----------------------+--------+--------|
| 4 | Public user | False | <null> |
| 5 | Default User Template | False | <null> |
| 6 | Portal User Template | False | <null> |
| 2 | System | False | <null> |
+----+-----------------------+--------+--------+
```
There may be other standard flows that lead to such setup where System partner has no language set.
Example inherit of `res.company` that triggers the issue:
```py
class A(models.Model):
_inherit = "res.company"
bar = fields.Many2one(
comodel_name="ir.sequence",
default=lambda self: self.env["ir.sequence"].sudo().create({"name": _("Dummy")}),
required=True,
)
foo = fields.Integer()
```
Standard example of this code pattern that triggers the issue during upgrades to 18:
https://github.com/odoo/odoo/blob/dd71d998/addons/account/models/company.py#L140-L152
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#185810There was a typo in the test, which was breaking tests when they ran without demo data. This commit fixes it. [broken test builds](https://runbot.odoo.com/web#id=56563&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) Forward-Port-Of: odoo/odoo#185659
Original PR description
There was a typo in the test, which was breaking tests when they ran without demo data. This commit fixes it. [broken test builds](https://runbot.odoo.com/web#id=56563&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) Forward-Port-Of: odoo/odoo#185659
*l10n_fr_fec_import,l10n_fr_reports Related to https://github.com/odoo/odoo/pull/185817 Forward-Port-Of: odoo/enterprise#73098 Forward-Port-Of: odoo/enterprise#73048
Original PR description
*l10n_fr_fec_import,l10n_fr_reports Related to https://github.com/odoo/odoo/pull/185817 Forward-Port-Of: odoo/enterprise#73098 Forward-Port-Of: odoo/enterprise#73048
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by tax calculators are only informational. When they return e.g. 5% tax, the actual amount can be different from 5% because of differences in rounding or (partial) exemptions. The authoritative tax is returned as a value amount (e.g. $10). Because of this, we cannot rely on Odoo to calculate the tax from
Original PR description
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by…
This partially redoes odoo/enterprise#64900. Copying tax_ids from the sale order lines to the down payment line on the invoice doesn't work for external tax calculators. Tax percentages returned by tax calculators are only informational. When they return e.g. 5% tax, the actual amount can be different from 5% because of differences in rounding or (partial) exemptions. The authoritative tax is returned as a value amount (e.g. $10). Because of this, we cannot rely on Odoo to calculate the tax from account.tax records. It's not always going to match. It's not possible to fix this by externally calculating taxes on the down payment invoice. The single down payment line cannot accomodate all different tax categories. Creating a down payment line per tax category (e.g. avatax_category_id) was considered, but a specific down payment product would need to be created per used tax category which would clutter the database. On top of that, down payment products are removed in later versions [1] which would complicate this approach even further. This solves the issue by not calculating taxes on down payments at all. The down payment invoice will not be sent to external tax calculators. The resulting down payment lines on the SO won't have taxes set, and those lines will be excluded from the request to the external tax calculator. The final, "regular invoice" transaction will happen as if no down payments were made. The down payment lines won't be sent, so this will look like a regular invoice from the external calculator's view. By default, the downpayment lines equal the subtotal of the selected down payment amount. We remove tax_ids from the lines because we cannot count on calculating tax locally (see above). To keep the behavior analogous we override the downpayment wizard to create a single down payment line with a total equal to the entered total in the wizard. [1] odoo/odoo@9aa52dd6418e5881adc2d96d15d062b55d6150c5 opw-3971513 Forward-Port-Of: odoo/enterprise#73027 Forward-Port-Of: odoo/enterprise#70517
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For example: * Unit per CLP: 0.001057876419 * CLP per Unit:945.29 - Create an invoice in USD with 2 lines having different amount: * 15.80 * 15.00 - Save the invoice - Print the invoice **Issue:** On the printed invoice, a slightly different currency rate is displayed for each invoice l
Original PR description
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For…
**Steps to reproduce:** - Install l10n_cl - Switch to a Chilean company (e.g. CL Company) - Activate a foreign currency (e.g. USD) - Make sure that the rate of the foreign currency is not 1 For example: * Unit per CLP: 0.001057876419 * CLP per Unit:945.29 - Create an invoice in USD with 2 lines having different amount: * 15.80 * 15.00 - Save the invoice - Print the invoice **Issue:** On the printed invoice, a slightly different currency rate is displayed for each invoice line. **Cause:** The currency rate to display is computed for each invoice line, based on the following formula: abs(self.balance) / self.price_subtotal However, the value of balance is rounded to the unit because of the CLP currency and therefore it generates a different rate when trying to compute it. **Solution:** Compute the rate from the total values instead of the subtotal of each line. The real rate configured on the currency cannot be used because it can be modified after the creation of the invoice. opw-4242448 Linked community PR: https://github.com/odoo/odoo/pull/185230 Forward-Port-Of: odoo/enterprise#73035
### Description of the issue/feature this PR addresses: It is needed to be able to create Factura B for a foreign customer. Legal reference: Here is some useful documentation : https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id=8555970 https://www.afip.gob.ar/EspaciosdeDialogoInstitucional/documentos/Acta-15-Espacio-de-Dialogo-AFIP-Camaras-Empresariales-14-11.pdf ### Current behavior before PR: It is not possible to create Factura B for a foreign customer. ### Desired
Original PR description
### Description of the issue/feature this PR addresses: It is needed to be able to create Factura B for a foreign customer. Legal reference: Here is some useful documentation : https://servicioscf.afip.gob.ar/publico/abc/ABCpaso2.aspx?id=8555970 https://www.afip.gob.ar/EspaciosdeDialogoInstitucional/documentos/Acta-15-Espacio-de-Dialogo-AFIP-Camaras-Empresariales-14-11.pdf ### Current behavior before PR: It is not possible to create Factura B for a foreign customer. ### Desired behavior after PR is merged: It is possible to create Factura B for a foreign customer. Task Adhoc side: 30008 Task latam side: 913 Forward-Port-Of: odoo/enterprise#72728 Forward-Port-Of: odoo/enterprise#71562
Steps: Create a ticket with no partner. Click on 'Plan Intervention'. The modal opens. Issue: See that a partner "@" has been created and set. Cause: Clicking on the button calls `action_generate_fsm_task`, which calls `_find_or_create_partner`, but the args, `self.partner_name` and `self.partner_email`, are empty. Solution: Not try to create a partner when the fields both empty. task-4265584 Forward-Port-Of: odoo/enterprise#72304
Original PR description
Steps: Create a ticket with no partner. Click on 'Plan Intervention'. The modal opens. Issue: See that a partner "@" has been created and set. Cause: Clicking on the button calls `action_generate_fsm_task`, which calls `_find_or_create_partner`, but the args, `self.partner_name` and `self.partner_email`, are empty. Solution: Not try to create a partner when the fields both empty. task-4265584 Forward-Port-Of: odoo/enterprise#72304
Versions: ------------ 17.0 Steps to Reproduce: ----------------------------- 1. go to sign document 2. add sign item in document 3. click on sign document now 4. click on start seems be not working properly 5. video link: https://nimb.ws/WKMlFjB Issue: ------- stacking order of sign item navigator seems to be low Solution: ------------ increase z-index value of `o_sign_sign_item_navigator`. task-4191542 Forward-Port-Of: odoo/enterprise#70170
Original PR description
Versions: ------------ 17.0 Steps to Reproduce: ----------------------------- 1. go to sign document 2. add sign item in document 3. click on sign document now 4. click on start seems be not working properly 5. video link: https://nimb.ws/WKMlFjB Issue: ------- stacking order of sign item navigator seems to be low Solution: ------------ increase z-index value of `o_sign_sign_item_navigator`. task-4191542 Forward-Port-Of: odoo/enterprise#70170
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header propose to scan a product - Do not scan the product by click on `+ ADD PRODUCT` - Add 1 unit of your favorite product > The header propose to scan a product or a destination location - Scan the location you had set #### > The location scan is ignored ### Cause of the issue: During the
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Add a barcode to a different location that WH/Stock - Go to the barcode > Operations > Internal Transfers > New > The header propose to scan a product - Do not scan the product by click on `+ ADD PRODUCT` - Add 1 unit of your favorite product > The header propose to scan a product or a destination location - Scan the location you had set #### > The location scan is ignored ### Cause of the issue: During the `_parseBracode` called to determine what was scanned by the barcode, a location corresponding to the barcode scanned will be found. To use this barcode, if it makes sense, the `_setLocationFromBcode` will be called in turn. However, during internal transfers, this location will only be used as a destination location under very specific conditions: https://github.com/odoo/enterprise/blob/8035abddf9991f6bfb71bb7889b703e5ed31a179/stock_barcode/static/src/models/barcode_picking_model.js#L1603-L1619 And, since we did add the product manually rather than using a scan, in our case, `this.previousScannedLines.lengt` will be null rather than positive so that the location will not be used to set the destination. opw-4201489 Forward-Port-Of: odoo/enterprise#72582 Forward-Port-Of: odoo/enterprise#72283
Version: 17.0+ Issue: In the Deferred Expense Report, there is a missing check for if the `period_end` is before the `period_start` for when the deferred method is 'day'. If the `period_end` is in the same month as selected month of the report, the later column will compute the amount to be negative of the `amount_per_day` times the difference of days. For example, if the end date is 2024-11-04 and we look at the month of November, the later column will display the negative amount of 26
Original PR description
Version: 17.0+ Issue: In the Deferred Expense Report, there is a missing check for if the `period_end` is before the `period_start` for when the deferred method is 'day'. If the `period_end` is in the same month as selected month of the report, the later column will compute the amount to be negative of the `amount_per_day` times the difference of days. For example, if the end date is 2024-11-04 and we look at the month of November, the later column will display the negative amount of 26 days. In this example the amount is expected to be 0. Purpose of this PR: To add an additional condition, if the `period_end` is before the `period_start` then the amount should be 0. opw-4231549 Forward-Port-Of: odoo/enterprise#72644