增加平板扫码功能

This commit is contained in:
mgw
2023-04-24 16:00:08 +08:00
parent 9300073be4
commit 21f7f55ae8
83 changed files with 309 additions and 272 deletions

View File

@@ -0,0 +1,22 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="9">
<item index="0" class="java.lang.String" itemvalue="httpx" />
<item index="1" class="java.lang.String" itemvalue="aliyun-python-sdk-dysmsapi" />
<item index="2" class="java.lang.String" itemvalue="setuptools-rust" />
<item index="3" class="java.lang.String" itemvalue="xlutils" />
<item index="4" class="java.lang.String" itemvalue="aliyun-python-sdk-core-v3" />
<item index="5" class="java.lang.String" itemvalue="wheel" />
<item index="6" class="java.lang.String" itemvalue="numpy" />
<item index="7" class="java.lang.String" itemvalue="numpy-stl" />
<item index="8" class="java.lang.String" itemvalue="pyqt5" />
</list>
</value>
</option>
</inspection_tool>
</profile>
</component>

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

8
sf_global_search/.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sh_global_search.iml" filepath="$PROJECT_DIR$/.idea/sh_global_search.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,26 @@
About
============
A global search used to search any object based on the configuration. You can search all object's data easily. You can also configure one to many fields. The "Global Search" is visible to all odoo users. The search box is available at the top of the menu. Search results on click redirect to that record on the new tab. You can easily perform a search on multi-company objects also we have beautifully show company name before so you can see search results related to that company, we have show object (model) nicely whenever you have search query found in multiple objects, you can very easily see the difference of different objects. It also takes care of access rights of users, if a user doesn't have any object access than it will not show that record in search results. if the user has multi-company enabled than it shows multi-company results. We have made this looks fully configurable you can easily configure what is an important object(model) and related fields of that object(model), We have made security groups for this configurations so only who have right that user only can configure this global search objects and fields, All internal users can use this global search feature. Cheers!
User Guide
============
Blog: https://www.softhealer.com/blog/odoo-2/post/global-search-531
Installation
============
1) Copy module files to addon folder.
2) Restart odoo service (sudo service odoo-server restart).
3) Go to your odoo instance and open apps (make sure to activate debug mode).
4) click on update app list.
5) search module name and hit install button.
Any Problem with module?
=====================================
Please create your ticket here https://softhealer.com/support
Softhealer Technologies Doubt/Inquiry/Sales/Customization Team
=====================================
Skype: live:softhealertechnologies
What's app: +917984575681
E-Mail: support@softhealer.com
Website: https://softhealer.com

View File

@@ -0,0 +1,3 @@
# Copyright (C) Softhealer Technologies.
from . import models

View File

@@ -0,0 +1,44 @@
# Part of Softhealer Technologies.
{
"name": "机企猫 全局扫码搜索",
"author": "jikimo",
"website": "https://www.softhealer.com",
"version": "16.0.1",
"license": "OPL-1",
"support": "support@softhealer.com",
"category": "Extra Tools",
"summary": "sf_global_search",
"description": """
A global search used to search any object based on the configuration. You can search all object's data easily. You can also configure one to many fields. The "Global Search" is visible to all odoo users. The search box is available at the top of the menu. Search results on click redirect to that record on the new tab. You can easily perform a search on multi-company objects also we have beautifully show company name before so you can see search results related to that company, we have show object (model) nicely whenever you have search query found in multiple objects, you can very easily see the difference of different objects. It also takes care of access rights of users, if a user doesn't have any object access than it will not show that record in search results. if the user has multi-company enabled than it shows multi-company results. We have made this looks fully configurable you can easily configure what is an important object(model) and related fields of that object(model), We have made security groups for this configurations so only who have right that user only can configure this global search objects and fields, All internal users can use this global search feature. Cheers!""",
"depends": ['base_setup', 'web'],
"data": [
"security/base_security.xml",
"security/ir.model.access.csv",
"views/global_search_view.xml",
],
'assets': {
'web.assets_backend': [
'sf_global_search/static/src/scss/GlobalSearch.scss',
'sf_global_search/static/src/xml/*.xml',
'sf_global_search/static/src/js/*',
]
},
"images": ["static/description/background.png", ],
"installable": True,
"auto_install": False,
"application": True,
"price": 40,
"currency": "EUR"
}

View File

@@ -0,0 +1,9 @@
16.0.1 (26 Sept 2022)
------------------
- initial release
(8th Nov 2022)
---------------------
- fixed multiple display issue

240
sf_global_search/i18n/ar.po Normal file
View File

@@ -0,0 +1,240 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sh_global_search
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.1alpha1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 10:52+0000\n"
"PO-Revision-Date: 2020-09-28 10:52+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__model_id
msgid "Applies To"
msgstr "ينطبق على"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_company
msgid "Companies"
msgstr "الشركات"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_config_settings
msgid "Config Settings"
msgstr "إعدادات التكوين"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_uid
msgid "Created by"
msgstr "انشأ من قبل"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_date
msgid "Created on"
msgstr "تم إنشاؤها على"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__display_name
msgid "Display Name"
msgstr "اسم العرض"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_enable_menu_search_res_config_settings
msgid "Enable Global Menu Search"
msgstr "تمكين البحث في القائمة العالمية"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__enable_menu_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__enable_menu_search
msgid "Enable Menu Global Search"
msgstr "تمكين قائمة البحث الشامل"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__ttype
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__ttype
msgid "Field Type"
msgstr "نوع الحقل"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__global_field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_ids
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Fields"
msgstr "مجالات"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,help:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "For relationship fields, the technical name of the target model"
msgstr "بالنسبة لحقول العلاقة ، الاسم التقني للنموذج الهدف"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__global_o2m_search_id
msgid "Global O2M Search"
msgstr "بحث O2M العالمي"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_dynamic_action_tree
msgid "Global Search"
msgstr "البحث العالمي"
#. module: sh_global_search
#: model:ir.actions.act_window,name:sh_global_search.sh_dynamic_action_action
#: model:ir.ui.menu,name:sh_global_search.sh_dynamic_action_action_menu
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Global Search Configuration"
msgstr "تكوين البحث العالمي"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
msgid "Global Search M2O Action"
msgstr "البحث العالمي M2O العمل"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Global Search O2M Action"
msgstr "البحث العالمي O2M العمل"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search
msgid "Global search"
msgstr "البحث العالمي"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search_fields
msgid "Global search fields"
msgstr "حقول البحث العالمية"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__id
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__id
msgid "ID"
msgstr "هوية شخصية"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__name
msgid "Label"
msgstr "ضع الكلمة المناسبة"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_company____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "تاريخ آخر تعديل"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_uid
msgid "Last Updated by"
msgstr "آخر تحديث بواسطة"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_date
msgid "Last Updated on"
msgstr "آخر تحديث في"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "M2O Object Fields"
msgstr "حقول كائن M2O"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__model_id
msgid "Model"
msgstr "نموذج"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__main_field_id
msgid "Name Field"
msgstr "حقل الاسم"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "O2M Object Fields"
msgstr "حقول كائن O2M"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_o2m_global_search_fields
msgid "O2m Global search fields"
msgstr "حقول البحث العالمية O2m"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Open Relation Fields"
msgstr "فتح مجالات العلاقات"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__field_id
msgid "Position Field"
msgstr "مجال الموقف"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__global_search_id
msgid "Related Model"
msgstr "النموذج ذو الصلة"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "Relation With"
msgstr "علاقة مع"
#. module: sh_global_search
#. openerp-web
#: code:addons/sh_global_search/static/src/xml/apps.xml:0
#, python-format
msgid "Search ..."
msgstr "بحث ..."
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__sequence
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__sequence
msgid "Sequence"
msgstr "تسلسل"
#. module: sh_global_search
#: model:res.groups,name:sh_global_search.group_global_search
msgid "Show Global Search Configuration"
msgstr "إظهار تكوين البحث العالمي"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search__model_id
msgid "The model this field belongs to"
msgstr "النموذج الذي ينتمي إليه هذا المجال"
#. module: sh_global_search
#: model:res.groups,comment:sh_global_search.group_global_search
msgid "This user will be able to Show Global Search Configuration"
msgstr "سيتمكن هذا المستخدم من إظهار تكوين البحث العالمي"

