Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][PORT] #622 port from 10.0: force technical user recompute export #677

Merged
merged 2 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion shopinvader_search_engine/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"website": "https://github.com/shopinvader/odoo-shopinvader",
"license": "AGPL-3",
"category": "Generic Modules",
"depends": ["shopinvader", "connector_search_engine"],
"depends": [
"shopinvader",
"connector_search_engine",
"base_technical_user",
],
"data": [
"views/shopinvader_backend_view.xml",
"views/product_view.xml",
Expand Down
6 changes: 4 additions & 2 deletions shopinvader_search_engine/models/shopinvader_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ def _get_default_models(self):

@api.multi
def force_recompute_all_binding_index(self):
self.mapped("se_backend_id.index_ids").force_recompute_all_binding()
self.sudo_tech().mapped(
"se_backend_id.index_ids"
).force_recompute_all_binding()
return True

@api.multi
def force_batch_export_index(self):
for index in self.mapped("se_backend_id.index_ids"):
for index in self.sudo_tech().mapped("se_backend_id.index_ids"):
index.force_batch_export()
return True

Expand Down
1 change: 0 additions & 1 deletion shopinvader_search_engine/tests/__init__.py

This file was deleted.