diff options
| author | Olivier Dony <odo@openerp.com> | 2016-07-18 02:13:50 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2016-07-18 03:44:38 +0200 |
| commit | fa9782d24d95a4b3d04a04a63ed220f0b60daeda (patch) | |
| tree | c8108dda7fcab091b44905b1253888580620b160 /addons/project/data/web_planner_data.xml | |
| parent | 87e9639a9702b14b0426682962335e972b89e101 (diff) | |
[FIX] website_sale: avoid caching browse_records
The migration of `website_sale` to the new API at revision
788c1334e2cbe26fa26d4c6d4974dc413dbff608
repeated this problem initially fixed by PR #8795.
A browse_record returned by a cached method will be
broken at the next use, because it is bound to a
closed cursor.
The symptom is weird exception in the middle of a future
request:
```OperationalError: Unable to use a closed cursor.```
(which refers to an old cached cursor, not the cursor of the
current request!)
Solution: workaround the problem by returning IDs in the
method that needs to be cached (`_get_pl_partner_order`),
and re-browse them as needed in caller methods.
In addition, remove the useless extra caching of `_get_pl`,
as all it does is browse() the result of the former method,
and that would trigger the very same bug again.
Diffstat (limited to 'addons/project/data/web_planner_data.xml')
0 files changed, 0 insertions, 0 deletions