240
sf_global_search/i18n/de.po Normal file
View File

@@ -0,0 +1,240 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sh_global_search
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.1alpha1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 10:52+0000\n"
"PO-Revision-Date: 2020-09-28 10:52+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__model_id
msgid "Applies To"
msgstr "Gilt für"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_company
msgid "Companies"
msgstr "Unternehmen"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_config_settings
msgid "Config Settings"
msgstr "Konfigurationseinstellungen"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_uid
msgid "Created by"
msgstr "Erstellt von"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_date
msgid "Created on"
msgstr "Erstellt am"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__display_name
msgid "Display Name"
msgstr "Anzeigename"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_enable_menu_search_res_config_settings
msgid "Enable Global Menu Search"
msgstr "Aktivieren Sie die globale Menüsuche"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__enable_menu_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__enable_menu_search
msgid "Enable Menu Global Search"
msgstr "Menü Globale Suche aktivieren"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__ttype
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__ttype
msgid "Field Type"
msgstr "Feldtyp"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__global_field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_ids
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Fields"
msgstr "Felder"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,help:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "For relationship fields, the technical name of the target model"
msgstr "Für Beziehungsfelder der technische Name des Zielmodells"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__global_o2m_search_id
msgid "Global O2M Search"
msgstr "Globale O2M-Suche"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_dynamic_action_tree
msgid "Global Search"
msgstr "Globale Suche"
#. module: sh_global_search
#: model:ir.actions.act_window,name:sh_global_search.sh_dynamic_action_action
#: model:ir.ui.menu,name:sh_global_search.sh_dynamic_action_action_menu
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Global Search Configuration"
msgstr "Globale Suchkonfiguration"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
msgid "Global Search M2O Action"
msgstr "Globale Suche M2O-Aktion"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Global Search O2M Action"
msgstr "Globale Suche O2M-Aktion"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search
msgid "Global search"
msgstr "Globale Suche"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search_fields
msgid "Global search fields"
msgstr "Globale Suchfelder"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__id
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__id
msgid "ID"
msgstr "ICH WÜRDE"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__name
msgid "Label"
msgstr "Etikette"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_company____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "Zuletzt geändert am"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_uid
msgid "Last Updated by"
msgstr "Zuletzt aktualisiert von"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_date
msgid "Last Updated on"
msgstr "Zuletzt aktualisiert am"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "M2O Object Fields"
msgstr "M2O-Objektfelder"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__model_id
msgid "Model"
msgstr "Modell"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__main_field_id
msgid "Name Field"
msgstr "Namensfeld"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "O2M Object Fields"
msgstr "O2M-Objektfelder"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_o2m_global_search_fields
msgid "O2m Global search fields"
msgstr "O2m Globale Suchfelder"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Open Relation Fields"
msgstr "Beziehungsfelder öffnen"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__field_id
msgid "Position Field"
msgstr "Positionsfeld"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__global_search_id
msgid "Related Model"
msgstr "Verwandte Modell"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "Relation With"
msgstr "Beziehung mit"
#. module: sh_global_search
#. openerp-web
#: code:addons/sh_global_search/static/src/xml/apps.xml:0
#, python-format
msgid "Search ..."
msgstr "Suche ..."
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__sequence
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__sequence
msgid "Sequence"
msgstr "Reihenfolge"
#. module: sh_global_search
#: model:res.groups,name:sh_global_search.group_global_search
msgid "Show Global Search Configuration"
msgstr "Globale Suchkonfiguration anzeigen"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search__model_id
msgid "The model this field belongs to"
msgstr "Das Modell, zu dem dieses Feld gehört"
#. module: sh_global_search
#: model:res.groups,comment:sh_global_search.group_global_search
msgid "This user will be able to Show Global Search Configuration"
msgstr "Dieser Benutzer kann die globale Suchkonfiguration anzeigen"

240
sf_global_search/i18n/es.po Normal file
View File

