Wednesday, November 6, 2024
3 changes · saas-17.4
Resolved issues and error corrections
This fixes an issue where customers could not see or select State/Province options when editing their information in the portal. The change restores the expected dropdown behavior, helping users keep their address details accurate without support assistance.
Original PR description
Steps to reproduce the bug: 1. Go to Website and select My Account 2. Press Edit Information 3. State/Province field doesn't populate The reason why: The state `option` elements are by default all hidden using `display: none`, and in JS we only show the states by the selected country, using JQuery's `show` method. In 17.2, we were hiding the `option` with `style="display:none;"` and that worked well. However, in 17.4, `option` elements were hidden in commit https://github.com/odoo/odoo/commit/da2c32470c63b8a45ddfb3565c158feece33c924 using the bootstrap class `d-none` (to cleanup the code), which also does `display: none`, but adds `!important` to it, making JQuery's `show` method useless. The fix: Manually removing `d-none` class with JQuery's `removeClass`. opw-4275240
This fixes an issue where gift cards bought in Point of Sale were not created or printed when the order was invoiced, especially when gift cards were the only active loyalty program. Businesses can now reliably sell and invoice gift cards without manual backend correction.
Original PR description
When gift card is the only program activated, if you buy a gift card in the PoS and invoice the order. The gift would not be created and not printed Steps to reproduce: ------------------- * Disable all loyalty programs but gift card program * Open PoS and add a gift card to your order * Validate the order and invoice it > Observation: No gift card is printed, if you check in the backend it is not even created Why the fix: ------------ When invoicing the order is synced with the backend before handling the loyalty programs. After synchronising the orders all the local fields are lost. In our case `_e_wallet_program_id` is necessary to create the gift cards. So we try to retrieve it based on the product of the line. opw-4222936 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Purchase orders in currencies different from the company currency can now be printed in bulk without causing an error. This prevents interruptions for purchasing teams when generating documents for multiple international suppliers at once.
Original PR description
The issue: Printing multiple purchase orders with a currency different from the company’s caused a traceback: File "/data/build/odoo/addons/purchase/models/purchase_order.py", line 235, in…
The issue: Printing multiple purchase orders with a currency different from the company’s caused a traceback:
File "/data/build/odoo/addons/purchase/models/purchase_order.py", line 235, in _compute_tax_totals
order.tax_totals['amount_total_cc'] = f"({formatLang(self.env, self.amount_total_cc, currency_obj=self.company_currency_id)})"
File "/data/build/odoo/odoo/fields.py", line 1204, in __get__
record.ensure_one()
File "/data/build/odoo/odoo/models.py", line 5979, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: purchase.order(23, 22)
How to reproduce the issue:
Go to the purchase module, select POs with different currencies, try to print them in bulk.
The issue:
The `amount_total_cc` was computed using the `self` recordset instead of individual records.
opw-4292675
@robodoo fw=no
https://github.com/odoo/odoo/commit/d0e7be7832672d476f1b289af52d3a425990d719#diff-1281da5f4d0a3daaf162a2e6456469537d1b74b8034437783c9c717307aa8fcd changed the way the `_compute_tax_totals` works in 18.0