Friday, May 23, 2025
3 changes · saas-17.4
Resolved issues and error corrections
Users can now update an existing course review without hitting an error. This ensures the review shown in the course discussion area reflects the latest feedback, improving reliability for learners and course managers.
Original PR description
**Before this PR:** The review message in the chatter does not update when editing a review. **Technical**- When clicking the Update Review button, a validation error occurs on the backend. From commit https://github.com/odoo/odoo/commit/e6638d17dc8bfb4b29a58c1644aa1f5fedd61408, "rating_value" is handled using post_data in the '_prepareMessageData' function for the 'mail_update_message' method. As a result, "rating_value" is not available in the 'portal_chatter_post' method. https://youtu.be/ce0jxDx2FZM **After this PR:** The review message in the chatter is now updated when editing a review. **Task**-4677251
This fix automatically matches customer-account charges and repayments made through Point of Sale. It prevents settled POS amounts from incorrectly appearing as available credit for other invoices, reducing billing confusion for customers and staff.
Original PR description
### Problem: When paying a PoS order using customer account, an account move line debiting Account Receivable will be created. Settling this amount inside the PoS (by depositing money) will create…
### Problem:
When paying a PoS order using customer account, an account move line debiting Account Receivable will be created. Settling this amount inside the PoS (by depositing money) will create another account move line crediting Account Receivable (represents the payment). The second move line is considered, by Odoo, as an outstanding amount, and this amount can be used to pay another invoice (sale order invoice). The moves affecting Account Receivable are still correct. However, unreconciling the two lines created from PoS will cause a confusion for clients who may use this amount to pay other invoices.
This PR covers versions 17.4 to 18.1, as reconciliation logic differs in later versions.
### How to reproduce:
* Open a PoS session.
* Create an order and pay using customer account.
* Settle this customer's account (inside PoS).
* Create a Sale Order and invoice it (or just an invoice).
* The amount settled can be used as outstanding amount and can be used to pay the created invoice.
opw-4794793
enterprise PR: https://github.com/odoo/enterprise/pull/85900This fix prevents upgrades from failing when purchase order budget analytics contain invalid account references. Invalid entries are now ignored during recalculation, helping affected databases complete upgrades reliably without disrupting valid budget data.
Original PR description
During upgrade to > `saas~17.3`[^1], when recomputing `analytic_json` column of `purchase.order.line` it is causing issue if there is `purchase_order_line` with non integer key on…
During upgrade to > `saas~17.3`[^1], when recomputing `analytic_json` column of `purchase.order.line` it is causing issue if there is `purchase_order_line` with non integer key on `analytic_distribution` column. It will cause issue while browsing the **account.analytic.account**'s.
For fixing the issue we filter out them in compute method. There are 6 failing dbs in upgrade process from <= `17.0` to >= `18.0` Example of traceback happening in upgrades:
```
File "/tmp/tmpkhlenpcn/migrations/account_budget/saas~17.3.1.0/post-recompute.py", line 5, in migrate
util.recompute_fields(cr, "purchase.order.line", ["analytic_json"])
File "/tmp/tmpkhlenpcn/migrations/util/orm.py", line 248, in wrapper
return f(*args, **kwargs)
File "/tmp/tmpkhlenpcn/migrations/util/orm.py", line 304, in recompute_fields
recompute(records)
File "/tmp/tmpkhlenpcn/migrations/util/orm.py", line 218, in recompute
(
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 843, in _recompute_all
self[field.model_name]._recompute_field(field)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 7340, in _recompute_field
field.recompute(records)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1463, in recompute
apply_except_missing(self.compute_value, recs)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1436, in apply_except_missing
func(records)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 1485, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 5280, in _compute_field_value
fields.determine(field.compute, self)
File "/home/odoo/src/odoo/18.0/odoo/fields.py", line 110, in determine
return needle(*args)
File "/home/odoo/src/enterprise/18.0/account_budget/models/purchase_order_line.py", line 18, in _compute_analytic_json
for analytic_account in self.env['account.analytic.account'].browse(map(int, analytic_account_ids.split(","))).exists():
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 6222, in browse
ids = tuple(ids)
ValueError: invalid literal for int() with base 10: 'false'
```
Example from problematic case:
```SQL
> SELECT analytic_distribution
FROM purchase_order_line
WHERE analytic_distribution::text
ILIKE '%false%'
+-----------------------+
| analytic_distribution |
|-----------------------|
| {"false": 100.0} |
| {"false": 100.0} |
| {"false": 100.0} |
| {"false": 100.0} |
| {"false": 100.0} |
| {"false": 100.0} |
| {"false": 100.0} |
+-----------------------+
```
[^1]: https://github.com/odoo/upgrade/blob/b9963ce87005782a4182011e8238b36a900027d5/migrations/account_budget/saas~17.3.1.0/post-recompute.py#L5