@@ -0,0 +1,240 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sh_global_search
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.1alpha1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 10:52+0000\n"
"PO-Revision-Date: 2020-09-28 10:52+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__model_id
msgid "Applies To"
msgstr "Se aplica a"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_company
msgid "Companies"
msgstr "Compañías"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes de configuración"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_uid
msgid "Created by"
msgstr "Creado por"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_date
msgid "Created on"
msgstr "Creado en"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__display_name
msgid "Display Name"
msgstr "Nombre para mostrar"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_enable_menu_search_res_config_settings
msgid "Enable Global Menu Search"
msgstr "Habilitar la búsqueda de menú global"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__enable_menu_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__enable_menu_search
msgid "Enable Menu Global Search"
msgstr "Habilitar la búsqueda global del menú"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__ttype
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__ttype
msgid "Field Type"
msgstr "Tipo de campo"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__global_field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_ids
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Fields"
msgstr "Campos"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,help:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "For relationship fields, the technical name of the target model"
msgstr "Para los campos de relación, el nombre técnico del modelo de destino"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__global_o2m_search_id
msgid "Global O2M Search"
msgstr "Búsqueda global de O2M"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_dynamic_action_tree
msgid "Global Search"
msgstr "Búsqueda global"
#. module: sh_global_search
#: model:ir.actions.act_window,name:sh_global_search.sh_dynamic_action_action
#: model:ir.ui.menu,name:sh_global_search.sh_dynamic_action_action_menu
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Global Search Configuration"
msgstr "Configuración de búsqueda global"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
msgid "Global Search M2O Action"
msgstr "Acción M2O de búsqueda global"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Global Search O2M Action"
msgstr "Acción O2M de búsqueda global"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search
msgid "Global search"
msgstr "Búsqueda global"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search_fields
msgid "Global search fields"
msgstr "Campos de búsqueda global"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__id
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__id
msgid "ID"
msgstr "CARNÉ DE IDENTIDAD"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__name
msgid "Label"
msgstr "Etiqueta"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_company____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "Última modificación el"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_uid
msgid "Last Updated by"
msgstr "Actualizado por última vez por"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_date
msgid "Last Updated on"
msgstr "Ultima actualización en"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "M2O Object Fields"
msgstr "Campos de objeto M2O"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__model_id
msgid "Model"
msgstr "Modelo"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__main_field_id
msgid "Name Field"
msgstr "Campo de nombre"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "O2M Object Fields"
msgstr "Campos de objeto O2M"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_o2m_global_search_fields
msgid "O2m Global search fields"
msgstr "Campos de búsqueda global de O2m"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Open Relation Fields"
msgstr "Campos de relación abiertos"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__field_id
msgid "Position Field"
msgstr "Campo de posición"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__global_search_id
msgid "Related Model"
msgstr "Modelo relacionada"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "Relation With"
msgstr "Relación con"
#. module: sh_global_search
#. openerp-web
#: code:addons/sh_global_search/static/src/xml/apps.xml:0
#, python-format
msgid "Search ..."
msgstr "Buscar ..."
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__sequence
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__sequence
msgid "Sequence"
msgstr "Secuencia"
#. module: sh_global_search
#: model:res.groups,name:sh_global_search.group_global_search
msgid "Show Global Search Configuration"
msgstr "Mostrar configuración de búsqueda global"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search__model_id
msgid "The model this field belongs to"
msgstr "El modelo al que pertenece este campo"
#. module: sh_global_search
#: model:res.groups,comment:sh_global_search.group_global_search
msgid "This user will be able to Show Global Search Configuration"
msgstr "Este usuario podrá mostrar la configuración de búsqueda global"

240
sf_global_search/i18n/fr.po Normal file
View File

@@ -0,0 +1,240 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sh_global_search
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.1alpha1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 10:52+0000\n"
"PO-Revision-Date: 2020-09-28 10:52+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__model_id
msgid "Applies To"
msgstr "S'applique à"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_company
msgid "Companies"
msgstr "Entreprises"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_uid
msgid "Created by"
msgstr "Créé par"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_date
msgid "Created on"
msgstr "Créé sur"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__display_name
msgid "Display Name"
msgstr "Afficher un nom"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_enable_menu_search_res_config_settings
msgid "Enable Global Menu Search"
msgstr "Activer la recherche de menu global"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__enable_menu_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__enable_menu_search
msgid "Enable Menu Global Search"
msgstr "Activer la recherche globale dans le menu"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__ttype
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__ttype
msgid "Field Type"
msgstr "Type de champ"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__global_field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_ids
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Fields"
msgstr "Des champs"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,help:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "For relationship fields, the technical name of the target model"
msgstr "Pour les champs de relation, le nom technique du modèle cible"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__global_o2m_search_id
msgid "Global O2M Search"
msgstr "Recherche globale O2M"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_dynamic_action_tree
msgid "Global Search"
msgstr "Recherche globale"
#. module: sh_global_search
#: model:ir.actions.act_window,name:sh_global_search.sh_dynamic_action_action
#: model:ir.ui.menu,name:sh_global_search.sh_dynamic_action_action_menu
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Global Search Configuration"
msgstr "Configuration de la recherche globale"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
msgid "Global Search M2O Action"
msgstr "Recherche globale M2O Action"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Global Search O2M Action"
msgstr "Action O2M de recherche globale"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search
msgid "Global search"
msgstr "Recherche globale"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search_fields
msgid "Global search fields"
msgstr "Champs de recherche globale"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__id
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__id
msgid "ID"
msgstr "ID"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__name
msgid "Label"
msgstr "Étiqueter"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_company____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_uid
msgid "Last Updated by"
msgstr "Dernière mise à jour par"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_date
msgid "Last Updated on"
msgstr "Dernière mise à jour le"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "M2O Object Fields"
msgstr "Champs d'objets M2O"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__model_id
msgid "Model"
msgstr "Modèle"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__main_field_id
msgid "Name Field"
msgstr "Champ de nom"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "O2M Object Fields"
msgstr "Champs d'objets O2M"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_o2m_global_search_fields
msgid "O2m Global search fields"
msgstr "Champs de recherche globaux O2m"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Open Relation Fields"
msgstr "Champs de relation ouverts"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__field_id
msgid "Position Field"
msgstr "Champ de position"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__global_search_id
msgid "Related Model"
msgstr "Modèle associé"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "Relation With"
msgstr "Relation avec"
#. module: sh_global_search
#. openerp-web
#: code:addons/sh_global_search/static/src/xml/apps.xml:0
#, python-format
msgid "Search ..."
msgstr "Chercher ..."
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__sequence
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__sequence
msgid "Sequence"
msgstr "Séquence"
#. module: sh_global_search
#: model:res.groups,name:sh_global_search.group_global_search
msgid "Show Global Search Configuration"
msgstr "Afficher la configuration de recherche globale"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search__model_id
msgid "The model this field belongs to"
msgstr "Le modèle auquel ce champ appartient"
#. module: sh_global_search
#: model:res.groups,comment:sh_global_search.group_global_search
msgid "This user will be able to Show Global Search Configuration"
msgstr "Cet utilisateur pourra afficher la configuration de recherche globale"

View File

