Tuesday, March 5, 2024
12 changes · saas-17.1
Enhancements to existing features
This update adds README files to all payment acquirer modules, clarifying the technical details of each implementation. This improves understanding of how payment integrations work and addresses the rapid changes in the online payments landscape, ensuring smoother maintenance and updates.
Original PR description
Each payment acquirer has its own implementation specificities: some implement a 'payment with redirection' flow and others a 'direct payment flow'; sometimes the 'payment with redirection' flow is…
Each payment acquirer has its own implementation specificities: some implement a 'payment with redirection' flow and others a 'direct payment flow'; sometimes the 'payment with redirection' flow is even implemented as a 'direct payment' flow through an iframe; one payment acquirer could support webhooks while another does not and relies on another mechanism to fetch payment status updates... It can be tricky to guess where to look in the code to determine how a payment acquirer is implemented. On top of that, the online payments ecosystem evolves at a fast pace due to competition, buyouts, and legislation enforcement. Acquirers are thus frequently migrated to new APIs that might differ in implementation from the previous API. To help figure out the *which*, *why*, *how*, and *when* of payment API implementations, a README.md file is added to the main directory of all payment acquirer modules. They can be browsed in human-readable format on GitHub. task-2374916 See also: - https://github.com/odoo/enterprise/pull/56182 Forward-Port-Of: odoo/odoo#156084 Forward-Port-Of: odoo/odoo#153016
Resolved issues and error corrections
This update fixes an issue where user preferences (like home menu app order) were not consistently saved during sessions. The change ensures that user settings, including app order, are correctly preserved after reordering, improving the user experience. This resolves a bug that caused lost preferences.
Original PR description
User settings is used to store user's preferences, in web we use it to store the home menus apps order and in mail for various settings like push to talk key, discuss sidebar preferences, etc. Before…
User settings is used to store user's preferences, in web we use it to store the home menus apps order and in mail for various settings like push to talk key, discuss sidebar preferences, etc.
Before this commit, the `setUserSettings` method from the user service overrided all the previous key that has not been changed because it kept only the changed keys returned by the backend. Leading to preferences being lost during the session when reordering the home menu apps.
With this commit, we keep the previous keys that have not been changed.
Steps to reproduce:
- Go to the home menu
- In the Owl devtool check the settings object from the user service:
```JavaScript
{
"id": 1,
"user_id": {
"id": 2
},
"is_discuss_sidebar_category_channel_open": true,
"is_discuss_sidebar_category_chat_open": true,
"push_to_talk_key": false,
"use_push_to_talk": false,
"voice_active_duration": 0,
"volume_settings_ids": [
[
"ADD",
[]
]
],
"homemenu_config": "[\"mail.menu_root_discuss\",\"room.room_menu_root\",\"calendar.mail_menu_calendar\",\"appointment.main_menu_appointments\",\"project_todo.menu_todo_todos\",\"membership.menu_association\",\"knowledge.knowledge_menu_root\",\"contacts.menu_contacts\",\"frontdesk.frontdesk_menu_root\",\"point_of_sale.menu_point_root\",\"crm.crm_menu_root\",\"sale.sale_menu_root\",\"spreadsheet_dashboard.spreadsheet_dashboard_menu_root\",\"sale_subscription.menu_sale_subscription_root\",\"sale_renting.rental_menu_root\",\"pos_preparation_display.menu_point_kitchen_display_root\",\"account_accountant.menu_accounting\",\"documents.menu_root\",\"project.menu_main_pm\",\"hr_timesheet.timesheet_menu_root\",\"industry_fsm.fsm_menu_root\",\"planning.planning_menu_root\",\"helpdesk.menu_helpdesk_root\",\"website.menu_website_configuration\",\"website_slides.website_slides_menu_root\",\"social.menu_social_global\",\"marketing_automation.marketing_automation_menu\",\"mass_mailing.mass_mailing_menu_root\",\"mass_mailing_sms.mass_mailing_sms_menu_root\",\"event.event_main_menu\",\"survey.menu_surveys\",\"purchase.menu_purchase_root\",\"stock.menu_stock_root\",\"mrp.menu_mrp_root\",\"mrp_workorder.menu_mrp_workorder_root\",\"quality_control.menu_quality_root\",\"stock_barcode.stock_barcode_menu\",\"maintenance.menu_maintenance_title\",\"repair.menu_repair_order\",\"mrp_plm.menu_mrp_plm_root\",\"account_consolidation.menu_consolidation\",\"sign.menu_document\",\"hr.menu_hr_root\",\"hr_work_entry_contract_enterprise.menu_hr_payroll_root\",\"hr_appraisal.menu_hr_appraisal_root\",\"hr_attendance.menu_hr_attendance_root\",\"hr_recruitment.menu_hr_recruitment_root\",\"hr_referral.menu_hr_referral_root\",\"fleet.menu_root\",\"hr_holidays.menu_hr_holidays_root\",\"hr_expense.menu_hr_expense_root\",\"lunch.menu_lunch\",\"im_livechat.menu_livechat_root\",\"data_recycle.menu_data_cleaning_root\",\"approvals.approvals_menu_root\",\"whatsapp.whatsapp_menu_main\",\"iot.iot_menu_root\",\"base.menu_management\",\"base.menu_tests\",\"base.menu_administration\"]",
"voip_username": false,
"voip_secret": false,
"should_call_from_another_device": false,
"external_device_number": false,
"should_auto_reject_incoming_calls": false,
"how_to_call_on_mobile": "ask",
"is_discuss_sidebar_category_whatsapp_open": true,
"onsip_auth_username": false,
"livechat_username": false,
"livechat_lang_ids": [],
"is_discuss_sidebar_category_livechat_open": true
}
```
- Reorder an app in the home menu and check again the settings object:
```JavaScript
{
"id": 1,
"homemenu_config": "[\"mail.menu_root_discuss\",\"room.room_menu_root\",\"project_todo.menu_todo_todos\",\"calendar.mail_menu_calendar\",\"appointment.main_menu_appointments\",\"membership.menu_association\",\"knowledge.knowledge_menu_root\",\"contacts.menu_contacts\",\"frontdesk.frontdesk_menu_root\",\"point_of_sale.menu_point_root\",\"crm.crm_menu_root\",\"sale.sale_menu_root\",\"spreadsheet_dashboard.spreadsheet_dashboard_menu_root\",\"sale_subscription.menu_sale_subscription_root\",\"sale_renting.rental_menu_root\",\"pos_preparation_display.menu_point_kitchen_display_root\",\"account_accountant.menu_accounting\",\"documents.menu_root\",\"project.menu_main_pm\",\"hr_timesheet.timesheet_menu_root\",\"industry_fsm.fsm_menu_root\",\"planning.planning_menu_root\",\"helpdesk.menu_helpdesk_root\",\"website.menu_website_configuration\",\"website_slides.website_slides_menu_root\",\"social.menu_social_global\",\"marketing_automation.marketing_automation_menu\",\"mass_mailing.mass_mailing_menu_root\",\"mass_mailing_sms.mass_mailing_sms_menu_root\",\"event.event_main_menu\",\"survey.menu_surveys\",\"purchase.menu_purchase_root\",\"stock.menu_stock_root\",\"mrp.menu_mrp_root\",\"mrp_workorder.menu_mrp_workorder_root\",\"quality_control.menu_quality_root\",\"stock_barcode.stock_barcode_menu\",\"maintenance.menu_maintenance_title\",\"repair.menu_repair_order\",\"mrp_plm.menu_mrp_plm_root\",\"account_consolidation.menu_consolidation\",\"sign.menu_document\",\"hr.menu_hr_root\",\"hr_work_entry_contract_enterprise.menu_hr_payroll_root\",\"hr_appraisal.menu_hr_appraisal_root\",\"hr_attendance.menu_hr_attendance_root\",\"hr_recruitment.menu_hr_recruitment_root\",\"hr_referral.menu_hr_referral_root\",\"fleet.menu_root\",\"hr_holidays.menu_hr_holidays_root\",\"hr_expense.menu_hr_expense_root\",\"lunch.menu_lunch\",\"im_livechat.menu_livechat_root\",\"data_recycle.menu_data_cleaning_root\",\"approvals.approvals_menu_root\",\"whatsapp.whatsapp_menu_main\",\"iot.iot_menu_root\",\"base.menu_management\",\"base.menu_tests\",\"base.menu_administration\"]"
}
```
Forward-Port-Of: odoo/odoo#155902This update fixes an issue where discounts applied across multiple orders were leading to inaccurate report totals. The system now calculates the total amount for each product line and then sums those totals, ensuring accurate calculations regardless of how many times a product with a discount is ordered. This improves the reliability of sales reports.
Original PR description
Before this commit, if a product had a discount applied in two different orders, it could lead to incorrect calculations in the report For instance, if a product priced at 14.45 had a 30% discount…
Before this commit, if a product had a discount applied in two different orders, it could lead to incorrect calculations in the report For instance, if a product priced at 14.45 had a 30% discount applied, the discounted value would be 10.115, which rounds to 10.12. However, if there were two orders with the same discount, the report calculation would count the quantity of a product with the same discount and calculate the product total amount in one place. This would result in a discounted value of 10.115 * 2 = 20.23, while in the two different orders we had two 10.12 which sums to 20.24. With this commit, the calculation method has been changed. Now, the product amount total for each line is calculated first, and then the sum of these amounts is used to calculate the total for all of the orders. This change ensures accurate computation of the product total sum when discounts are applied across multiple orders. opw-3721376 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#156044 Forward-Port-Of: odoo/odoo#155899
This update ensures that expired promotion programs are no longer applied in the Point of Sale system. The issue stemmed from a recent code change that didn't properly handle date formats, allowing outdated promotions to be used. This fix improves the accuracy of promotions and prevents potential revenue loss.
Original PR description
Before this commit, an expired promotion program could still be used. This issue arose due to a recent refactoring, which resulted in the 'date_to' and 'date_from' fields not being properly converted to date format. opw-3782490 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a usability issue where the image crop tool wouldn't work correctly when images were partially visible on the website editor. The change ensures the image is scrolled to a visible position before cropping, allowing users to accurately adjust image sizes and ensuring the crop widget functions as intended.
Original PR description
Steps to reproduce: - Go to a website page (in "edit" mode) > Add a "Text Image" block > Add other blocks before and after the snippet so you can scroll the page content. - Scroll in a way that makes only a part of the image visible. - Select the image and click on the "Crop" button > The crop widget is applied to the image in its current position (partially visible), which makes it impossible to crop it correctly. The goal of this commit is to prevent the issue described above by simply scrolling to a position that allows to correctly edit the image before applying the crop widget and also allowing the widget element to scroll when trying to crop an image that overflows the current viewport. task-3420186 Forward-Port-Of: odoo/odoo#155094 Forward-Port-Of: odoo/odoo#152440
This update resolves an issue where users received an error when reconciling payments after changing the outstanding receipts account in the bank journal. The fix ensures the system correctly handles updates to payment accounts, preventing reconciliation failures. This improves the reliability of payment processing.
Original PR description
When having reconciled a payment with an invoice after having changed the outstanding receipts account on the bank journal, we get an error when unreconciliing the payment and the move. Steps: - Create two new outstanding receipts accounts X and Y - Set X as outstandings receipts account on the Bank journal - Create a manual customer payment P for $100, confirm - On Bank journal, change the outstanding receipts account from X to Y - Create and confirm an invoice for $100 - Reconcile with payment P from the widget - Unreconcile or reset invoice to draft -> Error: "Journal Entry %s is not valid. In order to proceed, the journal items must include one and only one outstanding payments/receipts account." This is a fw port of https://github.com/odoo/odoo/pull/149285 which is not needed in 16, and needed here only where we reset move to draft/unreconcile opw-3659092 Forward-Port-Of: odoo/odoo#155558
This update fixes an issue where the shipping price wasn't correctly recalculated when a customer changed their shipping address during checkout. Now, the system automatically updates the shipping rate in the order badge after the address is modified, ensuring accurate delivery costs for customers. This improves the overall checkout experience and prevents potential order errors.
Original PR description
Steps to reproduce: 1) Configure a carrier with 3d party api(for ex. fedex) 2) Create 2 shipping addresses(better to choose addresses with different delivery rates) 3) Go to /shop and add product that needs to be delivered 4) Proceed to checkout choosing a shipping address and a carrier 5) See the calculated rate 6) Click on 'edit' near the addresses and change the address 7) Click 'confirm' and observe that a new rate on the badge is not applied to the order After this commit the rate is recalculated and updated when the shipment address is changed. opw-3737266 Forward-Port-Of: odoo/odoo#155943 Forward-Port-Of: odoo/odoo#155170
This update moves the 'Kode Transaksi' field from the accounting tab to the tax field within the customer contact view. This ensures the sales team can easily access and utilize this critical field for sales transactions, improving workflow efficiency. The change addresses a previous limitation where the field was hidden from the sales team.
Original PR description
Currently the field `Kode Transaksi` can be found inside the accounting tab. This fix will move it under the tax field. `Kode Transaksi` is a field that should be used in the sale flow and is…
Currently the field `Kode Transaksi` can be found inside the accounting tab. This fix will move it under the tax field. `Kode Transaksi` is a field that should be used in the sale flow and is currently unavailabe for sales team. Steps to reproduce: ------------------- * Install **l10n_id** * Create a company with indonesian localization * Switch to that company * Creat a contact * Toggle the checkbox next to `Tax ID` * Under the `Accounting` tab, you can find `Kode transaksi`. Sales team don't have access to the accounting tab, and thus not to `Kode transaksi` either. Why the fix: ------------ Technically what we want here is to have the field for `Kode Transaksi` after the `vat` field from this view https://github.com/odoo/odoo/blob/04593b265b765f7a6ee079f21bad6a1cf0e5d094/odoo/addons/base/views/res_partner_views.xml#L205-L210 Two possible solutions for this fix: * Fetch the path to `group/group` and put the field inside. * Fetch the path to the `vat` field and put the field after. This would also require to change the priority of the view starting from saas-16.3 because the `vat` field is being moved in this view: https://github.com/odoo/odoo/blob/8ccde3f101cdb6ca41fe29cc5b4252f13745774a/addons/base_vat/views/res_partner_views.xml#L14-L18 By changing the priority, it would allow for `Kode transaksi` to be place after the `vat_vies_container`. Else it would be inside, which does not make sense inthis case. opw-3731357 Forward-Port-Of: odoo/odoo#156005 Forward-Port-Of: odoo/odoo#155515
This update ensures that taxes are calculated consistently regardless of their order on an invoice. Previously, the order in which taxes were applied could lead to different totals. This fix introduces a standardized sorting method to guarantee accurate tax calculations for all invoices.
Original PR description
**Issue Description**: Currently, the order in which taxes are applied can vary based on the sequence they are entered in the invoice's Taxes field. This inconsistency arises when the tax list is not…
**Issue Description**: Currently, the order in which taxes are applied can vary based on the sequence they are entered in the invoice's Taxes field. This inconsistency arises when the tax list is not manually adjusted, leading to each tax having an identical sequence value. As a result, their hierarchy within the `flatten_taxes_hierarchy` function is determined by their input order rather than a defined sequence, causing unpredictable tax calculations. https://github.com/odoo/odoo/blob/56666f8f7858fcbcce466d2240135b35509d2d96/addons/account/models/account_tax.py#L611-L632 A tax sequence should be explicitly defined, and in cases where sequences are identical, organization by tax ID should be enforced. **Steps to Reproduce**: 1. Navigate to the `Account` or `Invoice` app. 2. Go to `Configuration > Taxes`. 3. Create a new tax with the advanced option `Affect Base of Subsequent Taxes` and specify an amount. 4. Generate a new invoice and add a line item priced at 100. 5. Apply taxes in the `Taxes` column in the following order: 15% followed by the newly created tax, and note the total amount. 6. Repeat step 5, but reverse the order of the taxes. 7. Observe that the total amounts differ between the two sequences. **Proposed Solution**: To ensure that taxes are applied consistently regardless of input order, we will modify the `flatten_taxes_hierarchy` function to add sorting by id. If the sequences are identical, the sorting will depend only on the id, otherwise it will be based on the sequence. This setting ensures a predictable and logical process for applying taxes. opw-3691765 Forward-Port-Of: odoo/odoo#156031 Forward-Port-Of: odoo/odoo#154167
This update fixes an issue where barcode searches in Point of Sale were returning multiple product matches due to a fuzzy lookup. The change now directly matches the barcode, eliminating confusion and ensuring accurate product selection. This improves the user experience and reduces errors during sales transactions.
Original PR description
Before this commit, searching with a barcode could return multiple products due to the fuzzy lookup, as barcodes often have similar patterns. This could lead to confusion and incorrect product selection. To resolve this issue, this commit excludes the barcode from the fuzzy lookup and instead matches it directly. opw-3758356 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an error that prevented users from applying for jobs after removing the LinkedIn profile field. The change ensures the application form can be submitted if either the LinkedIn or resume field has a value, providing a smoother user experience. This resolves a technical issue impacting job applications.
Original PR description
### Steps to reproduce: - Install **website_hr_recruitment** module. - Go to **Recruitment** app. - Click on **Job Page** button on one of the position cards. - Click on **Apply Now!** button. -…
### Steps to reproduce:
- Install **website_hr_recruitment** module.
- Go to **Recruitment** app.
- Click on **Job Page** button on one of the position cards.
- Click on **Apply Now!** button.
- Click on **Edit** in the upper right corner.
- Remove the LinkedIn Profile, then save.
- Click on **I'm feeling lucky** button to apply the form.
- An error is raised indicating that `Cannot read properties of undefined (reading 'trim')`
### Investigation:
- the linkedin field is grabbed by `const $linkedin_profile = $('#recruitment4');`
- and then is used to check the condition `$linkedin_profile.val().trim() === ''`
- but since the field no longer exists, the `$linkedin_profile.val()` is undefined and hence the error is raised
### The Fix
- The functionality is to allow to apply the form if _**at least one**_ of the **linkedin** or **resume** fields is non-empty
- we a field as empty if it:
- doesn't exists
- exists but is value-empty
opw-3754506
Forward-Port-Of: odoo/odoo#155336A bug causing an infinite loop in the Trial Balance report has been resolved. The fix prevents recursive loops within account groups, ensuring the report calculates correctly. This improves the stability and reliability of financial reporting.
Original PR description
# Issue: Infinite loop in Trial Balance. # Analyze: The infinite loop is due to account_reports.models.account_report.AccountReport.get_account_codes `while group:` loop if a recursion exist in group.parent_id there is an infinite loop. # Fix: Ensure the no recursion constrains on parent_id in account_reports. # Related tasks: opw-3665256 opw-3700368 Forward-Port-Of: odoo/odoo#156321 Forward-Port-Of: odoo/odoo#150171