Files
odoo_source/addons/pos_cache/controllers/main.py
T
Ivan Yelizariev 4938c84739 [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#63103

Before: error, products are not loaded even after refreshing
After: no errors, products are loaded
X-original-commit: e669ea8a6a79fdf7e309b3191c9648c60179d195
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-09 15:12:53 +00:00

13 lines
377 B
Python

# 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()