Tuesday, April 9, 2024
28 changes · saas-17.1
Resolved issues and error corrections
When planning a new task from the Gantt view without the Timesheets app installed, allocated hours were not being calculated automatically. This fix ensures planned task hours are computed as expected, improving scheduling accuracy for project users.
Original PR description
Before this commit, when project_enterprise is installed and not Timesheets app and the user tries to plan a new task via the gantt view. The allocated hours for this new task is not automatically computed during the onchange since the allocated hours field is only defined in the form view when `hr_timesheet` module is installed. This commit adds the allocated hours in invisible in the form view used by the gantt view to be sure the onchange will be called when the planned dates are set in the form view of the gantt view. runbot-58033
Miscellaneous changes
When a register payment is made with a writeoff in foreign currency and when the user set manually an exchange difference account, don't create a write-off. Instead, 2 cases to consider: - When the payment is expressed in a foreign currency different than the invoice's one, play with the rate between amount_currency and balance and let odoo making an exchange difference accordingly. That way, the payment has no write-off and the invoice is fully paid. - When the payment is expressed in co
Original PR description
When a register payment is made with a writeoff in foreign currency and when the user set manually an exchange difference account, don't create a write-off. Instead, 2 cases to consider: - When the payment is expressed in a foreign currency different than the invoice's one, play with the rate between amount_currency and balance and let odoo making an exchange difference accordingly. That way, the payment has no write-off and the invoice is fully paid. - When the payment is expressed in company currency but the invoice has a foreign currency, force the exchange difference to use a rate that will fully paid the invoice without creating any write-off line on the payment. task_id: 3717436 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#157398
Fix various "Using variable xxx before assignment". It was not detected by pylint <= 2.5.0 which was the version enforced on runbot. ``` AssertionError: pylint test failed: ************* Module odoo.addons.base.tests.test_qweb Using variable 'error_msg' before assignment (E0601) at odoo/odoo/addons/base/tests/test_qweb.py:667 ************* Module odoo.tests.common Using variable 'message' before assignment (E0601) at odoo/odoo/tests/common.py:1137 ************* Module addons.fetchmail.m
Original PR description
Fix various "Using variable xxx before assignment". It was not detected by pylint <= 2.5.0 which was the version enforced on runbot. ``` AssertionError: pylint test failed: ************* Module…
Fix various "Using variable xxx before assignment". It was not detected by pylint <= 2.5.0 which was the version enforced on runbot. ``` AssertionError: pylint test failed: ************* Module odoo.addons.base.tests.test_qweb Using variable 'error_msg' before assignment (E0601) at odoo/odoo/addons/base/tests/test_qweb.py:667 ************* Module odoo.tests.common Using variable 'message' before assignment (E0601) at odoo/odoo/tests/common.py:1137 ************* Module addons.fetchmail.models.fetchmail Using variable 'connection' before assignment (E0601) at odoo/addons/fetchmail/models/fetchmail.py:155 ************* Module addons.hw_escpos.controllers.main Using variable 'escpos' before assignment (E0601) at odoo/addons/hw_escpos/controllers/main.py:147 Using variable 'error' before assignment (E0601) at odoo/addons/hw_escpos/controllers/main.py:190 ************* Module addons.account.models.account_reconcile_model Using variable 'current_regex' before assignment (E0601) at odoo/addons/account/models/account_reconcile_model.py:35 ************* Module addons.point_of_sale.models.pos_session Using variable 'balance' before assignment (E0601) at odoo/addons/point_of_sale/models/pos_session.py:358 ``` Forward-Port-Of: odoo/odoo#161051 Forward-Port-Of: odoo/odoo#160886
This commit fixes the 'og:site_name' metadata, which previously defaulted to the company name (see [1]), causing issues for multi-site setups. Now, the metadata actually uses the site name. Steps to reproduce: - Navigate to any page - Right-click and select "View Page Source" - In the <head> section, observe the meta property "og:site_name" set to "MyCompany". [1]: https://github.com/odoo/odoo/commit/156955de6b4e6288ac606d29b843081842154eff opw-3791082 Forward-Port-Of: odoo/odoo#1
Original PR description
This commit fixes the 'og:site_name' metadata, which previously defaulted to the company name (see [1]), causing issues for multi-site setups. Now, the metadata actually uses the site name. Steps to reproduce: - Navigate to any page - Right-click and select "View Page Source" - In the <head> section, observe the meta property "og:site_name" set to "MyCompany". [1]: https://github.com/odoo/odoo/commit/156955de6b4e6288ac606d29b843081842154eff opw-3791082 Forward-Port-Of: odoo/odoo#160454
To reproduce the issue: -Drag and drop the rating snippet. -Change the score from options. -Notice that spaces between icons disappear. Specification: In the release notes[[1]]( https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/) of jQuery 3.5.0, it's stated that security fixes related to the HTML parser were implemented. Consequently, self-closing e.g. `<i/>` tags inside function arguments were replaced with e.g. `<i></i>`. As a result, trailing spaces lost significance, causi
Original PR description
To reproduce the issue: -Drag and drop the rating snippet. -Change the score from options. -Notice that spaces between icons disappear. Specification: In the release notes[[1]](…
To reproduce the issue: -Drag and drop the rating snippet. -Change the score from options. -Notice that spaces between icons disappear. Specification: In the release notes[[1]]( https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/) of jQuery 3.5.0, it's stated that security fixes related to the HTML parser were implemented. Consequently, self-closing e.g. `<i/>` tags inside function arguments were replaced with e.g. `<i></i>`. As a result, trailing spaces lost significance, causing icons to stick together. Prior to Odoo 16.2, jQuery 3.3.1 was utilized, which allowed the use of self-closing tags in the append function. This behavior was as expected.However, starting from Odoo 16.2, jQuery version 3.6.3 was adopted. After this PR: Instead of using self-closing `<i/>` tags, `<i></i> ` with a trailing space was used. This trailing space gained significance due to the prefilter no longer ignoring it. Consequently, icons no longer stick together after changing the score. task-3576760 Forward-Port-Of: odoo/odoo#160061
In Spain, "Cooperativas" have their own variant of the Spanish chart of accounts. In order to support these businesses, we add two extra CoA templates: Cooperatives - SMEs and Cooperatives - Complete. [task-3803050](https://www.odoo.com/web#id=3803050&cids=1&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159357
Original PR description
In Spain, "Cooperativas" have their own variant of the Spanish chart of accounts. In order to support these businesses, we add two extra CoA templates: Cooperatives - SMEs and Cooperatives - Complete. [task-3803050](https://www.odoo.com/web#id=3803050&cids=1&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159357
Steps to reproduce: - Confirm an SO with a storable product - in barcode app open the created picking - Scan a different product confirm the picking and create a backorder Bug: the new product is not added to the SO and the original picking isn't linked the SO anymore Fix: when new moves are created in the inventory app default_picking_id is set in the context and is used in _default_group_id to set the group set the context key during the write to ensure moves are created with the
Original PR description
Steps to reproduce: - Confirm an SO with a storable product - in barcode app open the created picking - Scan a different product confirm the picking and create a backorder Bug: the new product is not added to the SO and the original picking isn't linked the SO anymore Fix: when new moves are created in the inventory app default_picking_id is set in the context and is used in _default_group_id to set the group set the context key during the write to ensure moves are created with the correct group test: https://github.com/odoo/enterprise/pull/57408 opw-3644773 Forward-Port-Of: odoo/odoo#160812 Forward-Port-Of: odoo/odoo#157255
Resolves an issue with Afterpay via Stripe not receiving correct shipping address details, causing transaction failures. Now, ensures shipping address from the order or invoice is accurately sent to Stripe if we have it. backport of this PR: #157828 opw-3419984 Forward-Port-Of: odoo/odoo#160300
Original PR description
Resolves an issue with Afterpay via Stripe not receiving correct shipping address details, causing transaction failures. Now, ensures shipping address from the order or invoice is accurately sent to Stripe if we have it. backport of this PR: #157828 opw-3419984 Forward-Port-Of: odoo/odoo#160300
When the user adds a valid Mauritius phone number, it is not correctly parsed by the phonenumbers library, resulting in a user error while sending a WhatsApp message to that number. Steps to produce: - Create a new contact with the Mauritius country selected. - Add a phone number (e.g., '+23057654321'). - Try to send WhatsApp messages using this phone number. - This will throw an Invalid number error. Problem: `phonenumbers==8.12.1` python library is used in odoo for parsing phone
Original PR description
When the user adds a valid Mauritius phone number, it is not correctly parsed by the phonenumbers library, resulting in a user error while sending a WhatsApp message to that number. Steps to produce: - Create a new contact with the Mauritius country selected. - Add a phone number (e.g., '+23057654321'). - Try to send WhatsApp messages using this phone number. - This will throw an Invalid number error. Problem: `phonenumbers==8.12.1` python library is used in odoo for parsing phone numbers. The `8.12.1` version is too old and cannot parse Mauritius phone numbers correctly. Solution: The `8.12.13` version accurately parses Mauritius phone numbers. Currently, The latest version of the phonenumbers library is `8.13.31`. Hence, the latest code from the latest version of the phonenumbers library is monkey-patched into the system. Task - 3799632 Forward-Port-Of: odoo/odoo#160956 Forward-Port-Of: odoo/odoo#157504
Steps to reproduce: - Create a storable kit product - Update on hand quantity: only the components are displayed(correct behavior) - In Inventory tab open Inventory Adjustement - Possible to edit kit quantity Bug: In the product tab when trying to update qty the kit product is replaced with its components instead but it is still Possible to edit kit quantity directly in the inventory app Fix: introduced python constraint to prevent user from directly editing the kit product qty op
Original PR description
Steps to reproduce: - Create a storable kit product - Update on hand quantity: only the components are displayed(correct behavior) - In Inventory tab open Inventory Adjustement - Possible to edit kit quantity Bug: In the product tab when trying to update qty the kit product is replaced with its components instead but it is still Possible to edit kit quantity directly in the inventory app Fix: introduced python constraint to prevent user from directly editing the kit product qty opw-3681703 Forward-Port-Of: odoo/odoo#160978 Forward-Port-Of: odoo/odoo#157061
In mobile, having a somewhat 'large price' (like a few thousands currency units) can cause the bottom of the card to overflow (esp. if buttons like 'add to card' or 'add to wishlist' are present). This commit modifies the card template so that content is normally spaced and can wrap to a new line if need be. opw-3706637 Forward-Port-Of: odoo/odoo#160628
Original PR description
In mobile, having a somewhat 'large price' (like a few thousands currency units) can cause the bottom of the card to overflow (esp. if buttons like 'add to card' or 'add to wishlist' are present). This commit modifies the card template so that content is normally spaced and can wrap to a new line if need be. opw-3706637 Forward-Port-Of: odoo/odoo#160628
The name of some accounts is ambiguous and too generic. For example, the account 3388 was named "Others" which is difficult for non Vietnamese accountants to understand. Some foreigners doing business in Vietnam usually get upset with these ambiguous names --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159550 Forward-Port-Of: odoo/odoo#133266
Original PR description
The name of some accounts is ambiguous and too generic. For example, the account 3388 was named "Others" which is difficult for non Vietnamese accountants to understand. Some foreigners doing business in Vietnam usually get upset with these ambiguous names --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159550 Forward-Port-Of: odoo/odoo#133266
## Issue: - When we have open tickets from anyone with the email domain @proton.me, they are linked together even though this domain is generic, not a private one. same issue with @cegetel.net and @dbmail.com ## Steps To Reproduce: - Create three tickets with "@proton.me" domain but different addresses. - See that in the smart button, the tickets are linked to each other even though the customers are different. ## Solution: - in `_compute_partner_ticket_count` we check if the email d
Original PR description
## Issue: - When we have open tickets from anyone with the email domain @proton.me, they are linked together even though this domain is generic, not a private one. same issue with @cegetel.net and…
## Issue: - When we have open tickets from anyone with the email domain @proton.me, they are linked together even though this domain is generic, not a private one. same issue with @cegetel.net and @dbmail.com ## Steps To Reproduce: - Create three tickets with "@proton.me" domain but different addresses. - See that in the smart button, the tickets are linked to each other even though the customers are different. ## Solution: - in `_compute_partner_ticket_count` we check if the email domain of the partner is in `iap_tools._MAIL_DOMAIN_BLACKLIST `, if not, we considers the email to be a company email which tickets can be grouped by. - the `_MAIL_DOMAIN_BLACKLIST` is a list of generic email providers on which IAP services should not run. Retrieving company information from them makes no sense. - To fix this issue I added `proton.me` , `cegetel.net` and `dbmail.com` to `_MAIL_DOMAIN_BLACKLIST` opw-3786308 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159321
When creating a new company from a move, if the tax ID is repeated, a warning is displayed. The warning includes the company name, address and VAT, if those have been added. In this case, address is shown in an extra line, which looks broken. This commit removes additional partner information by updating the context, displaying only the partner name. It also slightly rewords the warning, from "are you sure to create a new one?" to "are you sure you want to create a new one?". To replica
Original PR description
When creating a new company from a move, if the tax ID is repeated, a warning is displayed. The warning includes the company name, address and VAT, if those have been added. In this case, address is shown in an extra line, which looks broken. This commit removes additional partner information by updating the context, displaying only the partner name. It also slightly rewords the warning, from "are you sure to create a new one?" to "are you sure you want to create a new one?". To replicate the issue: 1. Create an invoice 2. Click on the empty field next to Customer, type a new name and click "Create and edit..." 3. Add a Tax ID that is already in use (e.g. US12345673) 4. Warning of duplicate Tax ID shows, displaying company name, address and VAT task-3829641 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160373
Before this commit, when adding two columns to the address, the search string would become formatted as such: "47:abigail peterson|address Belgium address0: 12, |abigail..." Searching for "abigail" would incorrectly match with "0: 12, |abigail", leading to the addition of the partner with ID 0 and causing an error. With this commit, we have refined the search to match only at the beginning of a line. This prevents incorrect matches and the subsequent errors, improving the reliability of t
Original PR description
Before this commit, when adding two columns to the address, the search string would become formatted as such: "47:abigail peterson|address Belgium address0: 12, |abigail..." Searching for "abigail" would incorrectly match with "0: 12, |abigail", leading to the addition of the partner with ID 0 and causing an error. With this commit, we have refined the search to match only at the beginning of a line. This prevents incorrect matches and the subsequent errors, improving the reliability of the partner search. opw-3847934 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160475
Small improvements on the download logs button in the Iot App: - Log file contains the IoT name and date of generation - Internal server error araise if the logfile config is missing - Internal server error aised if the log file is missin Was meant to be part of: https://github.com/odoo/odoo/pull/159186 opw-3827121 Forward-Port-Of: odoo/odoo#160645
Original PR description
Small improvements on the download logs button in the Iot App: - Log file contains the IoT name and date of generation - Internal server error araise if the logfile config is missing - Internal server error aised if the log file is missin Was meant to be part of: https://github.com/odoo/odoo/pull/159186 opw-3827121 Forward-Port-Of: odoo/odoo#160645
When the aggregated value is 0 (9000 + -9000 = 0), it displays an empty cell in spreadsheet, instead of zero. Task: 3827502 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159148
Original PR description
When the aggregated value is 0 (9000 + -9000 = 0), it displays an empty cell in spreadsheet, instead of zero. Task: 3827502 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#159148
Currently, when creating a purchase order, if the product has multiple vendor lines (with the vendor selected on the PO), the product description uses information from all the vendor lines; instead of using information from the vendor line that is used for the price. Steps to reproduce: ------------------- * Go to the **Purchase** App * Go to **Products** * Select any product * Select the **Purchase** tab * Add `Vendor Product Name` and `Vendor Product Code` in additional line fields *
Original PR description
Currently, when creating a purchase order, if the product has multiple vendor lines (with the vendor selected on the PO), the product description uses information from all the vendor lines; instead…
Currently, when creating a purchase order, if the product has multiple vendor lines (with the vendor selected on the PO), the product description uses information from all the vendor lines; instead of using information from the vendor line that is used for the price.
Steps to reproduce:
-------------------
* Go to the **Purchase** App
* Go to **Products**
* Select any product
* Select the **Purchase** tab
* Add `Vendor Product Name` and `Vendor Product Code` in additional line fields
* Add two vendor lines
* Line 1:
`Vendor`: Vendor1
`Vendor Product Name`: P1
`Vendor Product Code`: A
`Price`: 1
* Line 2:
`Vendor`: Vendor 1
`Vendor Product Name`: P1 bis
`Vendor Product Code`: B
`Price`: 5
* Select **Orders** > **Request for quotation**
* Create a new quotation
* Select Vendor 1, add the product for which we just added the two vendor lines
> **Observation**: The description of the product shows information from both vendor lines added.
Why the fix:
------------
This behavior was introduced when `name_get` was removed to use `dispay_name` instead.
* https://github.com/odoo/odoo/pull/122085/commits/a8b15c7ab5e2d850d0551a6eb4213bb20a30b210
* https://github.com/odoo/odoo/pull/122085/commits/a8b15c7ab5e2d850d0551a6eb4213bb20a30b210
When adding a product to the purchase order, the onchange on `product_id` is called. The onchange calls the function `_product_id_change`, which itself calls `_get_product_purchase_description`. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/purchase/models/purchase.py#L1224 https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/purchase/models/purchase.py#L1401-L1407
The line `name = product_lang.display_name` calls the function `_compute_display_name`.
* We do have a parnter_id in the context as we have selected a vendor on the purchase order. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/product/models/product_product.py#L434
* We don't have a supplierinfo in the context yet but we have multiple supplierinfo with the same partner_id. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/product/models/product_product.py#L466-L467 Here we thus have 2 sellers.
* Ultimately, the display name joins the different display names computer for each seller. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/product/models/product_product.py#L473-L483
Coming back to the line `self.name = self._get_product_purchase_description(product_lang)`, we now have the name of the purchase order line set as the concatenation of display names from the supplierinfo, i.e `'[A] P1, [B] P1 bis'`.
Once the onchange is called, the function `_compute_price_unit_and_date_planned_and_name` is being called. https://github.com/odoo/odoo/blob/7e9b9494a8d6c4bb8b3800cc0e25fcd3596db75d/addons/purchase/models/purchase.py#L1295-L1302 In the current state, we do not meet the if condition. Indeed, the line has a name (`'[A] P1, [B] P1 bis'`) but it isn't in the default_names (`['[A] P1', '[B] P1 bis']`). It somehow corresponds to a setting where the name of the purchase order line was setup by the user.
With this current fix, the call to `_product_id_change` will set the name of the line with the product information from the company; and not the partner/seller. We also need to add this name to the `default_names` in `_compute_price_unit_and_date_planned_and_name` so that the description gets recomputed with regards to the seller, if any.
I tested the scenario where:
* The second supplierinfo has a smaller unit price when buying 10 products. On the sale order line, when I set the quantity to 20, the unit price is updated as well as the description. The description is updated as `line.name` is indeed in `default_names`.
opw-3802182
Forward-Port-Of: odoo/odoo#160778
Forward-Port-Of: odoo/odoo#158398Issue: ===== double scrollbar appears in notes. Steps to reproduce the issue: ============================= - Go to notes - Insert a table - Add some columns and try to stretch the last one to the right until it goes outside the width of the editable. - Click on the last cell to the right in the table and scroll left - Another scrollbar will appear. Origin of the issue: ==================== The part of the table that is invisible in the editor is considered as overflow for the
Original PR description
Issue: ===== double scrollbar appears in notes. Steps to reproduce the issue: ============================= - Go to notes - Insert a table - Add some columns and try to stretch the last one to the right until it goes outside the width of the editable. - Click on the last cell to the right in the table and scroll left - Another scrollbar will appear. Origin of the issue: ==================== The part of the table that is invisible in the editor is considered as overflow for the `html_field` so it will show a scrollbar which is not needed since we already have a scrollbar in the edtibale. Solution: ========= We mark hide the overflow in `html_field` and let the editable takes care of the overflow. task-3721794 Forward-Port-Of: odoo/odoo#160674 Forward-Port-Of: odoo/odoo#157675
### Steps to reproduce issue: 1. Download two languages, set one as the user's language, the other as the website's 2. Make sure MailHog is running 3. Create a Mailing Contact with two different Mailing Lists 4. Create a mail with a link to unsubscribe 5. Send mail to one of the Contact's Mailing lists 6. Through MailHog, click on the subscription cancelling link 7. The first line is in the user's language and the others in the website's language ### Explanation: While most of the
Original PR description
### Steps to reproduce issue: 1. Download two languages, set one as the user's language, the other as the website's 2. Make sure MailHog is running 3. Create a Mailing Contact with two different…
### Steps to reproduce issue: 1. Download two languages, set one as the user's language, the other as the website's 2. Make sure MailHog is running 3. Create a Mailing Contact with two different Mailing Lists 4. Create a mail with a link to unsubscribe 5. Send mail to one of the Contact's Mailing lists 6. Through MailHog, click on the subscription cancelling link 7. The first line is in the user's language and the others in the website's language ### Explanation: While most of the webpage originates from an XML file, translated using the language of the website. https://github.com/odoo/odoo/blob/2ad911dab1f34b1b6dda1016cc189f0fea64b12c/addons/mass_mailing/views/mass_mailing_templates_portal.xml#L118 The first line is passed through javascript and translated on the fly. https://github.com/odoo/odoo/blob/efd178daee689192d4e930a075475587038b3e0d/addons/mass_mailing/static/src/js/unsubscribe.js#L50-L55 The line is translated thanks to an object fetched at the load of the page. The url where the object is located can receive parameters including the language, but defaults to the user's and is not set in our case. https://github.com/odoo/odoo/blob/0ca2ca9e8914dda77166b62dc8c2e9dc1ca1d3a4/addons/web/static/src/legacy/js/core/translation.js#L73-L78 ### Suggested fix: The language can be passed through the attribute `lang` of the document. https://github.com/odoo/odoo/blob/658bc65b22dba86a35f6bba0f892427e1be4aed1/addons/web/static/src/legacy/js/core/session.js#L205-L211 https://github.com/odoo/odoo/blob/e251354ce4b7df1763247385413e98f975981479/addons/web/views/webclient_templates.xml#L10 This option is already used in `website` and, [since 16.0](https://github.com/odoo/odoo/commit/5136ac7e4daaadda396c45c8538a81f8d6c44c0e), is inherited once `website` is installed. https://github.com/odoo/odoo/blob/c3c8003c6d1c4d694531c93e803e7e9cd7ebaa83/addons/website/views/website_templates.xml#L39-L50 opw-3748027 Forward-Port-Of: odoo/odoo#160697 Forward-Port-Of: odoo/odoo#159341
Now, point_of_sale handles errors in partner editions, so it is not required inheriting the method to add the functionality. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160389
Original PR description
Now, point_of_sale handles errors in partner editions, so it is not required inheriting the method to add the functionality. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#160389
### Steps to reproduce issue: 1. Select a boxed layout document 2. Create an invoice and add lines until the pdf version is on two pages 3. Print the pdf 4. On every page except the first one, the body of the document is cropped by the header ### Explanation: The PDF consists of three parts: the header, the footer and the body, and they are added separately. The body is delimited by the paper format and margins. Those do not depend on the size of the header and the footer. In the bo
Original PR description
### Steps to reproduce issue: 1. Select a boxed layout document 2. Create an invoice and add lines until the pdf version is on two pages 3. Print the pdf 4. On every page except the first one, the body of the document is cropped by the header ### Explanation: The PDF consists of three parts: the header, the footer and the body, and they are added separately. The body is delimited by the paper format and margins. Those do not depend on the size of the header and the footer. In the boxed layout, the height of the header is bigger than the default size of the top margin of the body. Because of that, it covers a part of the body. ### Suggested fix: By removing some whitespace, the header size has been reduced to a size smaller than the default margins of the document while keeping every information readable. opw-3768511 Forward-Port-Of: odoo/odoo#160770 Forward-Port-Of: odoo/odoo#159125
When a register payment is made with a writeoff in foreign currency and when the user set manually an exchange difference account, don't create a write-off. Instead, 2 cases to consider: - When the payment is expressed in a foreign currency different than the invoice's one, play with the rate between amount_currency and balance and let odoo making an exchange difference accordingly. That way, the payment has no write-off and the invoice is fully paid. - When the payment is expressed in co
Original PR description
When a register payment is made with a writeoff in foreign currency and when the user set manually an exchange difference account, don't create a write-off. Instead, 2 cases to consider: - When the payment is expressed in a foreign currency different than the invoice's one, play with the rate between amount_currency and balance and let odoo making an exchange difference accordingly. That way, the payment has no write-off and the invoice is fully paid. - When the payment is expressed in company currency but the invoice has a foreign currency, force the exchange difference to use a rate that will fully paid the invoice without creating any write-off line on the payment. task_id: 3717436 Forward-Port-Of: odoo/enterprise#58511
Steps to reproduce: - Confirm an SO with a storable product - in barcode app open the created picking - Scan a different product confirm the picking and create a backorder Bug: the new product is not added to the SO and the original picking isn't linked the SO anymore Fix: when new moves are created in the inventory app default_picking_id is set in the context and is used in _default_group_id to set the group do the same for the barcode app opw-3644773 Forward-Port-Of: odoo/enterp
Original PR description
Steps to reproduce: - Confirm an SO with a storable product - in barcode app open the created picking - Scan a different product confirm the picking and create a backorder Bug: the new product is not added to the SO and the original picking isn't linked the SO anymore Fix: when new moves are created in the inventory app default_picking_id is set in the context and is used in _default_group_id to set the group do the same for the barcode app opw-3644773 Forward-Port-Of: odoo/enterprise#60200 Forward-Port-Of: odoo/enterprise#57408
With an EC company setup Create a vendor bill Add 2+ withholding via the 'Add Withhold' Go to Accounting > Reports > Tax Report Set the month to this month, make sure report 103 is selected, then click the drop down menu for the PDF to select ATS Issue: Traceback It occurs because the user should not be able to add multiple posted withholds to the same invoice opw-3793714 Forward-Port-Of: odoo/enterprise#59679
Original PR description
With an EC company setup Create a vendor bill Add 2+ withholding via the 'Add Withhold' Go to Accounting > Reports > Tax Report Set the month to this month, make sure report 103 is selected, then click the drop down menu for the PDF to select ATS Issue: Traceback It occurs because the user should not be able to add multiple posted withholds to the same invoice opw-3793714 Forward-Port-Of: odoo/enterprise#59679
**Steps to reproduce:** 1- Install Planning module 2- Go to gantt view for Schedule by Resource 3- Check percentage for any row that has planned shift **Current behavior before PR:** The percentage of progress of each resource is calculated in a wrong way https://github.com/odoo/enterprise/blob/17.0/planning/static/src/views/planning_gantt/planning_gantt_model.js#L135 The ratio is already the value of the decimal multiplied by 100 so when divide it again by 100 then round it, it will a
Original PR description
**Steps to reproduce:** 1- Install Planning module 2- Go to gantt view for Schedule by Resource 3- Check percentage for any row that has planned shift **Current behavior before PR:** The percentage of progress of each resource is calculated in a wrong way https://github.com/odoo/enterprise/blob/17.0/planning/static/src/views/planning_gantt/planning_gantt_model.js#L135 The ratio is already the value of the decimal multiplied by 100 so when divide it again by 100 then round it, it will always give 0 **Desired behavior after PR is merged:** Since ratio is already multiplied by 100 and it will be formatted as percentage by multiply it again by 100 through 'formatPercentage' so we divide it by 100 without rounding it. opw-3796124 Forward-Port-Of: odoo/enterprise#60018
Currently, when a Colombian invoice has been sent through the EDI, a 'Request EDI Cancellation' button appears on the form view. This button shouldn't be there, as the cancellations process is not allowed in Colombia. ### Steps to reproduce * install `l10n_co_edi` * switch to a Colombian company and set up the EDI * create, confirm, and send an invoice * once the invoice has been successfully sent, attempt to cancel it using the 'Request EDI Cancellation' button. The invoice will be
Original PR description
Currently, when a Colombian invoice has been sent through the EDI, a 'Request EDI Cancellation' button appears on the form view. This button shouldn't be there, as the cancellations process is not…
Currently, when a Colombian invoice has been sent through the EDI, a 'Request EDI Cancellation' button appears on the form view. This button shouldn't be there, as the cancellations process is not allowed in Colombia. ### Steps to reproduce * install `l10n_co_edi` * switch to a Colombian company and set up the EDI * create, confirm, and send an invoice * once the invoice has been successfully sent, attempt to cancel it using the 'Request EDI Cancellation' button. The invoice will be marked as `to cancel`. Odoo will then periodically try to cancel it, but it will never succeed because Colombian invoices that have been sent to the government cannot be reset to draft. If the cancellation process is initiated by the user (either by manually running the EDI services cron, or using the 'Process Now' button on the form view) the following error message appears: > You can't edit the following journal entry [journal name] because an electronic document has already been sent to Carvajal. To edit this entry, you need to create a Credit Note for the invoice and create a new invoice. opw-3754395 Forward-Port-Of: odoo/enterprise#59749
Steps ----- 1. Have field services and sales installed 2. Create a new company 3. Create a new product belonging to the new company 4. Log in under new company 5. Field service > click the "Product" smart button in a task with no sales order ** Read access error when accessing a page with a product from new company ** Issue ----- In a multi-company environment, accessing the catalog of products in field service is only possible if there are no products belonging to a different compan
Original PR description
Steps ----- 1. Have field services and sales installed 2. Create a new company 3. Create a new product belonging to the new company 4. Log in under new company 5. Field service > click the "Product" smart button in a task with no sales order ** Read access error when accessing a page with a product from new company ** Issue ----- In a multi-company environment, accessing the catalog of products in field service is only possible if there are no products belonging to a different company than the user's main company. Note: this issue only arises if there's no sales order linked to the task. If an order already exists (for example by creating a sales order item in the task form), its associated company will be used. Fix --- We use the tasks's company to have the correct allowed_company_ids in the context. **opw-3752311** Forward-Port-Of: odoo/enterprise#58483