Daily updates from Odoo
Thursday, June 6, 2024
8 changes · 17.0
New functionality added to Odoo
The IoTBox homepage now displays a new section showing all connected devices in a table format, making it easier for users to see what hardware is connected to their IoT box. This improvement helps users quickly verify device connectivity and manage their IoT infrastructure.
Original PR description
Added "iot devices" section containing a table displaying all devices connected to iotbox.
Resolved issues and error corrections
This fix corrects how the system matches bank transactions to sales orders when partial payments have been made. Previously, when a bank transaction referenced a sales order, the system would incorrectly try to match it against the remaining invoice balance instead of the actual payment amount, creating confusion about duplicate payments. Now the system properly recognizes existing payments first before attempting invoice reconciliation.
Original PR description
Before, if a bank transaction contain the sale order reference, the reconciliation model will try to reconcile with the invoices created from this sale order but ignore the payment records for those. This leads to situations where it looks like there were two payments on the invoices (one payment record and one bank transaction) while there is just one partial payment. Steps to reproduce: 0/ Have default reconciliation models 1/ Create SO for 100$ and confirm invoice 2/ Partially pay invoice for 70$ 3/ Create bank transaction with SO ref and same partner for 70$ 4/ Match transaction => will match the 30$ residual of the invoice instead of 70$ payment Now, the system will try to reconcile with the payments of those invoices first before considering invoice reconciliation. opw-3904177 Forward-Port-Of: odoo/enterprise#62972
The Paid Time Off Allocation wizard in the Belgian Payroll module was crashing when users selected a department and then a time off type. This fix corrects a problematic database query that was causing the error, and also removes unnecessary subqueries to improve performance.
Original PR description
In the Payroll app with a Belgian company, we can do Reporting > Paid Time Off Allocation. This opens a wizard and if we filled the department then the time off type, the app would crash because of a terrible sql query. Also, the query was doing unnecessary subqueries that have been removed. Task: 3878904 Forward-Port-Of: odoo/enterprise#62293
This fix resolves a system error that occurred when users tried to create invoices for refunded Point of Sale orders in Mexico. The issue was caused by missing data being concatenated with text, which has now been corrected. Users can now successfully process refunds and generate invoices without encountering errors.
Original PR description
When a user tries to validate an invoice of the refunded order a traceback will occur. Steps to produce: - Install 'l10n_mx_edi_pos' module. - Switch to a company whose country code is 'MX'(Mexico).…
When a user tries to validate an invoice of the refunded order a traceback will occur.
Steps to produce:
- Install 'l10n_mx_edi_pos' module.
- Switch to a company whose country code is 'MX'(Mexico).
- Open 'Point of Sale' and New Session.
- Select any products > payment > Select payment method > Invoice > Select customer > Validate.
- Click on 'Next Order'.
- Click on 'Refund and select your order.
- Click on refund > payment > Select payment method > Invoice > Validate.
- Error will be generated.
Traceback on sentry:
```
TypeError: can only concatenate str (not "bool") to str
File "odoo/http.py", line 2252, in __call__
response = request._serve_db()
File "odoo/http.py", line 1828, in _serve_db
return self._transactioning(_serve_ir_http, readonly=ro)
File "odoo/http.py", line 1848, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1826, in _serve_ir_http
return self._serve_ir_http(rule, args)
File "odoo/http.py", line 1833, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2058, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 740, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 42, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 34, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 458, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/saas-17.1/l10n_mx_edi_pos/models/pos_order.py", line 108, in action_pos_order_invoice
action_values = super().action_pos_order_invoice()
File "addons/point_of_sale/models/pos_order.py", line 856, in action_pos_order_invoice
res = self._generate_pos_order_invoice()
File "addons/point_of_sale/models/pos_order.py", line 873, in _generate_pos_order_invoice
move_vals = order._prepare_invoice_vals()
File "addons/pos_sale/models/pos_order.py", line 32, in _prepare_invoice_vals
invoice_vals = super(PosOrder, self)._prepare_invoice_vals()
File "home/odoo/src/enterprise/saas-17.1/l10n_mx_edi_pos/models/pos_order.py", line 150, in _prepare_invoice_vals
vals['l10n_mx_edi_cfdi_origin'] = '03|' + self.refunded_order_id.account_move.l10n_mx_edi_cfdi_uuid
```
This is because 'l10n_mx_edi_cfdi_uuid' is empty at [1] and a string concatenate with it.
link [1]: https://github.com/odoo/enterprise/blob/1502f8b3e519d41f4a58e2acc846f315f6f5eeda/l10n_mx_edi_pos/models/pos_order.py#L150
This commit solves the above issue while checking the existence of
'l10n_mx_edi_cfdi_uuid' while creating the invoice for refund_order
sentry-4935781389
Forward-Port-Of: odoo/enterprise#59873This update fixes a crash in the Belgian financial reports module that occurred when processing partners with missing or invalid VAT numbers. The system now gracefully handles these edge cases instead of failing, ensuring smoother report generation for all partner records regardless of VAT data completeness.
Original PR description
The aim of this commit is to make the code more robust and defensive by handling a bad value for the `vat` field. Context: Partners having a `partner.vat=False` were making the compact function crash. Before the commit: The flow crash even if the value shouldn't be processed. After the commit: The flow is smooth. task-id: None Forward-Port-Of: odoo/enterprise#63865
This fix resolves an issue where spreadsheet files were incorrectly identified when WPS Office is installed on a computer. WPS Office changes how the system recognizes Excel files, causing them to be misidentified. The update ensures that spreadsheet documents are properly recognized regardless of whether WPS Office is present on the system.
Original PR description
On computers where WPS office is installed, the mimetype of office files (eg. .docx, .xslx) the mimetype recognition is altered (at least on linux machines [^1][^2]). The detection of xlsx files in Documents did not account for the specific mimetype set by WPS Office. [^1]: https://forum.puppylinux.com/viewtopic.php?t=2379&i=1 [^2]: https://askubuntu.com/questions/1360278/wps-office-messing-up-mime-types-associated-with-office-documents Task-3915912 Forward-Port-Of: odoo/enterprise#63719 Forward-Port-Of: odoo/enterprise#62100
This fix resolves an issue where the kitchen preparation display was not showing all items when a product was ordered multiple times with internal notes added. Previously, duplicate items with notes would not appear correctly on the display, causing kitchen staff to miss orders. Now all items display properly regardless of whether notes are attached.
Original PR description
Current behavior: When you add a product with an internal note to an order the preparation display is not updated correctly. Steps to reproduce: - Open PoS restaurant session - Add product A, and press Order button - Add product A, add an internal note, and press Order button - Go on the preparation display, there is only one product A opw-3902869
This fix corrects how batch payments calculate the total amount when payments are in different currencies. Previously, the system was not properly converting individual payment amounts to the company's base currency before summing them, resulting in incorrect batch totals. Now batch payments will display the correct total amount regardless of the currencies involved.
Original PR description
Steps to reproduce: - Go to Accounting > Vendor > Payments. - Create one "Send" payment for 500 USD to Abigail Peterson and confirm. - Create one "Send" payment for 500 EUR to Abigail Peterson and confirm. - Go to Accounting > Vendor > Batch Payments. - Create a new batch payment and add the two payments. - Print the batch payment (either Print button or Action > Print Batch Payment) Issue: The sum amount in company currency is not correct Cause: We do not convert the line amount (and we apparently don't want to use the payment amount for reconciliation) opw-3911484 Forward-Port-Of: odoo/enterprise#63857 Forward-Port-Of: odoo/enterprise#62553