@@ -0,0 +1,240 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sh_global_search
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.1alpha1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 10:52+0000\n"
"PO-Revision-Date: 2020-09-28 10:52+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__model_id
msgid "Applies To"
msgstr "适用于"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_company
msgid "Companies"
msgstr "公司介绍"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_res_config_settings
msgid "Config Settings"
msgstr "配置设置"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_uid
msgid "Created by"
msgstr "由...制作"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__create_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__create_date
msgid "Created on"
msgstr "创建于"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__display_name
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__display_name
msgid "Display Name"
msgstr "显示名称"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_enable_menu_search_res_config_settings
msgid "Enable Global Menu Search"
msgstr "启用全局菜单搜索"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__enable_menu_search
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__enable_menu_search
msgid "Enable Menu Global Search"
msgstr "启用菜单全局搜索"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__ttype
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__ttype
msgid "Field Type"
msgstr "栏位类型"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__global_field_ids
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_ids
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Fields"
msgstr "领域"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,help:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "For relationship fields, the technical name of the target model"
msgstr "对于关系字段,目标模型的技术名称"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__global_o2m_search_id
msgid "Global O2M Search"
msgstr "全球O2M搜索"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_dynamic_action_tree
msgid "Global Search"
msgstr "全球搜寻"
#. module: sh_global_search
#: model:ir.actions.act_window,name:sh_global_search.sh_dynamic_action_action
#: model:ir.ui.menu,name:sh_global_search.sh_dynamic_action_action_menu
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Global Search Configuration"
msgstr "全局搜索配置"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_m2o_global_search_form
msgid "Global Search M2O Action"
msgstr "全球搜索M2O行动"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_global_search_form
msgid "Global Search O2M Action"
msgstr "全球搜索O2M行动"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search
msgid "Global search"
msgstr "全球搜寻"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_global_search_fields
msgid "Global search fields"
msgstr "全局搜索字段"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__id
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_company__id
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings__id
msgid "ID"
msgstr "ID"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__name
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__name
msgid "Label"
msgstr "标签"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_company____last_update
#: model:ir.model.fields,field_description:sh_global_search.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "最后修改时间"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_uid
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_uid
msgid "Last Updated by"
msgstr "最后更新者"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__write_date
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__write_date
msgid "Last Updated on"
msgstr "最后更新时间:"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "M2O Object Fields"
msgstr "M2O对象字段"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__model_id
msgid "Model"
msgstr "模型"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search__main_field_id
msgid "Name Field"
msgstr "名称栏位"
#. module: sh_global_search
#: code:addons/sh_global_search/models/global_search.py:0
#, python-format
msgid "O2M Object Fields"
msgstr "O2M对象字段"
#. module: sh_global_search
#: model:ir.model,name:sh_global_search.model_o2m_global_search_fields
msgid "O2m Global search fields"
msgstr "O2m全球搜索字段"
#. module: sh_global_search
#: model_terms:ir.ui.view,arch_db:sh_global_search.sh_o2m_dynamic_action_form
msgid "Open Relation Fields"
msgstr "开放关系字段"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__field_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__field_id
msgid "Position Field"
msgstr "位置栏位"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__global_search_id
msgid "Related Model"
msgstr "相关型号"
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__related_model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__model_id
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__related_model_id
msgid "Relation With"
msgstr "与...的关系"
#. module: sh_global_search
#. openerp-web
#: code:addons/sh_global_search/static/src/xml/apps.xml:0
#, python-format
msgid "Search ..."
msgstr "搜索 ..."
#. module: sh_global_search
#: model:ir.model.fields,field_description:sh_global_search.field_global_search_fields__sequence
#: model:ir.model.fields,field_description:sh_global_search.field_o2m_global_search_fields__sequence
msgid "Sequence"
msgstr "顺序"
#. module: sh_global_search
#: model:res.groups,name:sh_global_search.group_global_search
msgid "Show Global Search Configuration"
msgstr "显示全局搜索配置"
#. module: sh_global_search
#: model:ir.model.fields,help:sh_global_search.field_global_search__model_id
msgid "The model this field belongs to"
msgstr "此字段所属的模型"
#. module: sh_global_search
#: model:res.groups,comment:sh_global_search.group_global_search
msgid "This user will be able to Show Global Search Configuration"
msgstr "该用户将能够显示全局搜索配置"

View File

@@ -0,0 +1,3 @@
# Copyright (C) Softhealer Technologies.
from . import global_search

View File

