Skip to content

Commit

Permalink
fixup! fixup! Add shopfloor_shopinvader_base
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk committed Jan 28, 2022
1 parent dc12c3c commit 645439f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shopfloor_shopinvader_base/models/shopfloor_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models

from odoo.addons.component.core import _component_databases

from ..controllers.main import ShopfloorInvaderController


Expand Down Expand Up @@ -37,6 +39,11 @@ def _register_shop_endpoints(self):
self._generate_shop_endpoints(service)
self.env["rest.service.registration"]._register_rest_route(self.shop_api_route)

def _is_component_registry_ready(self):
# TODO: this can be moved to shopfloor_base
comp_registry = _component_databases.get(self.env.cr.dbname)
return comp_registry and comp_registry.ready

def _get_shop_services(self):
if not self._is_component_registry_ready():
return []
Expand Down

0 comments on commit 645439f

Please sign in to comment.