Tuesday, June 25, 2024
25 changes · saas-17.2
Resolved issues and error corrections
Planning users who do not have access to employee contracts can now create recurring shifts without being blocked by an access error. The change safely retrieves the needed contract end date in the background, keeping the Planning workflow usable while respecting access limitations.
Original PR description
Steps to reproduce: ------------------- With a user which has no access rights for 'Employees' and 'Contracts' and with admin rights for 'Planning', tries to add a new recurring shift (via the Planning module). Issue: ------ We get an access error. Cause: ------ We're trying to access the `contract_ids` field even though we don't have access rights. Solution: --------- Fetch the value of the `date_end` field in sudo so that this flow is not blocked for a planning user. opw-3992135
Miscellaneous changes
This will add a rule for the "Crédit d'impôt salaire social minimum" to the Luxembourg loca. Task: 3970762 Forward-Port-Of: odoo/enterprise#65178 Forward-Port-Of: odoo/enterprise#64257
Original PR description
This will add a rule for the "Crédit d'impôt salaire social minimum" to the Luxembourg loca. Task: 3970762 Forward-Port-Of: odoo/enterprise#65178 Forward-Port-Of: odoo/enterprise#64257
This PR fixes a contrast issue on a primary button within the sign module due to a `text-white` class applied. The default button utility classes already provide a good contrast, meaning that adding extra class is not useful. To fix the issue, we simply remove the class from the button. task-3692048 | Light mode (`:focus` state) | Dark mode | |--------|--------| | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/b73a2fe7-f802-4461-9015-16a2f4b46d92"> | <img al
Original PR description
This PR fixes a contrast issue on a primary button within the sign module due to a `text-white` class applied. The default button utility classes already provide a good contrast, meaning that adding extra class is not useful. To fix the issue, we simply remove the class from the button. task-3692048 | Light mode (`:focus` state) | Dark mode | |--------|--------| | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/b73a2fe7-f802-4461-9015-16a2f4b46d92"> | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/8354c78f-6525-4aef-9057-fdb706b3cd0d"> | Forward-Port-Of: odoo/enterprise#64801
When we introduced dynamic templates in Knowledge, we merged the models `knowledge.article` and `knowledge.article.template` and introduced a new field `is_template` in the `knowledge.article` model to distinguish the templates from the regular articles. In the `website_helpdesk_knowledge` module, we forgot to exclude the templates from the search domains. As a result, the helpdesk frontend view can list and search within templates. Steps to reproduce the issue: 1. Log in as "Admin". 2
Original PR description
When we introduced dynamic templates in Knowledge, we merged the models `knowledge.article` and `knowledge.article.template` and introduced a new field `is_template` in the `knowledge.article` model…
When we introduced dynamic templates in Knowledge, we merged the models `knowledge.article` and `knowledge.article.template` and introduced a new field `is_template` in the `knowledge.article` model to distinguish the templates from the regular articles. In the `website_helpdesk_knowledge` module, we forgot to exclude the templates from the search domains. As a result, the helpdesk frontend view can list and search within templates. Steps to reproduce the issue: 1. Log in as "Admin". 2. Install `website_helpdesk_knowledge` module. 3. Go on the Helpdesk module. 4. On the helpdesk overview, click on the vertical dots of the "Customer Care" team card. 5. On the dropdown menu, click on the "Settings" option. 6. On the "Help Center" section, click on the "Knowledge" option. 7. On the "Visibility & Assignment" section, click on "Invited portal users and all internal users" option. 8. Save the changes. 9. Go on the Website module. 10. On the website navbar, click on "Customer Care" nav bar. 11. The interface should list article templates. => TO BE: The system should not list any templates. To fix that issue, we will simplify the search domains and exclude the templates from the search results using the `is_template` field. Reference: https://github.com/odoo/enterprise/pull/48691 task-3987469 Forward-Port-Of: odoo/enterprise#64468
This PR fixes the mobile responsiveness inside the reconciliation in `account_accountant`. The width of the elements was too small and the `overflow` value broke the layout on mobile view. The point is to make the data at least readable on mobile, but this could be improved in the near future (eg. less data shown to user, displayed another way like a list-group, etc). If barcode is installed, the buttons are half-hidden under the control-panel. This is fixed in this [Enterprise/#63271](ht
Original PR description
This PR fixes the mobile responsiveness inside the reconciliation in `account_accountant`. The width of the elements was too small and the `overflow` value broke the layout on mobile view. The point…
This PR fixes the mobile responsiveness inside the reconciliation in `account_accountant`. The width of the elements was too small and the `overflow` value broke the layout on mobile view. The point is to make the data at least readable on mobile, but this could be improved in the near future (eg. less data shown to user, displayed another way like a list-group, etc). If barcode is installed, the buttons are half-hidden under the control-panel. This is fixed in this [Enterprise/#63271](https://github.com/odoo/enterprise/pull/63271). task-3358275 Related to task-3326263 | Before | After | |--------|--------| | <img width="408" alt="Screenshot 2024-05-27 at 14 19 32" src="https://github.com/odoo/enterprise/assets/108661430/56ac88f0-22e4-498c-a5f2-ea9ef9316a80"> | <img width="407" alt="Screenshot 2024-05-27 at 14 31 49" src="https://github.com/odoo/enterprise/assets/108661430/be2bdb9a-c1de-4280-bf07-2d5257d74c3d"> | | | <img width="408" alt="Screenshot 2024-05-27 at 14 32 00" src="https://github.com/odoo/enterprise/assets/108661430/fecb7a25-04c3-48d0-a555-67c2a4aa45d4"> | Forward-Port-Of: odoo/enterprise#45256
Currently the tax lock date is not checked correctly in a test when posting a move. This problem is solved in the related community PR. This commit ensures the test does not fail after the community fix. To do this we just remove and re-introduce the tax lock date. community PR: https://github.com/odoo/odoo/pull/170475 Forward-Port-Of: odoo/enterprise#65262
Original PR description
Currently the tax lock date is not checked correctly in a test when posting a move. This problem is solved in the related community PR. This commit ensures the test does not fail after the community fix. To do this we just remove and re-introduce the tax lock date. community PR: https://github.com/odoo/odoo/pull/170475 Forward-Port-Of: odoo/enterprise#65262
Previous implementation checked if a folder was empty before removing it. However, it didn't take into account cases where one folder is empty but there are non-empty subfolders inside. Removing the parent folder triggered an error. The new implementation recursively checks the subfolders to ensure their emptiness before trying to remove the parent folder. Forward-Port-Of: odoo/enterprise#62184 Forward-Port-Of: odoo/enterprise#61649
Original PR description
Previous implementation checked if a folder was empty before removing it. However, it didn't take into account cases where one folder is empty but there are non-empty subfolders inside. Removing the parent folder triggered an error. The new implementation recursively checks the subfolders to ensure their emptiness before trying to remove the parent folder. Forward-Port-Of: odoo/enterprise#62184 Forward-Port-Of: odoo/enterprise#61649
Steps to reproduce: 1. Open the split tool, select a few pages, and create an expense for instance 2. Once the pages are gone, navigate with the keyboard 3: Traceback occurred Technical reason: When we navigated using the left arrow, it couldn't find the documents we were targeting. In the '_focusNextPage' function, inside 'PdfManager' it was attempting to access elements like 'arr[-2]', which resulted in an 'undefined' value. After this commit: No traceback will occur and if it can't
Original PR description
Steps to reproduce: 1. Open the split tool, select a few pages, and create an expense for instance 2. Once the pages are gone, navigate with the keyboard 3: Traceback occurred Technical reason: When we navigated using the left arrow, it couldn't find the documents we were targeting. In the '_focusNextPage' function, inside 'PdfManager' it was attempting to access elements like 'arr[-2]', which resulted in an 'undefined' value. After this commit: No traceback will occur and if it can't find the previous or next selected page, it focuses on the first page by default. Task-3874151 Forward-Port-Of: odoo/enterprise#62244
**Current behavior:** Excess lines which are created during a barcode picking flow do not get the o_faulty class which distinguishes them as not being planned during the picking's creation. **Expected behavior:** These extra lines will get the o_faulty class. **Steps to reproduce:** 1. Create a picking in the Inventory app, mark it as to-do 2. In the Barcode app, go to the picking and scan the product 3. After scanning the original demand quantity, scan it again 4. See that it
Original PR description
**Current behavior:** Excess lines which are created during a barcode picking flow do not get the o_faulty class which distinguishes them as not being planned during the picking's creation. **Expected behavior:** These extra lines will get the o_faulty class. **Steps to reproduce:** 1. Create a picking in the Inventory app, mark it as to-do 2. In the Barcode app, go to the picking and scan the product 3. After scanning the original demand quantity, scan it again 4. See that it doesn't get the o_faulty class **Cause of the issue:** The lineIsFaulty() method is checking defunct properties to determine whether they should get this css class. **Fix:** Update the check so it uses an existing property. opw-3904661 Forward-Port-Of: odoo/enterprise#65200 Forward-Port-Of: odoo/enterprise#63285
We are unable to update the 'create date' and 'write date' through the ORM method. Therefore, I used a patch. task-4004191 Forward-Port-Of: odoo/enterprise#65151
Original PR description
We are unable to update the 'create date' and 'write date' through the ORM method. Therefore, I used a patch. task-4004191 Forward-Port-Of: odoo/enterprise#65151
Steps to reproduce: - Create a new payment term; "days end of month on the 30" - create an invoice in may - set the newly created payment term - create a invoice line - save Issue: the due date (`maturity_date`) is 2024-06-29 Cause: Use of `relativedelta` with the singular form of `month` -> absolute value It was set to 2 so it would always give 29 -> year-02-29 and so `days_next_month = relativedelta(days=min(int(self.days_next_month), (date_end_of_month + relativedelta(mont
Original PR description
Steps to reproduce: - Create a new payment term; "days end of month on the 30" - create an invoice in may - set the newly created payment term - create a invoice line - save Issue: the due date…
Steps to reproduce: - Create a new payment term; "days end of month on the 30" - create an invoice in may - set the newly created payment term - create a invoice line - save Issue: the due date (`maturity_date`) is 2024-06-29 Cause: Use of `relativedelta` with the singular form of `month` -> absolute value It was set to 2 so it would always give 29 -> year-02-29 and so `days_next_month = relativedelta(days=min(int(self.days_next_month), (date_end_of_month + relativedelta(month=2)).day))` would always return 29 since 29 <= (29, 30, 31) ``` >>> import datetime >>> from dateutil.relativedelta import relativedelta >>> date_end_of_month datetime.datetime(2024, 5, 31, 17, 4, 14, 791820) >>> (date_end_of_month + relativedelta(month=2)) datetime.datetime(2024, 2, 29, 17, 4, 14, 791820) >>> min(31, 30, (date_end_of_month + relativedelta(month=2)).day) 29 ``` Solution: use the relative form of `relativedelta`; that is, the plural form `months` ``` >>> (date_end_of_month + relativedelta(months=1)) datetime.datetime(2024, 6, 30, 17, 4, 14, 791820) ``` source: https://dateutil.readthedocs.io/en/stable/relativedelta.html Note: Had to change the existing test on the overlapping year since ``` >>> december_date datetime.datetime(2023, 12, 12, 0, 0) >>> december_date + datetime.timedelta(days=30) datetime.datetime(2024, 1, 11, 0, 0) ``` and from date the maturity date would be 31st of January opw-3916451 Forward-Port-Of: odoo/odoo#166560
Steps: ========== - Install the point_of_sale and Razorpay payment provider modules. - Create an online payment method for the Razorpay payment provider. - Add the created payment method to the shop. - Open the shop, place an order, and use the Razorpay payment method. - Scan the QR code for payment and complete the payment with public users. Issue: ========== - An error occurs stating 'Email must be a valid email address,' causing the task to be blocked. Cause: ========== - The
Original PR description
Steps: ========== - Install the point_of_sale and Razorpay payment provider modules. - Create an online payment method for the Razorpay payment provider. - Add the created payment method to the shop. - Open the shop, place an order, and use the Razorpay payment method. - Scan the QR code for payment and complete the payment with public users. Issue: ========== - An error occurs stating 'Email must be a valid email address,' causing the task to be blocked. Cause: ========== - The email for public users is not found. FIX: ========== - Add an empty email address option for public users. task-3992084 Forward-Port-Of: odoo/odoo#169974
**Current behavior:** Having a storage location with a storage category that has a max quantity acting on some productA, and a putaway rule that will move product from an intermediary location to the location with the category: Creating a move for productA into the intermediary location that won't hit the cap applied on the second location, then creating an additional move (separate picking) with a demand that exceeds the cap will result in the cap not getting respected during the quant move
Original PR description
**Current behavior:** Having a storage location with a storage category that has a max quantity acting on some productA, and a putaway rule that will move product from an intermediary location to the…
**Current behavior:** Having a storage location with a storage category that has a max quantity acting on some productA, and a putaway rule that will move product from an intermediary location to the location with the category: Creating a move for productA into the intermediary location that won't hit the cap applied on the second location, then creating an additional move (separate picking) with a demand that exceeds the cap will result in the cap not getting respected during the quant move process. **Expected behavior:** The second move will not get assigned via putaway rule to the second location, as its quantity is too large. **Steps to reproduce:** 1. Create a storage category with a capacity: `product: productA` `quantity: 5` 2. Create an internal location: `parent location: WH/STOCK` `storage category: from step 1` 3. Create a putaway rule: `product: productA` `src location: WH/STOCK` `dest location: from step 2` `storage category: from step1` 4. Create a receipt picking with a move for productA that will not exceed the storage categ. cap -> confirm the picking 5. Create another receipt picking with a move for productA that exceeds the storage categ. cap -> confirm -> fill out the quantity -> validate 6. Go to the storage location and view its quants, see it's more than the max capacity **Cause of the issue:** During the picking assignment, the current/pending quantity of the proposed location gets calculated. Prior to the 7dda6bb refactor on the `qty_done` field, this current/pending quantity was stored in the method in a local variable, coincidentally also called qty_done. It got changed to quantity in this commit, which is also the name of one of the method arguments that represents the quantity value of the current move line which is being validated. Thus, the incoming quantity becomes the current quantity in the location which, of course, does not validate the defined cap. **Fix:** Rename the local variable. opw-3926597 Forward-Port-Of: odoo/odoo#169746
**Description of the issue/feature this PR addresses:** This PR addresses the orientation of chart labels in survey live session. Previously, chart labels in the survey live session struggled to display longer labels effectively. Labels are now tilted by min 20 degrees for better visibility and display of longer labels in survey live sessions chart. **Task**-3884116 Forward-Port-Of: odoo/odoo#170305 Forward-Port-Of: odoo/odoo#163288
Original PR description
**Description of the issue/feature this PR addresses:** This PR addresses the orientation of chart labels in survey live session. Previously, chart labels in the survey live session struggled to display longer labels effectively. Labels are now tilted by min 20 degrees for better visibility and display of longer labels in survey live sessions chart. **Task**-3884116 Forward-Port-Of: odoo/odoo#170305 Forward-Port-Of: odoo/odoo#163288
This traceback occurs when the user tries to activate stripe through onboarding without installing `website_payment`. To reproduce this issue:- 1) Install `sale` 2) Now switch to a new company by creating a `new company` 4) With the new company try to `activate the stripe` from the `sales Onboarding` 5) A traceback occurs Error:- ``` ValueError: Invalid field 'website_id' on model 'payment.provider' ``` As you can see `website_id` field is defined in `website_payment` at [1]
Original PR description
This traceback occurs when the user tries to activate stripe through onboarding without installing `website_payment`. To reproduce this issue:- 1) Install `sale` 2) Now switch to a new company by creating a `new company` 4) With the new company try to `activate the stripe` from the `sales Onboarding` 5) A traceback occurs Error:- ``` ValueError: Invalid field 'website_id' on model 'payment.provider' ``` As you can see `website_id` field is defined in `website_payment` at [1], but it is used in the `payment` module [2]. Which leads to the above traceback when `website_payment` is not installed. [1] https://github.com/odoo/odoo/blob/16e8de01b14ddac69cd706f8f64e762406769542/addons/website_payment/models/payment_provider.py#L12-L16 [2] https://github.com/odoo/odoo/blob/16e8de01b14ddac69cd706f8f64e762406769542/addons/payment/models/res_company.py#L48-L53 sentry-5504774122 Forward-Port-Of: odoo/odoo#170550 Forward-Port-Of: odoo/odoo#169953
Issue ---- Phone number can span two lines with some fonts for reports that use the contact widget (e.g. Delivery Slip). Steps ----- - Use Raleway font. You can do this by going to Settings -> Configure Document Layout (under Companies) -> Choose Raleway. - Change the phone number of the current company to `+33 3 28 44 55 01`. - Create a delivery (without lines) and print a Delivery Slip without validating. - The phone number spans two lines. Cause ----- When the phone numbe
Original PR description
Issue ---- Phone number can span two lines with some fonts for reports that use the contact widget (e.g. Delivery Slip). Steps ----- - Use Raleway font. You can do this by going to Settings -> Configure Document Layout (under Companies) -> Choose Raleway. - Change the phone number of the current company to `+33 3 28 44 55 01`. - Create a delivery (without lines) and print a Delivery Slip without validating. - The phone number spans two lines. Cause ----- When the phone number is long and takes up space in some fonts, the phone number is line-wrapped, which is ok for other text but not for phone numbers. opw-3834061 Forward-Port-Of: odoo/odoo#169638 Forward-Port-Of: odoo/odoo#166336
### Current Behavior: - Go in the project app, click on a project and click on a task - Change the stage of the task The duration spent in the previous stage is displayed in the new stage. Note: if you refresh the page the bug will disappear. ### Cause of the issue: The `duration_tracking` of the `project.task` model is a non stored computed json field. During the computation of this field, the previous trackings of the object are retrieved from `mail.tracking.value` model: https
Original PR description
### Current Behavior: - Go in the project app, click on a project and click on a task - Change the stage of the task The duration spent in the previous stage is displayed in the new stage. Note: if…
### Current Behavior: - Go in the project app, click on a project and click on a task - Change the stage of the task The duration spent in the previous stage is displayed in the new stage. Note: if you refresh the page the bug will disappear. ### Cause of the issue: The `duration_tracking` of the `project.task` model is a non stored computed json field. During the computation of this field, the previous trackings of the object are retrieved from `mail.tracking.value` model: https://github.com/odoo/odoo/blob/bb0cb2896236ead6b474cd1b3a685ff447716b95/addons/mail/models/mail_tracking_duration_mixin.py#L45-L60 To be sure that these trackings will be correctly retrieved, the model used by the query are even flushed. However, these mail tracking values are only created at the end of the sql transaction because the `_track_finalize` method is part of the precommit hooks of the transaction and is hence only run during the general sql flush: https://github.com/odoo/odoo/blob/784f90d25614e4816ac3ed26f0643b562071edbd/odoo/sql_db.py#L134-L138 https://github.com/odoo/odoo/blob/784f90d25614e4816ac3ed26f0643b562071edbd/odoo/tools/misc.py#L1215-L1221 As such, the mail tracking values generated by the old value of the stage will only be accessible at the end of the transaction and will not be available during the computation duration_tracking run for the project task in its final stage. Leading to an incorrect computation of the field during onchanges: https://github.com/odoo/odoo/blob/bb0cb2896236ead6b474cd1b3a685ff447716b95/addons/mail/models/mail_tracking_duration_mixin.py#L62-L64 ### Fix: In order for the the mail tracking values generated by the old stage to be present during the final computation of our duration_tracking we trigger the `_track_finalize` precommit hook on the records for which it should be run at the end of the transaction before the execution of our query. opw-3837359 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#161688
**Current behavior:** Sharing an editable link to a project with a portal user creates an undesirable scenario where they can read a project record and associated tasks but trying to use the chatter on a task's page results in a vague access error. **Expected behavior:** An editable share link should require the invitee to login prior to accessing records and the chatter. **Steps to reproduce:** 1. Make a project shareable with external users, share an editable link with a por
Original PR description
**Current behavior:** Sharing an editable link to a project with a portal user creates an undesirable scenario where they can read a project record and associated tasks but trying to use the chatter…
**Current behavior:**
Sharing an editable link to a project with a portal user creates
an undesirable scenario where they can read a project record and
associated tasks but trying to use the chatter on a task's page
results in a vague access error.
**Expected behavior:**
An editable share link should require the invitee to login prior
to accessing records and the chatter.
**Steps to reproduce:**
1. Make a project shareable with external users, share an
editable link with a portal user
2. Open the generated link in an incognito window, go to a task
that has the chatter text area input available
3. Try to leave a comment, observe the vague error
(access error behind the scenes)
**Cause of the issue:**
The hash which is generated with the share link for the invitee
uses the project record's `_mail_post_token_field` to permit
access on that record. The system which should recognize this
case and also permit access to that project's task records is
not working properly. Eventually, we fail a consteq() check on
the hash in the URL and the token generated by the ORM to
determine accessibility of the record (because it uses the
task's `_mail_post_token_field` value while ours was generated
using the project's).
**Fix:**
Create a method on the `mail.thread` extension in `portal` which
can be overridden in inheriting classes to return a logical
parent's `_sign_token()` result.
When checking for chatter post access, check both values against
the provided hash.
opw-3777597
Forward-Port-Of: odoo/odoo#170492
Forward-Port-Of: odoo/odoo#160170The field `max_tax_lock_date` is not always computed correctly. This is since the compute function does not depend on the `tax_lock_date` field. It should not happen in production since the `tax_lock_date` and the check of `max_tax_lock_date` should not happen in the same transaction. But it can still cause issues in tests. The missing dependency is added in this commit. enterprise PR (fixing a test): https://github.com/odoo/enterprise/pull/65262 Forward-Port-Of: odoo/odoo#170475
Original PR description
The field `max_tax_lock_date` is not always computed correctly. This is since the compute function does not depend on the `tax_lock_date` field. It should not happen in production since the `tax_lock_date` and the check of `max_tax_lock_date` should not happen in the same transaction. But it can still cause issues in tests. The missing dependency is added in this commit. enterprise PR (fixing a test): https://github.com/odoo/enterprise/pull/65262 Forward-Port-Of: odoo/odoo#170475
Steps: - Install the project - Enable use custom enable server from general settings. Set an alias domain - Create a new project - Wizard pops up Issue: - Default value of alias domain is not set. Cause: - alias_domain_id is related to alias_id and it is not present in the view. Fix: - Issue is been fixed by adding a field in wizard view as alias domain was getting fetched on that field. - Additionally the same field is been to added to form view as well. task-3744319 Forwar
Original PR description
Steps: - Install the project - Enable use custom enable server from general settings. Set an alias domain - Create a new project - Wizard pops up Issue: - Default value of alias domain is not set. Cause: - alias_domain_id is related to alias_id and it is not present in the view. Fix: - Issue is been fixed by adding a field in wizard view as alias domain was getting fetched on that field. - Additionally the same field is been to added to form view as well. task-3744319 Forward-Port-Of: odoo/odoo#154681
Previously, the floating icon wasn't an OWL component and has been refactored into an OWL component. When refactored he lost the auto move up top logic that came with the css classes 'o_bottom_fixed_element' and 'o_bottom_fixed_element_move_up' This commit reintroduce this auto move up behavior by default within the OWL component by listening to the scroll event of the document and identifying whenever we reach the end of the document. It is useful so we ensure the users can click all l
Original PR description
Previously, the floating icon wasn't an OWL component and has been refactored into an OWL component. When refactored he lost the auto move up top logic that came with the css classes…
Previously, the floating icon wasn't an OWL component and has been refactored into an OWL component. When refactored he lost the auto move up top logic that came with the css classes 'o_bottom_fixed_element' and 'o_bottom_fixed_element_move_up' This commit reintroduce this auto move up behavior by default within the OWL component by listening to the scroll event of the document and identifying whenever we reach the end of the document. It is useful so we ensure the users can click all links potentially present in the footer. If the icon is dragged and moved elsewhere, we prevent this smart behavior from happening until next refresh of the state. Commit introducing the drag & drop feature : https://github.com/odoo/odoo/commit/d9f07235484 Commit of the OWL refactoring : https://github.com/odoo/odoo/commit/20c1772d Steps to reproduce : - Install LiveChat - Toggle Mobile display - Scroll down to the bottom of page -> The livechat floating icon doesn't go up as it was before task-3946855 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169831 Forward-Port-Of: odoo/odoo#169383
Summary ----- When creating an expense in a currency different from the company's currency, the exchange rate is rounded to 6 decimal places. If the rate and the expense amount are high enough, the rounding error affects the expense amount in the company's currency and later, in the journal entries created after the expense is approved. Steps to Reproduce ----- 1. Set a strong currency for the company (e.g., USD) 2. Add a weak currency in the currencies (e.g., IQD) 3. Create
Original PR description
Summary ----- When creating an expense in a currency different from the company's currency, the exchange rate is rounded to 6 decimal places. If the rate and the expense amount are high enough, the…
Summary
-----
When creating an expense in a currency different from the company's currency, the exchange rate is rounded to 6 decimal places. If the rate and the expense amount are high enough, the rounding error affects the expense amount in the company's currency and later, in the journal entries created after the expense is approved.
Steps to Reproduce
-----
1. Set a strong currency for the company (e.g., USD)
2. Add a weak currency in the currencies (e.g., IQD)
3. Create an expense with a high amount (e.g., 1,000,000 for the IQD/USD pair)
4. Set the weak currency for the expense
5. Observe the overly rounded amount in the weak currency
Cause
-----
The error comes from the exchange rate being rounded too much and too early.
Fix
-----
Modify "digits" attribute of the "currency_rate" field to increase precision.
Note
-----
Some inaccuracy remains, but expenses rarely exceed 1000 USD for companies using weak currencies, so the number of issues should be reduced.
opw-3684727
Forward-Port-Of: odoo/odoo#167606**Reproduce issue:** - Drop and drop a form snippet - Set a field as a multiple checkbox - Toggle on option 1 - Set a space at the end of option 1 so "option 1 " - Blur the input **Result:** You will find, Option 1 is no more selected. The root cause of this issue appears to be the unexpected trimming of the HTML input box. By default, HTML trims leading and trailing spaces, as well as considers multiple inner spaces as a single space. Consequently, inconsistencies arise between
Original PR description
**Reproduce issue:** - Drop and drop a form snippet - Set a field as a multiple checkbox - Toggle on option 1 - Set a space at the end of option 1 so "option 1 " - Blur the input **Result:** You will find, Option 1 is no more selected. The root cause of this issue appears to be the unexpected trimming of the HTML input box. By default, HTML trims leading and trailing spaces, as well as considers multiple inner spaces as a single space. Consequently, inconsistencies arise between the input value, ID, and display name. This commit trims the value from the initial to maintain consistency. As a result, `option 1`, `option 1 `, ` option 1`, and `option 1` will all be trimmed and considered the same. task-3254884 Forward-Port-Of: odoo/odoo#170365 Forward-Port-Of: odoo/odoo#128692
Add raw data directly to each records themselves, instead of storing them in a separate object. This way, we avoid having verify if the raw data exists in the main object, we can directly access it. This commit also include a backport of https://github.com/odoo/odoo/pull/168466, commit message: Before this commit, loading the POS took a long time when there were more than 1000 products and pricelists. The reason was that the `computeProductPricelistCache` function had a time complexity
Original PR description
Add raw data directly to each records themselves, instead of storing them in a separate object. This way, we avoid having verify if the raw data exists in the main object, we can directly access it. This commit also include a backport of https://github.com/odoo/odoo/pull/168466, commit message: Before this commit, loading the POS took a long time when there were more than 1000 products and pricelists. The reason was that the `computeProductPricelistCache` function had a time complexity of O(n^2 * m) due to nested loops over products and pricelist items, and several calls to the raw function which is O(n) itself. This commit optimizes the `computeProductPricelistCache` function by performing a single loop over pricelist items and another over products. This change improves the loading speed from 10 minutes to 10 seconds with 1000 products and pricelist items. Forward-Port-Of: odoo/odoo#169115
Check if the user selected the carrier for storable/consumable products before proceeding to payment. opw-3810367 See also: - https://github.com/odoo/enterprise/pull/60550 Forward-Port-Of: odoo/odoo#166259 Forward-Port-Of: odoo/odoo#161476
Original PR description
Check if the user selected the carrier for storable/consumable products before proceeding to payment. opw-3810367 See also: - https://github.com/odoo/enterprise/pull/60550 Forward-Port-Of: odoo/odoo#166259 Forward-Port-Of: odoo/odoo#161476