@@ -0,0 +1,462 @@
# Copyright (C) Softhealer Technologies.
from odoo import fields, models, api, _
from odoo.exceptions import UserError
FIELD_TYPES = [(key, key) for key in sorted(fields.Field.by_type)]
from odoo import api, fields, models, _
from odoo.osv import expression
class ResCompany(models.Model):
_inherit = 'res.company'
enable_menu_search = fields.Boolean(
"Enable Menu Global Search", default=True)
start_search_after_letter = fields.Integer(
"Search Start After Letter", default=0)
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
enable_menu_search = fields.Boolean(
related="company_id.enable_menu_search", string="Enable Menu Global Search", readonly=False)
start_search_after_letter = fields.Integer(
related="company_id.start_search_after_letter", string="Search Start After Letter", readonly=False)
class GlobalSearch(models.Model):
_name = 'global.search'
_description = 'Global search'
_rec_name = 'model_id'
model_id = fields.Many2one('ir.model', string='Applies To', required=True, index=True, ondelete='cascade',
help="The model this field belongs to")
field_ids = fields.Many2many(
'ir.model.fields', string='Fields', domain="[('model_id','=',model_id)]")
main_field_id = fields.Many2one('ir.model.fields', string="Name Field",
required=True, domain="[('model_id','=',model_id)]", ondelete='cascade')
global_field_ids = fields.One2many(
'global.search.fields', 'global_search_id', string='Fields ')
@api.model
def get_search_result(self, query):
search_result = {}
if self.env.user.company_id.enable_menu_search:
menu_roots = self.env['ir.ui.menu'].search(
[('parent_id', '=', False)])
menu_data = self.env['ir.ui.menu'].search(
[('id', 'child_of', menu_roots.ids), ('action', '!=', False)])
if menu_data:
menu_data = menu_data._filter_visible_menus()
for menu in menu_data:
if query[0].lower() in menu.complete_name.lower():
search_result['menu| '+menu.complete_name] = {
'id': menu.id, 'action': menu.action.id, 'name': menu.complete_name}
# if company id field is not in model
for search_rec in self.env['global.search'].sudo().search([]):
# All Field List including name field
normal_fields_list = []
m2o_fields_list = []
o2m_fields_list = []
for fields in search_rec.global_field_ids:
field = fields.field_id
if field.ttype in ['char', 'boolean', 'text', 'date', 'datetime', 'float', 'integer', 'selection', 'monetary', 'html']:
normal_fields_list.append(field)
elif field.ttype in ['many2one']:
if search_rec.main_field_id not in m2o_fields_list:
m2o_fields_list.append(search_rec.main_field_id)
m2o_fields_list.append(field)
elif field.ttype in ['one2many']:
o2m_fields_list.append(field)
# Fetch all record of this current model with defined field list
try:
# check company_id field in model
company_id_field = self.env['ir.model.fields'].sudo().search(
[('name', '=', 'company_id'), ('model_id', '=', search_rec.model_id.id)])
if not company_id_field:
if normal_fields_list:
normal_fields = []
domain = []
count = 0
for field_row in normal_fields_list:
field = field_row.name
normal_fields.append(field)
if field != 'display_name':
domain.append((field, 'ilike', query[0]))
else:
count += 1
if normal_fields:
model_obj = self.env[search_rec.model_id.model].search_read(domain, normal_fields, order='id')
for model_rec in model_obj:
for field_row in normal_fields_list:
field = field_row
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data).casefold():
model_rec['model'] = field.model_id.model
model_rec['model_name'] = field.model_id.name
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
search_result[self.env.user.company_id.name+'|'+search_result_record+' > '+field.field_description+' : '+str(
object_data)] = model_rec
if count != 0:
field_list = ['display_name']
model_obj = self.env[search_rec.model_id.model].search_read(
[], field_list, order='id')
for model_rec in model_obj:
if model_rec.get('display_name'):
object_data = model_rec.get('display_name')
if object_data and query[0].lower() in str(object_data).casefold():
model_rec['model'] = search_rec.model_id.model
model_rec['model_name'] = search_rec.model_id.name
search_result[self.env.user.company_id.name+'|'+"Display Name"+' : '+str(
object_data)] = model_rec
if m2o_fields_list:
m2o_fields = []
domain = []
for field_row in m2o_fields_list:
field = field_row.name
m2o_fields.append(field)
domain.append(('%s.name' %(field), 'ilike', query[0]))
model_obj = self.env[search_rec.model_id.model].search_read(domain, m2o_fields, order='id')
for model_rec in model_obj:
for field_row in m2o_fields_list:
field = field_row
if field.name != 'display_name':
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data).casefold():
model_rec['model'] = field.model_id.model
model_rec['model_name'] = field.model_id.name
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
str_object_data = str(
object_data[1])
search_result[self.env.user.company_id.name+'|'+search_result_record+' > ' +
field.field_description+' : '+str_object_data] = model_rec
if o2m_fields_list:
for super_field_row in o2m_fields_list:
field = super_field_row.field_id.name
inside_normal_fields = []
inside_m2o_field_list = []
for o2m_field in super_field_row.field_ids:
field = o2m_field.field_id
if field.ttype in ['char', 'boolean', 'text', 'date', 'datetime', 'float', 'integer', 'selection', 'monetary', 'html']:
inside_normal_fields.append(field)
elif field.ttype in ['many2one']:
inside_m2o_field_list.append(field)
if search_rec.main_field_id not in inside_m2o_field_list:
inside_m2o_field_list.append(search_rec.main_field_id)
if search_rec.main_field_id not in inside_normal_fields:
inside_normal_fields.append(search_rec.main_field_id)
if inside_normal_fields:
normal_fields = []
domain = []
for field_row in inside_normal_fields:
field = field_row.name
normal_fields.append(field)
domain.append((field, 'ilike', query[0]))
model_obj = self.env[search_rec.model_id.model].search_read(domain, normal_fields, order='id')
for model_rec in model_obj:
for field_row in inside_normal_fields:
field = field_row
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data).casefold():
some_id = model_rec['id']
some_record = self.env[super_field_row.model_id.model].browse(some_id)
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
parent_obj = getattr(some_record, super_field_row.field_id.relation_field)
model_rec['model'] = parent_obj._name
model_rec['model_name'] = parent_obj._name.upper()
model_rec['id'] = parent_obj.id
str_object_data = str(
object_data)
search_result[self.env.user.company_id.name+'|'+parent_obj.name+' > ' +
field.field_description+' : '+str_object_data] = model_rec
if inside_m2o_field_list:
m2o_fields = []
domain = []
for field_row in inside_m2o_field_list:
field = field_row.name
m2o_fields.append(field)
domain.append(('%s.name' %(field), 'ilike', query[0]))
model_obj = self.env[search_rec.model_id.model].search_read(domain, m2o_fields, order='id')
for model_rec in model_obj:
for field_row in inside_m2o_field_list:
field = field_row
if field.name != 'display_name':
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data).casefold():
some_id = model_rec['id']
some_record = self.env[super_field_row.model_id.model].browse(some_id)
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
parent_obj = getattr(some_record, super_field_row.field_id.relation_field)
model_rec['model'] = parent_obj._name
model_rec['model_name'] = parent_obj._name.upper()
model_rec['id'] = parent_obj.id
str_object_data = str(
object_data[1])
search_result[self.env.user.company_id.name+'|'+parent_obj.name+' > ' +
field.field_description+' : '+str_object_data] = model_rec
except Exception as e:
print(e)
# if company id field is in model
# All Global Search Records
count = 1
for company in self.env['res.company'].search([]):
print("\n\n\n self.env.context.get('allowed_company_ids')",self.env.context)
# in self.env.context.get('allowed_company_ids')
if company.id:
for search_rec in self.env['global.search'].sudo().search([]):
# All Field List including name field
field_list = []
for field in search_rec.global_field_ids:
field_list.append(field.field_id.name)
if search_rec.main_field_id.name not in field_list:
field_list.append(search_rec.main_field_id.name)
normal_fields_list = []
m2o_fields_list = []
o2m_fields_list = []
external_addition = 0
for fields in search_rec.global_field_ids:
field = fields.field_id
if field.ttype in ['char', 'boolean', 'text', 'date', 'datetime', 'float', 'integer', 'selection', 'monetary', 'html']:
normal_fields_list.append(field)
elif field.ttype in ['many2one']:
m2o_fields_list.append(field)
elif field.ttype in ['one2many']:
o2m_fields_list.append(fields)
if search_rec.main_field_id not in m2o_fields_list:
m2o_fields_list.append(search_rec.main_field_id)
if search_rec.main_field_id not in normal_fields_list:
external_addition += 1
normal_fields_list.append(search_rec.main_field_id)
try:
# check company_id field in model
company_id_field = self.env['ir.model.fields'].sudo().search(
[('name', '=', 'company_id'), ('model_id', '=', search_rec.model_id.id)])
if company_id_field:
if normal_fields_list:
normal_fields = [field_row.name for field_row in normal_fields_list]
domain = []
domain_multi_company = [('company_id', 'in', [company.id,False])]
field_domain = expression.OR([[(field_row.name, 'ilike', query[0])] for field_row in normal_fields_list if field_row.name != 'display_name'])
domain = expression.AND([domain_multi_company, field_domain])
if normal_fields:
model_obj = self.env[search_rec.model_id.model].search_read(domain, normal_fields, order='id')
for model_rec in model_obj:
for field_row in normal_fields_list:
field = field_row
if field.name != 'display_name':
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data).casefold():
model_rec['model'] = field.model_id.model
model_rec['model_name'] = field.model_id.name
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
search_result[company.name+'|'+search_result_record+' > '+field.field_description+' : '+str(
object_data)] = model_rec
if external_addition == 0:
field_list = ['display_name']
model_obj = self.env[search_rec.model_id.model].search_read(
['|', ('company_id', '=', company.id), ('company_id', '=', False)], field_list, order='id')
for model_rec in model_obj:
if model_rec.get('display_name'):
object_data = model_rec.get('display_name')
if object_data and query[0].lower() in str(object_data).casefold():
model_rec['model'] = search_rec.model_id.model
model_rec['model_name'] = search_rec.model_id.name
search_result[company.name+'|'+"Display Name"+' : '+str(
object_data)] = model_rec
if m2o_fields_list:
m2o_fields = [field_row.name for field_row in m2o_fields_list]
domain = []
domain_multi_company = [('company_id', 'in', [company.id,False])]
field_domain = expression.OR([[('%s.name' %(field_row.name), 'ilike', query[0])] for field_row in m2o_fields_list if field_row.name != 'display_name'])
domain = expression.AND([domain_multi_company, field_domain])
model_obj = self.env[search_rec.model_id.model].search_read(domain, m2o_fields, order='id')
for model_rec in model_obj:
for field_row in m2o_fields_list:
field = field_row
if field.name != 'display_name':
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data[1]).casefold():
model_rec['model'] = field.model_id.model
model_rec['model_name'] = field.model_id.name
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
str_object_data = str(
object_data[1])
search_result[company.name+'|'+search_result_record+' > ' +
field.field_description+' : '+str_object_data] = model_rec
if o2m_fields_list:
for super_field_row in o2m_fields_list:
field = super_field_row.field_id.name
inside_normal_fields = []
inside_m2o_field_list = []
for o2m_field in super_field_row.field_ids:
field = o2m_field.field_id
if field.ttype in ['char', 'boolean', 'text', 'date', 'datetime', 'float', 'integer', 'selection', 'monetary', 'html']:
inside_normal_fields.append(field)
elif field.ttype in ['many2one']:
if search_rec.main_field_id not in inside_m2o_field_list:
inside_m2o_field_list.append(search_rec.main_field_id)
inside_m2o_field_list.append(field)
if search_rec.main_field_id not in inside_normal_fields:
inside_normal_fields.append(search_rec.main_field_id)
if inside_normal_fields:
normal_fields = [field_row.name for field_row in inside_normal_fields]
domain = []
domain_multi_company = [('company_id', 'in', [company.id,False])]
field_domain = expression.OR([[(field_row.name, 'ilike', query[0])] for field_row in inside_normal_fields if field_row.name != 'display_name'])
domain = expression.AND([domain_multi_company, field_domain])
model_obj = self.env[super_field_row.related_model_id].search_read(domain, normal_fields, order='id')
for model_rec in model_obj:
for field_row in inside_normal_fields:
field = field_row
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data).casefold():
some_id = model_rec['id']
some_record = self.env[super_field_row.model_id.model].browse(some_id)
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
parent_obj = getattr(some_record, super_field_row.field_id.relation_field)
model_rec['model'] = parent_obj._name
model_rec['model_name'] = parent_obj._name.upper()
model_rec['id'] = parent_obj.id
str_object_data = str(
object_data)
search_result[company.name+'|'+parent_obj.name+' > ' +
field.field_description+' : '+str_object_data] = model_rec
if inside_m2o_field_list:
m2o_fields = [field_row.name for field_row in inside_m2o_field_list]
domain = []
domain_multi_company = [('company_id', 'in', [company.id,False])]
if len(m2o_fields) > 1:
field_domain = expression.OR([[('%s.name' %(field_row.name), 'ilike', query[0])] for field_row in inside_m2o_field_list if field_row.name != 'display_name'])
else:
field_domain = ([('%s.name' %(field_row.name), 'ilike', query[0])] for field_row in m2o_fields)
domain = expression.AND([domain_multi_company, field_domain])
model_obj = self.env[super_field_row.related_model_id].search_read(domain, m2o_fields, order='id')
for model_rec in model_obj:
for field_row in inside_m2o_field_list:
field = field_row
if field.name != 'display_name':
if model_rec.get(field.name):
object_data = model_rec.get(field.name)
if object_data and query[0].lower() in str(object_data[1]).casefold():
some_id = model_rec['id']
some_record = self.env[super_field_row.model_id.model].browse(some_id)
search_result_record = model_rec.get(
search_rec.main_field_id.name) or ''
parent_obj = getattr(some_record, super_field_row.field_id.relation_field)
model_rec['model'] = parent_obj._name
model_rec['model_name'] = parent_obj._name.upper()
model_rec['id'] = parent_obj.id
str_object_data = str(
object_data[1])
search_result[company.name+'|'+parent_obj.name+' > ' +
field.field_description+' : '+str_object_data] = model_rec
except Exception as e:
print(e)
return search_result
class GlobalSearchFields(models.Model):
_name = 'global.search.fields'
_description = 'Global search fields'
global_search_id = fields.Many2one('global.search', string='Related Model')
sequence = fields.Integer(string='Sequence', default=10)
field_id = fields.Many2one(
'ir.model.fields', string='Position Field', ondelete='cascade')
name = fields.Char("Label", related="field_id.field_description")
model_id = fields.Many2one('ir.model', string='Model', ondelete='cascade')
related_model_id = fields.Char(
string='Relation With', related="field_id.relation")
ttype = fields.Selection(
string='Field Type', required=True, related="field_id.ttype")
field_ids = fields.One2many(
'o2m.global.search.fields', 'global_o2m_search_id', string='Fields')
@api.onchange('field_id')
def _onchange_field_id(self):
if self.field_id:
if self.field_id.relation:
model = self.env['ir.model'].sudo().search(
[('model', '=', self.field_id.relation)], limit=1)
if model:
self.model_id = model.id
def sh_o2m_dynamic_action_action(self):
if self.ttype == 'one2many':
view = self.env.ref('sf_global_search.sh_o2m_global_search_form')
return {
'name': _('O2M Object Fields'),
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'global.search.fields',
'views': [(view.id, 'form')],
'view_id': view.id,
'target': 'new',
'res_id': self.id,
}
else:
view = self.env.ref('sf_global_search.sh_m2o_global_search_form')
return {
'name': _('M2O Object Fields'),
'type': 'ir.actions.act_window',
'view_mode': 'form',
'res_model': 'global.search.fields',
'views': [(view.id, 'form')],
'view_id': view.id,
'target': 'new',
'res_id': self.id,
}
class O2MGlobalSearch(models.Model):
_name = 'o2m.global.search.fields'
_description = 'O2m Global search fields'
sequence = fields.Integer(string='Sequence', default=10)
name = fields.Char("Label")
field_id = fields.Many2one(
'ir.model.fields', string='Position Field', ondelete='cascade')
global_o2m_search_id = fields.Many2one(
'global.search.fields', string='Global O2M Search', ondelete='cascade')
model_id = fields.Many2one(
'ir.model', string='Relation With ', ondelete='cascade')
related_model_id = fields.Char(
string='Relation With', related="field_id.relation")
ttype = fields.Selection(
string='Field Type', required=True, related="field_id.ttype")
@api.onchange('field_id')
def _onchange_field_id(self):
if self.field_id:
if self.field_id.ttype in ['one2many', 'many2many']:
raise UserError(
"Field type One2many and Many2many not supported inside O2M wizard !")
self.name = self.field_id.field_description
if self.field_id.relation:
model = self.env['ir.model'].sudo().search(
[('model', '=', self.field_id.relation)], limit=1)
if model:
self.model_id = model.id

