Friday, December 6, 2024
36 changes · saas-17.2
Resolved issues and error corrections
The project burndown chart now correctly applies open and closed task filters. This ensures teams can accurately review task progress without missing expected results in project reports.
Original PR description
Steps to reproduce: - open burndown chart of any project - add open/closed task filter Issue: - filters don't return anything in the burndown chart even though project contains open/closed tasks Sol: - add correct domain in open/closed task filter task-4295668
Miscellaneous changes
Versions -------- - 16.0+ Steps ----- 1. Create a rental order; 2. cancel said rental order; 3. go to Schedule; 4. change search to show all rental orders; 5. hover over cancelled rental order. Issue ----- It's still showing its status as 'reserved'. Cause ----- The `report_line_status` field assumes any line that isn't picked up or returned is reserved. Solution -------- If the order's state is `cancel`, display the report line as "Cancelled". opw-4342420 Forward-P
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Create a rental order; 2. cancel said rental order; 3. go to Schedule; 4. change search to show all rental orders; 5. hover over cancelled rental order. Issue ----- It's still showing its status as 'reserved'. Cause ----- The `report_line_status` field assumes any line that isn't picked up or returned is reserved. Solution -------- If the order's state is `cancel`, display the report line as "Cancelled". opw-4342420 Forward-Port-Of: odoo/enterprise#75245 Forward-Port-Of: odoo/enterprise#75066
Steps to reproduce: 1. Have a VAT number (or company registry) with dots (e.g.: BE1234.678.28) 2. Import a valid SODA file with the same VAT number 3. Error: "The imported document doesn't seem to correspond to this company's VAT number nor company id" Why it happens: This happens because the regex was taking only the first matching group (1234 in the example above). Solution: Instead of searching the first group of the regex, we can subtract all chars and only keep digits to have a v
Original PR description
Steps to reproduce: 1. Have a VAT number (or company registry) with dots (e.g.: BE1234.678.28) 2. Import a valid SODA file with the same VAT number 3. Error: "The imported document doesn't seem to correspond to this company's VAT number nor company id" Why it happens: This happens because the regex was taking only the first matching group (1234 in the example above). Solution: Instead of searching the first group of the regex, we can subtract all chars and only keep digits to have a valid Belgian VAT number that can be used when checking correspondence between the company VAT and the imported SODA file VAT. opw 4347926 Forward-Port-Of: odoo/enterprise#75111
The tax report (KMD report) and annex to the tax report (KMD INF report) for Estonia needed to be reworked to correct errors and fix rounding issues. With this commit, the tax report: 1. Adds the balance_from_tags to allow auditing the report lines, since only aggregation was used before. 2. Fixes rounding issues by using the integer_rounding feature and adding rounding differences to the VAT closing entry. This commit also rewrites the KMD INF report. It creates one report composed of t
Original PR description
The tax report (KMD report) and annex to the tax report (KMD INF report) for Estonia needed to be reworked to correct errors and fix rounding issues. With this commit, the tax report: 1. Adds the…
The tax report (KMD report) and annex to the tax report (KMD INF report) for Estonia needed to be reworked to correct errors and fix rounding issues. With this commit, the tax report: 1. Adds the balance_from_tags to allow auditing the report lines, since only aggregation was used before. 2. Fixes rounding issues by using the integer_rounding feature and adding rounding differences to the VAT closing entry. This commit also rewrites the KMD INF report. It creates one report composed of two sections with different columns, using the custom engine to construct both parts. Part A contains information on invoices issued, grouped by move_id and id, to allow showing multiple lines per invoice when different tax rates or special tax types are in one invoice. It only includes invoices with taxable supply at 22%, 20%, 9% and 5%. It excludes invoices of partners whose Tax ID is / and foreigner partners who have a Tax ID not starting by EE. Part B contains information on invoices received, grouped by move_id. Each line showcases information about one invoice with taxable supply at 22%, 20%, 9% and 5%. It relies on a Tax ID starting with EE. The reports follow the guidelines available in https://www.emta.ee/en/business-client/taxes-and-payment/tax-returns-exchange-information/vat-return-forms-vd-and-vdp (forms valid from 01.01.2024 onwards). task-3997203 Forward-Port-Of: odoo/enterprise#70371
useEffect hook on pdf_manager generates file urls from documents ids, before this commit documents comming from activity view didn't have id key set. Reproduce --- - install document - open documents activity view, schedule an activity with a document (that is possible to split) - attempt to split the document -> Traceback opw-4163726 Forward-Port-Of: odoo/enterprise#70531
Original PR description
useEffect hook on pdf_manager generates file urls from documents ids, before this commit documents comming from activity view didn't have id key set. Reproduce --- - install document - open documents activity view, schedule an activity with a document (that is possible to split) - attempt to split the document -> Traceback opw-4163726 Forward-Port-Of: odoo/enterprise#70531
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from th
Original PR description
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string >…
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from the search bar: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L685 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/views/product_views.xml#L78 This trick is notably used in order to take the warehouse into account in the computation of the various quantity fields associated to products by generating custom location domains: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L136-L137 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L250-L255 However, since that context key was added via the search bar, it type might be: a string, an integerId or a list of either/both other types. (E.g. to create a list of a string and integer type and select a string and then type a string allowing you to find a real warehouse id that you can select after clicking on the dropdown arrow). Therefore, in order to be properly used, this context key needs to be parsed to be used properly as done in the `_get_domain_locations` for instance. However, the `warehouse` context key is used at many other places in the code, each time expecting a single integer id, and since the warehouse context key is not cleaned from one action to an other you are technically able to provide a string where the code is expecting a an integer. ### Fix: The proper fix of this use case would be to change the context key name used by the search view to only match flows expecting such a context. However, this change is not stable as it requires to modify a view and hence can't be applied before master (18.1). As such, in prior versions, we add a context parser for to extract a single integer id from the `warehouse` context key where it is used but unexpected to match something else. ### Note: This patch will improve other fixes and hopefully prevent yet unoticed error raised by this issue: 903d8beeea5d332e556ef81e231a3b8b4c51cd45 and afa7c6bf25c9de5fc0c878faa29e1cc35bc11805 Community: https://github.com/odoo/odoo/pull/187808 opw-4290818 X-original-commit: 856409a1fb35c6c49fe4c404931587a95d99d370 Forward-Port-Of: odoo/enterprise#74188
Steps to reproduce the bug: - Create a storable product “P1.” - Set up a quality point: - Control Per: By operation - Operation: Receipts - Product: P1 - Create a receipt for two units of P1. - Mark the receipt as "To Do." - Click on "Quality Check" → Fail. - Click on action → Scrap: - Scrap 1 unit of P1. - Confirm. Problem: A quality check is created for the scrapped move. This should not happen. opw-4345679 Forward-Port-Of: odoo/enterprise#75160
Original PR description
Steps to reproduce the bug: - Create a storable product “P1.” - Set up a quality point: - Control Per: By operation - Operation: Receipts - Product: P1 - Create a receipt for two units of P1. - Mark the receipt as "To Do." - Click on "Quality Check" → Fail. - Click on action → Scrap: - Scrap 1 unit of P1. - Confirm. Problem: A quality check is created for the scrapped move. This should not happen. opw-4345679 Forward-Port-Of: odoo/enterprise#75160
Add check if date string is not equal to "000000" before parsing it, in record types that were missing this check. Some banks provide CODA files with the date set to "000000" which caused the `_parse_bank_statement_file` method to raise an exception and fail to parse such files. Using the `statement['date']` as a fallback in such case, as it is already used for `balance_start_date` and `transactionDate` fields. task-4348031 Forward-Port-Of: odoo/enterprise#74640
Original PR description
Add check if date string is not equal to "000000" before parsing it, in record types that were missing this check. Some banks provide CODA files with the date set to "000000" which caused the `_parse_bank_statement_file` method to raise an exception and fail to parse such files. Using the `statement['date']` as a fallback in such case, as it is already used for `balance_start_date` and `transactionDate` fields. task-4348031 Forward-Port-Of: odoo/enterprise#74640
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings - Create one (or more) analytic account(s) with very long names - Open either "Balance Sheet" or "Profit and Loss" reporting - Do an "Analytic Group By" with the created account(s) - Print the PDF Cause: The default style in the associated scss file does not use wrapping. https://github.co
Original PR description
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings -…
Issue: When printing PDF reports, long account names cause the report to overflow out of the page. Steps to reproduce: - Install the accounting app - Enable "Analytic Accounting" in the settings - Create one (or more) analytic account(s) with very long names - Open either "Balance Sheet" or "Profit and Loss" reporting - Do an "Analytic Group By" with the created account(s) - Print the PDF Cause: The default style in the associated scss file does not use wrapping. https://github.com/odoo/enterprise/blob/bf6c64b8fd5591f271e9b0f18f40d205a64cd5bd/account_reports/static/src/scss/account_pdf_export_template.scss#L41 Solution: Override the default style by using the "o_overflow_name" class. This is the class already used for handling overflow in the tables' content lines. This gives a more readable result than just editing the "white-space" field (see below for comparison). The proposed solution gives the following result:  As opposed to just editing to "white-space: wrap;"  Ticket: opw-4277596 Forward-Port-Of: odoo/enterprise#73761
## Steps to reproduce the issue 1. Activate Mexican Localization 2. In Mexican Company, create two Invoices with one product line: - Price Unit of 3.47, 16% Tax - Activate CFDI to Public 3. Select both Invoices and create Global Invoice ("Actions" drop menu) 4. Check the CFDI tab in one of the Invoices 5. One of those errors pops up depending on your rounding method: #### Round per line: > Code : 301 > Message : Error de validaciones adicionales [Error #CFDI40108] E
Original PR description
## Steps to reproduce the issue 1. Activate Mexican Localization 2. In Mexican Company, create two Invoices with one product line: - Price Unit of 3.47, 16% Tax - Activate CFDI to Public 3. Select…
## Steps to reproduce the issue
1. Activate Mexican Localization
2. In Mexican Company, create two Invoices with one product line:
- Price Unit of 3.47, 16% Tax
- Activate CFDI to Public
3. Select both Invoices and create Global Invoice ("Actions" drop menu)
4. Check the CFDI tab in one of the Invoices
5. One of those errors pops up depending on your rounding method:
#### Round per line:
> Code : 301
> Message : Error de validaciones adicionales [Error #CFDI40108] El TipoDeComprobante es I,E o N, el importe registrado en el campo no es igual al redondeo de la suma de los importes de los conceptos registrados. Folio: 2. Serie: GINV/. El valor del atributo SubTotal (6.95) no coincide con la suma de los importes (3.47 + 3.47 = 6.94)
#### Round globally:
> Code : CFDI40205
> Message : El valor del campo TotalImpuestosTrasladados no es igual a la suma de los importes registrados en el elemento hijo Traslado.
## Explanation
#### Round per line:
With commit odoo/enterprise@933864a38af21a70b219d2824c64fff488acb15f, base and tax amounts were tweaked in order to satisfy some CFDI constraints. This change calculates amounts in an incorrect order: instead of calculating `tax_amount` with the formula `base_amount * tax_rate`, it calculates the base using `total / (1 + tax_rate)` then subtracts the base from the total to obtain the tax amount.
In our example, with a total of `6.94 + 1.12 = 8.06`, the base is calculated as such: `8.06 / 1.16 = 6.94827586207`, rounded to `6.95`, and the tax as such : `8.06 - 6.95 = 1.11`. The difference between the tweaked base `6.95` and the addition of the base of all invoice lines `3.47 + 3.47 = 6.94` is not accepted.
#### Round globally:
During a Global Invoice creation, we will first calculate the values of the Invoices separately. During this calculation, `total_impuestos_trasladados` is rounded with `precision_digits=2` while values in `traslados_list` are rounded with `precision_digits=6`. https://github.com/odoo/enterprise/blob/800378bfd3fe198647c9b418def3bd36066d9cd7/l10n_mx_edi/models/l10n_mx_edi_document.py#L583-L590 https://github.com/odoo/enterprise/blob/800378bfd3fe198647c9b418def3bd36066d9cd7/l10n_mx_edi/models/l10n_mx_edi_document.py#L950-L961 https://github.com/odoo/enterprise/blob/800378bfd3fe198647c9b418def3bd36066d9cd7/l10n_mx_edi/models/l10n_mx_edi_document.py#L963-L964 https://github.com/odoo/enterprise/blob/800378bfd3fe198647c9b418def3bd36066d9cd7/l10n_mx_edi/models/l10n_mx_edi_document.py#L1000-L1001
In the example, `3.47 * 0.16 = 0.552`, is rounded to `0.56`. The addition of every rounded value gives `1.12` or `1.110400`, which gives the difference between `total_traslados_impuestos` and `traslados_list`.
## Fix reasoning
#### Round per line:
We will add a hack in `_get_post_fix_tax_amount_map`: CFDI accepts a difference of `1e-<precision_digits>`, which means that `precision_digits=2` would allow a difference of `0.01`. If the difference is lower, we will not perform the operation and only round the values.
In our example, the obtained tax amount is `1.12` and the expected tax amount `6.94 * 0.16 = 1.1104`. The difference between the two is lower than `0.01` and is accepted by the CFDI.
#### Round globally:
We will use the calculated values in `_get_global_invoice_cfdi_values` to compute the total price and totals of taxes at the end of the method instead of using the rounded values received from `cfdi_values_list` at the start.
opw-4085403
Forward-Port-Of: odoo/enterprise#72341The Profit&Loss and Balance Sheet have now a "Note" column, that contains a code that will help cross reference the Note Report (currently not implemented in odoo). Also, "Gross" and "Depreciation" columns are added to the Balance Sheet. Community PR: https://github.com/odoo/odoo/pull/163380 task-3848455 Forward-Port-Of: odoo/enterprise#61473
Original PR description
The Profit&Loss and Balance Sheet have now a "Note" column, that contains a code that will help cross reference the Note Report (currently not implemented in odoo). Also, "Gross" and "Depreciation" columns are added to the Balance Sheet. Community PR: https://github.com/odoo/odoo/pull/163380 task-3848455 Forward-Port-Of: odoo/enterprise#61473
In a production setup: - Create an invoice and sign it - Ask for a cancellation rejected by the customer => an invoice_request_cancel document is created - Ask for another cancellation request => another invoice_request_cancel document is created - Trigger the SAT to approve the second cancellation request => The first invoice_request_cancel document is unlink. Forward-Port-Of: odoo/enterprise#74753
Original PR description
In a production setup: - Create an invoice and sign it - Ask for a cancellation rejected by the customer => an invoice_request_cancel document is created - Ask for another cancellation request => another invoice_request_cancel document is created - Trigger the SAT to approve the second cancellation request => The first invoice_request_cancel document is unlink. Forward-Port-Of: odoo/enterprise#74753
Versions -------- - 17.0+ Steps ----- 1. Create an appointment type with availability base on resources; 2. have multiple resources to select from; 3. copy share URL; 4. open URL; 5. select a different resource. Issue ----- The resource name in the right column doesn't update to the selected resource. Cause ----- There's no logic in place to update it after selecting a different resource. Solution -------- For user-based appointments, this part isn't shown as long as th
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Create an appointment type with availability base on resources; 2. have multiple resources to select from; 3. copy share URL; 4. open URL; 5. select a different resource. Issue ----- The resource name in the right column doesn't update to the selected resource. Cause ----- There's no logic in place to update it after selecting a different resource. Solution -------- For user-based appointments, this part isn't shown as long as there's multiple options available. Expand this logic to also work for resource-based appointments. Also modify it to now show details on date selection step unless there's only one option to select from (instead of unless pictures should be shown). With `website_appointment`, this is also the case when a separate selection screen was shown beforehand. opw-4355438 Forward-Port-Of: odoo/enterprise#75006
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO for a product and add an operation (no need of component) - Confirm the MO and go to your operation in the shopfloor - Click on the 3 dots > Add component > add any component #### > Back to the MO: No transfer was created from stock to pre-prod ### Cause of the issue: When you add comp
Original PR description
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO…
### Steps to reproduce: - Enable "Multi-Steps Routes" in the settings - Inventory > Configuration > Warehouse Management > Warehouses - Put your warehouse in manufacturing in 2 steps - Create an MO for a product and add an operation (no need of component) - Confirm the MO and go to your operation in the shopfloor - Click on the 3 dots > Add component > add any component #### > Back to the MO: No transfer was created from stock to pre-prod ### Cause of the issue: When you add component from the shopfloor, you will trigger a call of the `add_product` method to create and confirm the raw move associated to the MO: https://github.com/odoo/enterprise/blob/2e2efe8421b2f85950e50ff102cdabf98d2d91ab/mrp_workorder/wizard/additional_product.py#L36-L37 However, if the `procure_method`` of this move is not set to mto/mtso it will not trigger other rules in order to generate the other transfers ### Note: A priori, the issue should not be reproducible in 18.0+ as this part of the code was refactored and the issue was fixed by 235047b68e6a24a14e32b94b1d4a15a580dc5ad2 opw-4236272 Forward-Port-Of: odoo/enterprise#74178
steps to reproduce: - Install documents_account - In Settings -> File centralization -> Activate "Accounting" - Then click on Journals below - Then add Jounal: Vendor Bill, Workspace: Finance - Then upload a file in the app Documents, in the workspace Finance - Select that file and update the partner to Azure Interior - Click on the action "Create Vendor Bill" The partner "Azure Interior" is not set on the created account move while it should. For fixing this adding ``partner_id`` o
Original PR description
steps to reproduce: - Install documents_account - In Settings -> File centralization -> Activate "Accounting" - Then click on Journals below - Then add Jounal: Vendor Bill, Workspace: Finance - Then…
steps to reproduce: - Install documents_account - In Settings -> File centralization -> Activate "Accounting" - Then click on Journals below - Then add Jounal: Vendor Bill, Workspace: Finance - Then upload a file in the app Documents, in the workspace Finance - Select that file and update the partner to Azure Interior - Click on the action "Create Vendor Bill" The partner "Azure Interior" is not set on the created account move while it should. For fixing this adding ``partner_id`` of document if present. Now question may arise why account.move having null partner_id. because it being [set](https://github.com/odoo/enterprise/blob/64fc38a80520cfeeb81c0bb329c6b24c3e9454e1/documents_account/models/documents_workflow_rule.py#L77) after creating [attachment](https://github.com/odoo/enterprise/blob/64fc38a80520cfeeb81c0bb329c6b24c3e9454e1/documents_account/models/documents_workflow_rule.py#L76) and during create attachment ``document.partner_id`` is set to null and issue is raised. opw-4077356 Forward-Port-Of: odoo/enterprise#74875
The issue: Starting with version 17.4, the Odoo banner displaying the invoice name on original bills is only added if the attached PDF uses US Letter paper size and is oriented vertically. How to reproduce the issue: -Upload any invoice with a non-standard format -Print -> Original Bills Explanation: Since saas-17.4, the PyPDF2 library version was upgraded from 1.26.0 to 2.12.1. In version 1.26.0, the canvas dimensions were automatically adjusted when merging with non-standard page siz
Original PR description
The issue: Starting with version 17.4, the Odoo banner displaying the invoice name on original bills is only added if the attached PDF uses US Letter paper size and is oriented vertically. How to reproduce the issue: -Upload any invoice with a non-standard format -Print -> Original Bills Explanation: Since saas-17.4, the PyPDF2 library version was upgraded from 1.26.0 to 2.12.1. In version 1.26.0, the canvas dimensions were automatically adjusted when merging with non-standard page sizes. However, in version 2.12.1, this behavior no longer occurs, resulting in the banner not appearing correctly on non-standard formats. opw-4278031 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186947
Commit 1e0183d506d265c978de61e5316e8d35fcbacb05 made sure that child addresses where the commercial fields (vat, company name, ...) are not displayed are considered valid since those fields will be taken from the commercial partner (parent contact). Nevertheless, the code in the argentinian localization doesn't handle the cases where those values are not provided, which led to a traceback being displayed to the customers, which shouldn't ever happen in the ecommerce checkout: > if afip_res
Original PR description
Commit 1e0183d506d265c978de61e5316e8d35fcbacb05 made sure that child addresses where the commercial fields (vat, company name, ...) are not displayed are considered valid since those fields will be taken from the commercial partner (parent contact). Nevertheless, the code in the argentinian localization doesn't handle the cases where those values are not provided, which led to a traceback being displayed to the customers, which shouldn't ever happen in the ecommerce checkout: > if afip_resp.code not in ['5', '9'] and id_type != cuit_id_type 'bool' object has no attribute 'code' This commit skips the validation in case those fields are not given. Either they are required and the main validation ensures they are provided (and they'll be verified by the override), or they are not provided and shouldn't be, in which case the validation can be skipped here. opw-4373610 Fixes #189227 Forward-Port-Of: odoo/odoo#189312
When `location_id` is None in `_get_rule` the line `while locations[-1].location_id` raises an IndexError. This commit fixes that by returning early with an empty recordset of stock.rule in case location_id is None. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188953
Original PR description
When `location_id` is None in `_get_rule` the line `while locations[-1].location_id` raises an IndexError. This commit fixes that by returning early with an empty recordset of stock.rule in case location_id is None. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#188953
For `l10n_cg`, some taxes are unarchived. For `l10n_syscohada`, the type of some accounts is changed from Equity to Current liabilities or Current Asset. A missing account is also added. task-3848455 Forward-Port-Of: odoo/odoo#163380
Original PR description
For `l10n_cg`, some taxes are unarchived. For `l10n_syscohada`, the type of some accounts is changed from Equity to Current liabilities or Current Asset. A missing account is also added. task-3848455 Forward-Port-Of: odoo/odoo#163380
Versions -------- - 16.0+ Steps (18.0+) ------------- 1. Have the `account_tax_python` module installed; 2. define a sales tax using "Custom Formula"; 3. define a formula based on `product.standard_price`; 4. have the tax enabled for products in eCommerce; 5. as a Public User, go to the eCommerce page. Issue ----- > 403: Forbidden Cause ----- Commit de302c2 changed the way company dependent fields are handled. Instead of computing them via `_compute_company_dependent`, they
Original PR description
Versions -------- - 16.0+ Steps (18.0+) ------------- 1. Have the `account_tax_python` module installed; 2. define a sales tax using "Custom Formula"; 3. define a formula based on `product.standard_price`; 4. have the tax enabled for products in eCommerce; 5. as a Public User, go to the eCommerce page. Issue ----- > 403: Forbidden Cause ----- Commit de302c2 changed the way company dependent fields are handled. Instead of computing them via `_compute_company_dependent`, they are now stored in the database. Before this this change, any `groups` restriction added to a field wasn't actually checked. After this change, it does get checked, leading to the 403 error. Solution -------- When computing taxes, use `sudo` to access any required product field. opw-4354321 Forward-Port-Of: odoo/odoo#189378 Forward-Port-Of: odoo/odoo#189186
Versions -------- - 16.0+ Steps ----- 1. Activate a second language; 2. create a new quotation template; 3. add a note & save change; 4. add a translation for the note & save change; 5. create a new sales order; 6. select the created quotation template; 7. set customer to a partner using the second language. Issue ----- The note is still displayed in English. Cause ----- The translation is saved on the `sale.order.template.line` model, so it has to get fetched from there.
Original PR description
Versions -------- - 16.0+ Steps ----- 1. Activate a second language; 2. create a new quotation template; 3. add a note & save change; 4. add a translation for the note & save change; 5. create a new sales order; 6. select the created quotation template; 7. set customer to a partner using the second language. Issue ----- The note is still displayed in English. Cause ----- The translation is saved on the `sale.order.template.line` model, so it has to get fetched from there. Currently there is no logic in place to do this when changing the customer. Solution -------- Add an `onchange` method which reloads the template if no lines were added or removed. opw-4260006 Forward-Port-Of: odoo/odoo#188038
Since [1], the `tel://` protocol was adopted instead of `tel:`. However, URIs cannot contain space characters, which can lead to invalid URIs in certain cases. Steps to reproduce: - Open the website editor. - Attempt to edit the phone number in the header. - The URI becomes invalid due to the presence of a space character. This commit resolves the issue by removing space characters from the URI, ensuring it remains valid. [1]: https://github.com/odoo/odoo/commit/6d4a3b3ab5c0f3
Original PR description
Since [1], the `tel://` protocol was adopted instead of `tel:`. However, URIs cannot contain space characters, which can lead to invalid URIs in certain cases.
Steps to reproduce:
- Open the website editor.
- Attempt to edit the phone number in the header.
- The URI becomes invalid due to the presence of a space character.
This commit resolves the issue by removing space characters from the URI, ensuring it remains valid.
[1]:
https://github.com/odoo/odoo/commit/6d4a3b3ab5c0f3361d1d681d05b974e295dcbabe
opw-4354614
Forward-Port-Of: odoo/odoo#188964Version: - 17.0 Steps to reproduce: - Click on the Connect button, which redirects to the authentication wizard. - On the authorization page, click on the Cancel button. issue: - Clicking on the Cancel button does not return an authorization code, causing a traceback error. solution: - Added a condition to handle the Cancel action. If the user clicks Cancel, redirect to the provider form view without causing an error. opw-4377802 Forward-Port-Of: odoo/odoo#189526
Original PR description
Version: - 17.0 Steps to reproduce: - Click on the Connect button, which redirects to the authentication wizard. - On the authorization page, click on the Cancel button. issue: - Clicking on the Cancel button does not return an authorization code, causing a traceback error. solution: - Added a condition to handle the Cancel action. If the user clicks Cancel, redirect to the provider form view without causing an error. opw-4377802 Forward-Port-Of: odoo/odoo#189526
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from th
Original PR description
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string >…
### Steps to reproduce: - Inventory > Configuration > Warehouse Management > Warehouses - Create a second warehouse - Go to Inventory > Products > Products - In the search bar type `foo` string > Search Warehouse for `foo` - Click on any product Kandan record - Click on the Forecast smart button of the product #### > Traceback ### Cause of the issue: Thanks to the dummy `warehouse_id` field of the `product.template` model a `warehouse` context key can be set in the context from the search bar: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L685 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/views/product_views.xml#L78 This trick is notably used in order to take the warehouse into account in the computation of the various quantity fields associated to products by generating custom location domains: https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L136-L137 https://github.com/odoo/odoo/blob/a72763acfc4d83ae2aadad2e807547c5b1819002/addons/stock/models/product.py#L250-L255 However, since that context key was added via the search bar, it type might be: a string, an integerId or a list of either/both other types. (E.g. to create a list of a string and integer type and select a string and then type a string allowing you to find a real warehouse id that you can select after clicking on the dropdown arrow). Therefore, in order to be properly used, this context key needs to be parsed to be used properly as done in the `_get_domain_locations` for instance. However, the `warehouse` context key is used at many other places in the code, each time expecting a single integer id, and since the warehouse context key is not cleaned from one action to an other you are technically able to provide a string where the code is expecting a an integer. ### Fix: The proper fix of this use case would be to change the context key name used by the search view to only match flows expecting such a context. However, this change is not stable as it requires to modify a view and hence can't be applied before master (18.1). As such, in prior versions, we add a context parser for to extract a single integer id from the `warehouse` context key where it is used but unexpected to match something else. ### Note: This patch will improve other fixes and hopefully prevent yet unoticed error raised by this issue: 903d8beeea5d332e556ef81e231a3b8b4c51cd45 and afa7c6bf25c9de5fc0c878faa29e1cc35bc11805 opw-4290818 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187808 Forward-Port-Of: odoo/odoo#187413
Steps to reproduce: - Enable 'Reception Report' in Inventory Configuration - Make an outgoing shipment for a storable product - Make an incoming shipment for that same product - Open the allocation report - Reload the page Issue: The context is lost when reloading the page, meaning that we lose the the `default_picking_ids`/`default_production_ids` in the context, making it unable to open the report. To avoid this, we add the key and values to the router (and thus the URL) so it can
Original PR description
Steps to reproduce: - Enable 'Reception Report' in Inventory Configuration - Make an outgoing shipment for a storable product - Make an incoming shipment for that same product - Open the allocation report - Reload the page Issue: The context is lost when reloading the page, meaning that we lose the the `default_picking_ids`/`default_production_ids` in the context, making it unable to open the report. To avoid this, we add the key and values to the router (and thus the URL) so it can be properly picked up when reloading the report. opw-4321072 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189694 Forward-Port-Of: odoo/odoo#189560
In some business case when the invoice is done before the receipt, the `stock.valuation.layer` currency rate will be taken on the bill rather than the current date. To reproduce the issue: (Need account_accountant) 1. Create a product category PC - Costing method: FIFO - Inventory valuation: Automated 2. Create a product P - Type: Storable - Category: PC 3. On 10/11/2024, confirm a PO with 1 x P at Є10 4. On 11/11/2024, bill it with currency rate of 1.06 at $10.6 4. On 1
Original PR description
In some business case when the invoice is done before the receipt, the `stock.valuation.layer` currency rate will be taken on the bill rather than the current date. To reproduce the issue: (Need account_accountant) 1. Create a product category PC - Costing method: FIFO - Inventory valuation: Automated 2. Create a product P - Type: Storable - Category: PC 3. On 10/11/2024, confirm a PO with 1 x P at Є10 4. On 11/11/2024, bill it with currency rate of 1.06 at $10.6 4. On 12/11/2024, receive P with currency rate of 1.07 at $10.7 Errors: The price SVL is different from the bill Solution: Use currency rate at bill date rather than the current date when invoice before receipt --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189210 Forward-Port-Of: odoo/odoo#187015
The tax report (KMD report) and annex to the tax report (KMD INF report) for Estonia needed to be reworked to correct errors and fix rounding issues. In this commit, the 'balance_from_tags' label is added to the tax report, allowing a better audit of the report lines. Furthermore, the tax tags are edited to differentiate between tax and base tax lines. These changes are necessary to improve auditing of the tax report lines. task-3997203 --- I confirm I have signed the CLA and read t
Original PR description
The tax report (KMD report) and annex to the tax report (KMD INF report) for Estonia needed to be reworked to correct errors and fix rounding issues. In this commit, the 'balance_from_tags' label is added to the tax report, allowing a better audit of the report lines. Furthermore, the tax tags are edited to differentiate between tax and base tax lines. These changes are necessary to improve auditing of the tax report lines. task-3997203 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#180856
This commit fixes the wrong use of the contenteditable attribute inside the useSpellcheck implementation. Now, the isContentEditable attribute is used to find the right element. A test has been added too, using the contenteditable='true' attribute. Forward-Port-Of: odoo/odoo#189728
Original PR description
This commit fixes the wrong use of the contenteditable attribute inside the useSpellcheck implementation. Now, the isContentEditable attribute is used to find the right element. A test has been added too, using the contenteditable='true' attribute. Forward-Port-Of: odoo/odoo#189728
**Current behavior:** Having a manufactured product with components, all with 'average' costing, a series of receiptions for the components at difference price points, followed by an MO, followed by another reception at (again) a new price point will result in an imbalanced "Cost of Production" journal if the aforementioned MO is unbuilt. **Expected behavior:** The unbuild operation doesn't leave the journal imbalanced. **Steps to reproduce:** 1. Create a stored product with averag
Original PR description
**Current behavior:** Having a manufactured product with components, all with 'average' costing, a series of receiptions for the components at difference price points, followed by an MO, followed by…
**Current behavior:** Having a manufactured product with components, all with 'average' costing, a series of receiptions for the components at difference price points, followed by an MO, followed by another reception at (again) a new price point will result in an imbalanced "Cost of Production" journal if the aforementioned MO is unbuilt. **Expected behavior:** The unbuild operation doesn't leave the journal imbalanced. **Steps to reproduce:** 1. Create a stored product with average, real_time costing 2. Create a BoM for this product, with 2 stored components (also with average, real_time costing) 3. Create a PO for the components (price is arbitrary), confirm and receive the product 4. Create another PO for the components with a different price from the previous PO, confirm and receive 5. Create an MO for the final product, confirm and consume/produce all 6. Create a final PO for the components with prices different from the previous two orders, confirm and receive 7. Create a second MO for the final product and confirm/consume/produce-all 8. Unbuild the MO from step 5 -> in the "Cost of Production" journal, observe that there is an outstanding balance **Cause of the issue:** When the unbuild operation happens, the current price of the final product informs the SVL's `value` and `unit_price` fields- which of course is not the same as when the MO was completed. We end up with a `unit_price` on the SVL for the final product which is not equal to the sum of the component SVLs' `unit_price` which leads to the generation of account move lines that won't be balanced. **Fix:** During an ubuild operation, stock moves for finished products which may have this issue (i.e., have non-standard costing) with linked SVL records will use that SVL's unit cost for the unbuild SVL (and ensuing journal entries) as opposed to taking the current cost. opw-4062415 Forward-Port-Of: odoo/odoo#188016
**Steps to reproduce:** - Install Accounting and l10n_de - Switch to a German company - Configure the customer invoice journal to enable "XRechnung UBL (Germany)" - Create a German contact: * with a complete address * with an email address * without a VAT number - Create an invoice for the created contact - Confirm the invoice - Generate the electronic invoice - Validate the generated XML on an online XRechnung ValidationError **Issue:** The XRechnung (UBL Invoice) is not va
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_de - Switch to a German company - Configure the customer invoice journal to enable "XRechnung UBL (Germany)" - Create a German contact: * with a…
**Steps to reproduce:** - Install Accounting and l10n_de - Switch to a German company - Configure the customer invoice journal to enable "XRechnung UBL (Germany)" - Create a German contact: * with a complete address * with an email address * without a VAT number - Create an invoice for the created contact - Confirm the invoice - Generate the electronic invoice - Validate the generated XML on an online XRechnung ValidationError **Issue:** The XRechnung (UBL Invoice) is not valid because the buyer electronic address is missing (cbc:EndpointID). **Cause:** `<cbc:EndpointID>` gets its value from contact's VAT, but the contact has no VAT. **Solution:** Since XRechnung 3.0.1, the email address can be used as electronic address with "EM" as schemeID. So, fallback on email address if contact has no VAT. **Reference:** https://www.e-rechnung-bund.de/standard-xrechnung-3-0-1/ https://blog.seeburger.com/xrechnung-version-3-0-1-comes-into-force-on-february-1-2024/ https://erechnungsvalidator.service-bw.de/ opw-4261026 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#189183
The DIN 5008 layout was not properly addressing reports on invoices and delivery slips. On invoices/pro-forma, the reports were not addressed to the correct partners (commercial partner instead of invoice partner). In the delivery slips the reports were not addressed to the delivery partner. This led to functionally and legally incorrect reports. task-4089521 Forward-Port-Of: odoo/odoo#183775
Original PR description
The DIN 5008 layout was not properly addressing reports on invoices and delivery slips. On invoices/pro-forma, the reports were not addressed to the correct partners (commercial partner instead of invoice partner). In the delivery slips the reports were not addressed to the delivery partner. This led to functionally and legally incorrect reports. task-4089521 Forward-Port-Of: odoo/odoo#183775
Steps to reproduce the bug (only on Safari): - Drag and drop 4-5 "Text" blocks onto the page. - Hide all of them in desktop view by clicking the "Hide on desktop" button for each one. This should create a list of "Invisible Elements" at the bottom of the right panel. - Drag and drop a "Text - Image" block onto the page. - Click the image in the "Text - Image" block. - In the image options, click the "Shape" selector. - Bug: The "Shape" selector is partially hidden behind the "Invisible E
Original PR description
Steps to reproduce the bug (only on Safari): - Drag and drop 4-5 "Text" blocks onto the page. - Hide all of them in desktop view by clicking the "Hide on desktop" button for each one. This should create a list of "Invisible Elements" at the bottom of the right panel. - Drag and drop a "Text - Image" block onto the page. - Click the image in the "Text - Image" block. - In the image options, click the "Shape" selector. - Bug: The "Shape" selector is partially hidden behind the "Invisible Elements" list, and it is not possible to scroll to the bottom of the "shapes" list to access the last shapes. After investigation, we found that the issue comes from the backdrop, which is positioned as sticky behind the shape selector. Since the backdrop isn't needed for the "shape selector" (it covers the entire right panel), we simply disabled it for the "shape selector". opw-4357397 Forward-Port-Of: odoo/odoo#189591
current behaviour: when buggy server action is introduced, we don't handle it well, eg: ``` name = record.name if name != record.partner_id: raise UserError("Datatype") ``` here, comparing `name` and `record.partner_id` doesn't make sense, therefore our ORM default behaviour is to return false and rise `AttributeError`, but the problem occurs when pypdf2 attempts to format the warning message, which rises an error which isn't being handled: ``` File "/home/odoo/.local/lib/python3.
Original PR description
current behaviour: when buggy server action is introduced, we don't handle it well, eg: ``` name = record.name if name != record.partner_id: raise UserError("Datatype") ``` here, comparing `name` and…
current behaviour:
when buggy server action is introduced, we don't handle it well, eg:
```
name = record.name
if name != record.partner_id:
raise UserError("Datatype")
```
here, comparing `name` and `record.partner_id` doesn't make sense, therefore our ORM default behaviour is to return false and rise `AttributeError`, but the problem occurs when pypdf2 attempts to format the warning message, which rises an error which isn't being handled:
```
File "/home/odoo/.local/lib/python3.10/site-packages/PyPDF2/pdf.py", line 1069, in _showwarning
file.write(formatWarning(message, category, filename, lineno, line))
File "/home/odoo/.local/lib/python3.10/site-packages/PyPDF2/utils.py", line 69, in formatWarning
file = filename.replace("/", "\\").rsplit("\\", 1)[1] # find the file name
IndexError: list index out of range
```
it is problematic since it is server action.
expected behaviour:
Even when buggy code is introduced, comparision should return False and error should be handled well.
steps to reproduce:
1) Create new database from scratch and create server action with the buggy code above, set model to `sale.orde` and add it to `contextual action`
2) Go to any `sale.order` record and trigger the action. 3) it outputs the error.
4) please note that, if you restart the server, error doesn't happen, because places where override happens doesn't get invoked.
task-4365106
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#189688Versions -------- - 16.0+ Steps (18.0+) ------------- 1. Enable credit limits via Accounting settings; 2. log in as a user with access to Sales but not Accounting; 3. create a Sales Order; 4. add a product. Issue ----- Access Error. Cause ----- Commit de302c2 changed the way company dependent fields are handled. Instead of computing them via `_compute_company_dependent`, they are now stored in the database. Before this this change, any `groups` restriction added to a field
Original PR description
Versions -------- - 16.0+ Steps (18.0+) ------------- 1. Enable credit limits via Accounting settings; 2. log in as a user with access to Sales but not Accounting; 3. create a Sales Order; 4. add a product. Issue ----- Access Error. Cause ----- Commit de302c2 changed the way company dependent fields are handled. Instead of computing them via `_compute_company_dependent`, they are now stored in the database. Before this this change, any `groups` restriction added to a field wasn't actually checked. After this change, it does get checked, leading to the access error. Solution -------- 1. Use `sudo` to access `partner_id.credit`. 2. When calling the `_build_credit_warning_message`, pass the sales order with `sudo`. opw-4367393 Forward-Port-Of: odoo/odoo#189803 Forward-Port-Of: odoo/odoo#189209
[FIX] base: interval_type is required Steps: - Install CRM - Open Settings/CRM - "Rule-Based Assignment" is disabled - Go to open the scheduled action: "CRM: Lead Assignment" - No interval type defined - Enable it Other steps: - Install CRM - Open Settings/CRM - Enable "Rule-Based Assignment" Repeatedly - Go to open the scheduled action: "CRM: Lead Assignment" - Change the interval to nothing Actual result: - Scheduled actions will not run anymore (cron) - KeyEr
Original PR description
[FIX] base: interval_type is required
Steps:
- Install CRM
- Open Settings/CRM
- "Rule-Based Assignment" is disabled
- Go to open the scheduled action: "CRM: Lead Assignment"
- No interval type defined
- Enable it
Other steps:
- Install CRM
- Open Settings/CRM
- Enable "Rule-Based Assignment" Repeatedly
- Go to open the scheduled action: "CRM: Lead Assignment"
- Change the interval to nothing
Actual result:
- Scheduled actions will not run anymore (cron)
- KeyError: None
- `interval = _intervalTypes[job['interval_type']](job['interval_number'])`
Expected result:
- You cannot enable a scheduled action without an interval_type defined
opw-4370139
opw-4318230
Forward-Port-Of: odoo/odoo#189684Before this fix: As the default log level if set to INFO, having a 400 on mercado pago notification log does not help to further investigate the case After this fix: Unusual situatution logs that were in debug level were increased to WARNING level instead to be by default in logs files opw-4349957 Forward-Port-Of: odoo/odoo#189894
Original PR description
Before this fix: As the default log level if set to INFO, having a 400 on mercado pago notification log does not help to further investigate the case After this fix: Unusual situatution logs that were in debug level were increased to WARNING level instead to be by default in logs files opw-4349957 Forward-Port-Of: odoo/odoo#189894