diff options
| author | Ivan Yelizariev <iel@odoo.com> | 2020-12-07 12:35:49 +0000 |
|---|---|---|
| committer | Ivan Yelizariev <iel@odoo.com> | 2020-12-07 14:12:51 +0000 |
| commit | e669ea8a6a79fdf7e309b3191c9648c60179d195 (patch) | |
| tree | 87ff0e7c62533ab228af75e7c1db3c12f1229ca3 /addons/pos_cache/controllers/main.py | |
| parent | 61436e861eabada1608529f3f0da09681d09b3e8 (diff) | |
[FIX] pos_cache: make it compatible with onboarding tool
STEPS:
* install pos_cache in clean database without demo
* open pos
* click OK on popup "Would you like to load demo data"
closes odoo/odoo#62955
Before: error, products are not loaded even after refreshing
After: no errors, products are loaded
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Diffstat (limited to 'addons/pos_cache/controllers/main.py')
| -rw-r--r-- | addons/pos_cache/controllers/main.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/pos_cache/controllers/main.py b/addons/pos_cache/controllers/main.py new file mode 100644 index 00000000000..ac17d4fd891 --- /dev/null +++ b/addons/pos_cache/controllers/main.py @@ -0,0 +1,12 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from odoo.addons.point_of_sale.controllers.main import PosController +from odoo import http +from odoo.http import request + + +class PosCache(PosController): + + @http.route() + def load_onboarding_data(self): + super().load_onboarding_data() + request.env["pos.cache"].refresh_all_caches() |