View File

@@ -0,0 +1,7 @@
<odoo noupdate="1">
<record id="group_global_search" model="res.groups">
<field name="name">Show Global Search Configuration</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
<field name="comment">This user will be able to Show Global Search Configuration</field>
</record>
</odoo>

View File

@@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_global_search,access_global_search,model_global_search,base.group_user,1,1,1,1
access_global_search_fields,access_global_search_fields,model_global_search_fields,base.group_user,1,1,1,1
access_o2m_global_search_fields,access_o2m_global_search_fields,model_o2m_global_search_fields,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_global_search access_global_search model_global_search base.group_user 1 1 1 1
3 access_global_search_fields access_global_search_fields model_global_search_fields base.group_user 1 1 1 1
4 access_o2m_global_search_fields access_o2m_global_search_fields model_o2m_global_search_fields base.group_user 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,193 @@
/** @odoo-module **/
import { Dropdown } from "@web/core/dropdown/dropdown";
import { DropdownItem } from "@web/core/dropdown/dropdown_item";
import { useService } from "@web/core/utils/hooks";
import { registry } from "@web/core/registry";
import { browser } from "@web/core/browser/browser";
import { symmetricalDifference } from "@web/core/utils/arrays";
import { _t, qweb as QWeb } from "web.core";
import * as BarcodeScanner from "@web/webclient/barcode/barcode_scanner";
const { Component, useState } = owl;
const session = require("web.session");
const rpc = require("web.rpc");
var show_company = false;
session.user_has_group("base.group_multi_company").then(function (has_group) {
show_company = has_group;
});
var start_search_after_letter = 0
export class GlobalSearch extends Component {
setup() {
var self = this;
self.actionService = useService("action")
this._search_def = $.Deferred();
this.show_company = show_company;
this.allowed_company_ids = String(session.user_context.allowed_company_ids)
.split(",")
.map(function (id) {
return parseInt(id);
});
this.current_company = this.allowed_company_ids[0];
rpc.query({
model: "res.company",
method: "search_read",
args: [[["id", "=", self.current_company]], ["start_search_after_letter"]],
}).then(function (data) {
if(data){
if(data && data[0]){
start_search_after_letter = data[0].start_search_after_letter;
}
}
});
}
async on2BarcodeBtnClick() {
const barcode = await BarcodeScanner.scanBarcode();
console.log(barcode);
if (barcode) {
console.log("存在");
const input = document.querySelector('.usermenu_search_input');
if (input) {
input.value = barcode;
}
const event = new KeyboardEvent('keydown', {key: 'Enter'});
input.dispatchEvent(event);
// await this.onBarcodeScanned(barcode);
// if ("vibrate" in browser.navigator) {
// browser.navigator.vibrate(100);
// }
} else {
// console.log("不存在")
// alert('不存在')
this.notification.add(this.env._t("Please, scan again !"), {
type: "warning",
});
}
}
onSearchResultsNavigate(){
this._search_def.reject();
this._search_def = $.Deferred();
setTimeout(this._search_def.resolve.bind(this._search_def), 500);
this._search_def.done(this._searchData.bind(this));
return;
}
_on_click_clear_Search(){
$(".sh_search_input input").val('');
$(".sh_search_results").empty();
}
_searchData() {
var query = $(".sh_search_input input").val();
if (query === "") {
$(".sh_search_container").removeClass("has-results");
$(".sh_search_results").empty();
return;
}
$(".sh_search_results").empty();
var self = this;
if (query.length >=start_search_after_letter) {
rpc.query({
model: "global.search",
method: "get_search_result",
args: [[query]],
}).then(function (data) {
if (data) {
$(".sh_search_results").show();
console.log('data',data)
self._searchableMenus = data;
// var results = fuzzy.filter(query, _.keys(self._searchableMenus), {});
var results = _.keys(self._searchableMenus);
console.log('results',results)
if (results.length === 1) {
// 不显示搜索结果,直接跳转
$(".sh_search_results").hide();
var result = results[0];
console.log('result',result)
var original = self._searchableMenus[result];
console.log('original',original)
// if (original.action) {
// self.do_action(original.action);
// } else if (original.menu_id) {
// self.do_action(original.menu_id);
// }
if (original) {
self.actionService.doAction({
type: "ir.actions.act_window",
res_model: original.model,
res_id: original.id,
views: [[false, "form"]],
target: "current",
flags: { action_buttons: true, headless: true },
});
}
}
$(".sh_search_results").toggleClass("has-results", Boolean(results.length));
$(QWeb.render('MenuSearchResults', {
results: results,
widget:self,
_checkIsMenu: (key) => {
console.log('123',key)
key = key.split("|")[0];
if (key == "menu") {
return true;
} else {
return false;
}
},
_linkInfo: (key) => {
var original = self._searchableMenus[key];
return original;
},
_getFieldInfo: (key) => {
key = key.split("|")[1];
return key;
},
_getcompanyInfo: (key) => {
key = key.split("|")[0];
return key;
},
_linkInfo: (key) => {
var original = self._searchableMenus[key];
return original;
}
})).appendTo($(".sh_search_results"));
}
});
}
}
}
GlobalSearch.template = "GlobalSearch";
GlobalSearch.components = { Dropdown, DropdownItem };
GlobalSearch.toggleDelay = 1000;
export const systrayItem = {
Component: GlobalSearch,
};
registry.category("systray").add("GlobalSearch", systrayItem, { sequence: 1 });

