Wednesday, November 27, 2024
8 changes · 18.0
Enhancements to existing features
The mail chat interface has been visually refined with larger, rounder chat windows, subtler controls, clearer message timing, and improved separators and banners. These updates make conversations easier to scan and reduce visual clutter without changing the underlying messaging workflow.
Original PR description
- chat windows are larger, removed option to resize chat windows - chat window header commands: compacter, less visible - message actions: less visible when not hovered, no border on click - new message banner slightly smaller and warning style, text bolder - HH:mm on non-squashed message for datetime - slightly smaller and less visible datetime on message - horizontal padding on date section and new message separator - date section has shorter month name - chat window is rounder, bottom is rounded too - jump to present button reduced border opacity + shadow-sm added Backport of https://github.com/odoo/odoo/pull/187654 Before  After 
Odoo can now retrieve official exchange rates from the Hungarian National Bank. This helps Hungarian companies keep currency rates aligned with their national bank source and reduces manual updates.
Original PR description
Objective
---------
Many countries want to use the official rates provided by their National
Bank in their database. A lot of them were already implemented, and now
it's the turn of the Hungarian National Bank.
Solution
---------
The MNB has implemented a SOAP service to access the latest rates.
The service is available at this address
http://www.mnb.hu/arfolyamok.asmx?wsdl
and the service operation `GetCurrentExchangeRates()`
returns:
```xml
<MNBCurrentExchangeRates>
<Day date="2024-11-20">
<Rate unit="1" curr="AUD">252,78</Rate>
<Rate unit="1" curr="BGN">209,49</Rate>
<Rate unit="1" curr="BRL">67,24</Rate>
...
</Day>
</MNBCurrentExchangeRates>
```
Therefore, we can:
1. Open a Zeep client to communicate with the service
2. Parse the XML and fetch the data (currency, ratio, rates and date).
3. Update the result dict accordingly
task-4320506Resolved issues and error corrections
This fix ensures that when inventory tracking is disabled for a product, the hidden Lot/Serial Number valuation setting is also turned off. This prevents confusing receipt errors that incorrectly ask users to enter serial numbers for products that are no longer tracked.
Original PR description
**Steps to reproduce the bug:**
- Create a storable product “P1”:
- Set it to be tracked by Serial Number (SN).
- Enable Valuation by Lot/SN.
- Save.
- Disable inventory tracking.
**Problem:**
The Valuation by Lot/SN option becomes invisible but is not actually disabled. For example, when processing a receipt, a user error occurs, requiring a serial number to be set.
opw-4330877This fix prevents an error when a point of sale receipt printer connected through an IoT box is unavailable and staff choose browser printing instead. The receipt should now open the browser print dialog as expected, helping sales continue without interruption.
Original PR description
Introduced in #184138. When you try to print a receipt using an IoT box that isn't available, there is the option to print using the browser as a fallback. However, clicking this option produces a traceback. Steps to reproduce: - Configure a POS to use an IoT Box Receipt Printer (e.g. the default [Shop] Receipt Printer) - Make sure the IoT box is not reachable - Make an order and try to print the receipt, it should fail and the dialog will appear asking if you would like to use the web printer - Select OK, and a traceback will appear Expected behaviour: - There is no traceback and the browser printing dialog appears --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that could stop users from sending point-of-sale receipts through WhatsApp. The receipt-sending flow now handles the expected receipt image information correctly, helping staff share receipts without interruption.
Original PR description
Currently, an exception is generated when the user tries to send a POS order receipt on WhatsApp. Error ``` TypeError: PosOrder.action_sent_receipt_on_whatsapp() takes 3 positional arguments but 4…
Currently, an exception is generated when the user tries to send a POS order receipt on WhatsApp.
Error
```
TypeError: PosOrder.action_sent_receipt_on_whatsapp() takes 3 positional arguments but 4 were given
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
```
This is because of the recent refacre code with the commit [1]. method `_sendReceiptToCustomer` calls Python RPC where 4 arguments passed see [2], but the Python method was not dapted with chages of commit [1].
This commit fixes the above issue by setting `ticket_image` and `basic_image` as optional arguments and adapting the Python method according to these changes.
[1] - https://github.com/odoo/odoo/commit/47ec8957334aa37fd9b1d2267681fbd44064809f
[2] - https://github.com/odoo/odoo/blob/2eec78d10380893bd9dbfcef407de50c231cc3bb/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.js#L111-L116
sentry-5662499209
Related ent PR- https://github.com/odoo/enterprise/pull/74145Scanning a package during an internal transfer now uses the package's actual stock location instead of the broader source location. This prevents validation errors when packages are stored in sublocations and makes barcode transfers more reliable.
Original PR description
### Before this PR: If you create new internal transfer with src location WH/Stock and than you scan a package that is on a sublocation of WH/Stock , the source location on the line is not set as the location of the package so when you validate in this situation an error pops because Odoo try to take the package from a different location of the package ### After this PR: The right location id is taken from the stock.quant and put on the line created
Users can now create loans with a 0% interest rate without running into an error during calculation. This helps accounting teams accurately record interest-free loans and avoids a blocker in the loan setup process.
Original PR description
Problem: Users are not allowed to set a zero interest rate on a loan. Steps to reproduce: 1. Go to accounting accounting > loans > new 2. Set any name and any amount in the borrowed field 3. Click on Calculate 4. Set interest rate to 0% and click Apply Explication: The library we were using "loanpy" does not handle the case where the interest rate is zero if the loan_type is `annuity`, and we ended up dividing zero by zero, throwing an error. The fix: If the interest is zero, we override the loan's type from `annuity` (the default) to `linear`, as the linear formula is better suited for the zero interest case. opw-4298272
Fixes an issue that caused an error when sending point-of-sale receipts to customers through WhatsApp. This restores the expected receipt sharing flow for cashiers and avoids failed customer communications after checkout.
Original PR description
Currently, an exception is generated when the user tries to send a POS order receipt on WhatsApp. error: ``` TypeError: PosOrder.action_sent_receipt_on_whatsapp() takes 3 positional arguments but 4…
Currently, an exception is generated when the user tries to send a POS order receipt on WhatsApp.
error:
```
TypeError: PosOrder.action_sent_receipt_on_whatsapp() takes 3 positional arguments but 4 were given
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
```
This is because of the recent refacre code with the commit [1]. method `_sendReceiptToCustomer` calls Python RPC where 4 arguments passed see [2] but the method `action_sent_receipt_on_whatsapp` of `whatsapp_pos' is not dapted with chages of commit [1].
This commit will fix the above issue by adapting arguments when calling `action_sent_receipt_on_whatsapp`.
[1] - https://github.com/odoo/odoo/commit/47ec8957334aa37fd9b1d2267681fbd44064809f
[2] - https://github.com/odoo/odoo/blob/2eec78d10380893bd9dbfcef407de50c231cc3bb/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt_screen.js#L111-L116
sentry-5662499209
Related community PR - https://github.com/odoo/odoo/pull/187829