View File

@@ -0,0 +1,89 @@
.sh_search_results {
position: fixed !important;
overflow-x: hidden;
overflow-y: auto;
box-shadow: none;
border: none;
width: 40vw;
z-index: 111;
top: 45px;left: auto;right: 0;
background: #71639e;
max-height: calc(100% - #{$o-navbar-height});
}
.sh_search_results .dropdown-item:hover {
color: #333232;
}
.sh_search_results .dropdown-item:active {
color: #333232;
}
.sh_search_container .sh_search_input .clear_Search:focus{outline: none;}
.sh_search_results .dropdown-item {
color: #fff;
white-space: normal;
word-break: break-word;
}
.sh_search_input {
margin-top: 5px;
}
.sh_search_container {
padding-left: 15px;
padding-right: 15px;
}
.sh_search_input .usermenu_search_input {
background: transparent;
border: none;
border-bottom: 1px solid white;
box-shadow: none;
color: #fff;
border-radius: unset;
}
.sh_search_input .usermenu_search_input::placeholder {
color: #fff;
}
.input-group-text{
background: transparent;
border: none;
border-bottom: 0px solid white;
color: #fff;
border-radius: 0px;
}
.search_company_detail {
border-bottom: 1px solid white;
margin-bottom: 2px;
margin-top: 5px;
color:#fff;
}
.clear_Search {
background: transparent;
border: none;
color: #fff;
border-bottom: 0px solid white;
border-radius: 0px;
}
.barcode-button {
border: none;
background-color: transparent;
}
.barcode-icon {
color: white;
//z-index: 10;
//position: relative;
//top: -10px;
}
.icon-button {
border: none;
color: white;
background-color: transparent;
padding: 0;
}
.sh_search_container .sh_search_input .input-group-prepend{background: transparent;border: none;border-bottom: 1px solid white;padding-top: 5px;}

View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="GlobalSearch" owl="1">
<div>
<div class="sh_search_container form-row align-items-center">
<div class="sh_search_input">
<div class="input-group">
<!-- <div> -->
<!-- <button class="fa fa-qrcode" t-on-click="on2BarcodeBtnClick"></button> -->
<!-- </div> -->
<div class="input-group-prepend">
<!-- <div class="input-group-text"> -->
<!-- <button class="fa fa-qrcode icon-button" t-on-click="on2BarcodeBtnClick"> -->
<button class="icon-button" t-on-click="on2BarcodeBtnClick">
<img src="/sf_global_search/static/src/img/barcode.png" style="width: 20px; height: 20px;"/></button>
</div>
<input type="text" placeholder="Searching ..." t-on-keydown="onSearchResultsNavigate" class="usermenu_search_input form-control"/>
<div class="input-group-prepend">
<button class="clear_Search" t-on-click="_on_click_clear_Search">X</button>
</div>
</div>
</div>
<div class="sh_search_results col-md-10 ml-auto mr-auto"/>
</div>
</div>
</t>
<t t-name="MenuSearchResults" >
<t t-set="count" t-value="0" />
<t t-foreach="results" t-as="result">
<t t-set="is_menu" t-value="_checkIsMenu(result)" />
<t t-set="menu" t-value="_linkInfo(result)" />
<t t-if="is_menu">
<a t-attf-class="dropdown-item col-12 ml-auto mr-auto" target="_blank" t-attf-href="#menu_id=#{menu.id}&amp;action_id=#{menu.action}"><span t-esc="menu.name" /></a>
</t>
<t t-else="">
<t t-if="count==0">
<t t-set="menu_model" t-value="menu.model_name" />
<t t-set="count" t-value="1" />
<p class="search_company_detail">
<t t-set="company_name" t-value="_getcompanyInfo(result)" />
<t t-if="show_company"> <t t-esc="company_name" /> : </t>
<t t-esc="menu_model" />
</p>
</t>
<t t-if="menu.model_name == menu_model">
<t t-set="field_name" t-value="_getFieldInfo(result)" />
<t t-if="show_company &amp; company_name!=_getcompanyInfo(result)">
<t t-set="company_name" t-value="_getcompanyInfo(result)" />
<p class="search_company_detail"><t t-esc="company_name" /> : <t t-esc="menu_model" /></p>
</t>
<a t-attf-class="dropdown-item col-12 ml-auto mr-auto" t-raw="field_name" target="_blank" t-attf-href="/mail/view?model=#{menu.model}&amp;res_id=#{menu.id}" />
</t>
<t t-else="">
<t t-set="menu_model" t-value="menu.model_name" />
<p class="search_company_detail">
<t t-set="company_name" t-value="_getcompanyInfo(result)" />
<t t-if="show_company"> <t t-esc="company_name" /> : </t>
<t t-esc="menu_model" />
</p>
<t t-set="field_name" t-value="_getFieldInfo(result)" />
<a t-attf-class="dropdown-item col-12 ml-auto mr-auto" t-raw="field_name" target="_blank" t-attf-href="/mail/view?model=#{menu.model}&amp;res_id=#{menu.id}" />
</t>
</t>
</t>
</t>
</templates>

View File

@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="sh_enable_menu_search_res_config_settings" model="ir.ui.view">
<field name="name">enable.menu.search</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@data-key='general_settings']" position="inside">
<h2>Enable Global Menu Search</h2>
<div class="row mt16 o_settings_container">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="enable_menu_search" />
</div>
<div class="o_setting_right_pane">
<label for="enable_menu_search" />
<div class="text-muted"></div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane"></div>
<div class="o_setting_right_pane">
<label for="start_search_after_letter" />
<field name="start_search_after_letter" />
<div class="text-muted">
If you enter 3 then search start after 3 letter type in search box. If it is 0 or 1 then search start on single letter typing.
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="sh_o2m_global_search_form" model="ir.ui.view">
<field name="name">sh.dynamic.action.fields.form</field>
<field name="model">global.search.fields</field>
<field name="arch" type="xml">
<form string="Global Search O2M Action">
<sheet>
<group>
<group>
<field name="related_model_id" readonly="1" />
<field name="model_id" invisible="1" />
</group>
</group>
<notebook>
<page string="Fields">
<field name="field_ids">
<tree editable="bottom">
<field name="sequence" widget="handle" />
<field name="field_id" options="{'no_create':True,'no_create_edit':True}" required="1" domain="[('model_id','=',parent.model_id)]" />
<field name="model_id" invisible="1" />
<field name="related_model_id" />
<field name="name" />
<field name="ttype" />
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="sh_m2o_global_search_form" model="ir.ui.view">
<field name="name">sh.global.search.fields.form</field>
<field name="model">global.search.fields</field>
<field name="arch" type="xml">
<form string="Global Search M2O Action">
<sheet>
<group>
<group>
<field name="related_model_id" readonly="1" />
<field name="model_id" invisible="1" />
</group>
</group>
<notebook>
<page string="Fields">
<field name="field_ids">
<tree editable="bottom">
<field name="sequence" widget="handle" />
<field
name="field_id"
options="{'no_create':True,'no_create_edit':True}"
required="1"
domain="[('model_id','=',parent.model_id),('ttype','in',['many2one','char','boolean','date','datetime','text','float','integer','selection','monetary'])]"
/>
<field name="name" />
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="sh_o2m_dynamic_action_form" model="ir.ui.view">
<field name="name">sh.dynamic.action.fields.form</field>
<field name="model">global.search</field>
<field name="arch" type="xml">
<form string="全局搜索配置">
<sheet>
<group>
<group>
<field name="model_id" />
<field name="main_field_id" />
</group>
</group>
<notebook>
<page string="Fields">
<field name="global_field_ids">
<tree editable="bottom">
<field name="sequence" widget="handle" />
<field name="field_id" options="{'no_create':True,'no_create_edit':True}" required="1" domain="[('model_id','=',parent.model_id)]" />
<field name="related_model_id" />
<field name="name" />
<field name="ttype" />
<field name="model_id" invisible="1" />
<button name="sh_o2m_dynamic_action_action" string="Open Relation Fields" type="object" icon="fa-list" attrs="{'invisible':[('ttype','not in',['one2many'])]}" options='{"warn": true}' />
</tree>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="sh_dynamic_action_tree" model="ir.ui.view">
<field name="name">sh.dynamic.action.tree</field>
<field name="model">global.search</field>
<field name="arch" type="xml">
<tree>
<field name="model_id" />
</tree>
</field>
</record>
<record id="sh_dynamic_action_action" model="ir.actions.act_window">
<field name="name">全局搜索配置</field>
<field name="res_model">global.search</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="sh_dynamic_action_action_menu" name="全局搜索配置" sequence="15" action="sh_dynamic_action_action" web_icon="sf_global_search,static/description/icon.png" groups="sf_global_search.group_global_search" />
</data>
</odoo>