Browse Source

[MIG] base_search_fuzzy: Upgrade to v10

* Rename manifest
* Update openerp references to odoo
* Bump version
* Upgrade api usages
pull/1290/head
Dave Lasley 8 years ago
committed by Jairo Llopis
parent
commit
d966238147
  1. 3
      base_search_fuzzy/README.rst
  2. 2
      base_search_fuzzy/__manifest__.py
  3. 2
      base_search_fuzzy/i18n/am.po
  4. 2
      base_search_fuzzy/i18n/ar.po
  5. 2
      base_search_fuzzy/i18n/base_search_fuzzy.pot
  6. 2
      base_search_fuzzy/i18n/bg.po
  7. 2
      base_search_fuzzy/i18n/bs.po
  8. 2
      base_search_fuzzy/i18n/ca.po
  9. 2
      base_search_fuzzy/i18n/cs.po
  10. 2
      base_search_fuzzy/i18n/da.po
  11. 2
      base_search_fuzzy/i18n/de.po
  12. 2
      base_search_fuzzy/i18n/el_GR.po
  13. 2
      base_search_fuzzy/i18n/en_GB.po
  14. 2
      base_search_fuzzy/i18n/es.po
  15. 2
      base_search_fuzzy/i18n/es_AR.po
  16. 2
      base_search_fuzzy/i18n/es_CL.po
  17. 2
      base_search_fuzzy/i18n/es_CO.po
  18. 2
      base_search_fuzzy/i18n/es_CR.po
  19. 2
      base_search_fuzzy/i18n/es_DO.po
  20. 2
      base_search_fuzzy/i18n/es_EC.po
  21. 2
      base_search_fuzzy/i18n/es_ES.po
  22. 2
      base_search_fuzzy/i18n/es_MX.po
  23. 2
      base_search_fuzzy/i18n/es_PE.po
  24. 2
      base_search_fuzzy/i18n/es_PY.po
  25. 2
      base_search_fuzzy/i18n/es_VE.po
  26. 2
      base_search_fuzzy/i18n/et.po
  27. 2
      base_search_fuzzy/i18n/eu.po
  28. 2
      base_search_fuzzy/i18n/fa.po
  29. 2
      base_search_fuzzy/i18n/fi.po
  30. 2
      base_search_fuzzy/i18n/fr.po
  31. 2
      base_search_fuzzy/i18n/fr_CA.po
  32. 2
      base_search_fuzzy/i18n/fr_CH.po
  33. 2
      base_search_fuzzy/i18n/gl.po
  34. 2
      base_search_fuzzy/i18n/gl_ES.po
  35. 2
      base_search_fuzzy/i18n/he.po
  36. 2
      base_search_fuzzy/i18n/hr.po
  37. 2
      base_search_fuzzy/i18n/hr_HR.po
  38. 2
      base_search_fuzzy/i18n/hu.po
  39. 2
      base_search_fuzzy/i18n/id.po
  40. 2
      base_search_fuzzy/i18n/it.po
  41. 2
      base_search_fuzzy/i18n/ja.po
  42. 2
      base_search_fuzzy/i18n/ko.po
  43. 2
      base_search_fuzzy/i18n/lt.po
  44. 2
      base_search_fuzzy/i18n/lt_LT.po
  45. 2
      base_search_fuzzy/i18n/lv.po
  46. 2
      base_search_fuzzy/i18n/mk.po
  47. 2
      base_search_fuzzy/i18n/mn.po
  48. 2
      base_search_fuzzy/i18n/nb.po
  49. 2
      base_search_fuzzy/i18n/nb_NO.po
  50. 2
      base_search_fuzzy/i18n/nl.po
  51. 2
      base_search_fuzzy/i18n/nl_BE.po
  52. 2
      base_search_fuzzy/i18n/pl.po
  53. 2
      base_search_fuzzy/i18n/pt.po
  54. 2
      base_search_fuzzy/i18n/pt_BR.po
  55. 2
      base_search_fuzzy/i18n/pt_PT.po
  56. 2
      base_search_fuzzy/i18n/ro.po
  57. 2
      base_search_fuzzy/i18n/ru.po
  58. 2
      base_search_fuzzy/i18n/sk.po
  59. 2
      base_search_fuzzy/i18n/sl.po
  60. 2
      base_search_fuzzy/i18n/sr.po
  61. 2
      base_search_fuzzy/i18n/sr@latin.po
  62. 2
      base_search_fuzzy/i18n/sv.po
  63. 2
      base_search_fuzzy/i18n/th.po
  64. 2
      base_search_fuzzy/i18n/tr.po
  65. 2
      base_search_fuzzy/i18n/tr_TR.po
  66. 2
      base_search_fuzzy/i18n/uk.po
  67. 2
      base_search_fuzzy/i18n/vi.po
  68. 2
      base_search_fuzzy/i18n/vi_VN.po
  69. 2
      base_search_fuzzy/i18n/zh_CN.po
  70. 2
      base_search_fuzzy/i18n/zh_TW.po
  71. 31
      base_search_fuzzy/models/ir_model.py
  72. 18
      base_search_fuzzy/models/trgm_index.py
  73. 4
      base_search_fuzzy/tests/test_query_generation.py
  74. 4
      base_search_fuzzy/views/trgm_index.xml

3
base_search_fuzzy/README.rst

@ -73,7 +73,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.
help us smash it by providing detailed and welcomed feedback.
Credits
=======
@ -89,6 +89,7 @@ Contributors
* Christoph Giesel <https://github.com/christophlsa>
* Jordi Ballester <jordi.ballester@eficent.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
* Dave Lasley <dave@laslabs.com>
Maintainer
----------

2
base_search_fuzzy/__openerp__.py → base_search_fuzzy/__manifest__.py

@ -6,7 +6,7 @@
'name': "Fuzzy Search",
'summary': "Fuzzy search with the PostgreSQL trigram extension",
'category': 'Uncategorized',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'website': 'https://odoo-community.org/',
'author': 'bloopark systems GmbH & Co. KG, '
'Eficent, '

2
base_search_fuzzy/i18n/am.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/ar.po

@ -7,7 +7,7 @@
# SaFi J. <safi2266@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/base_search_fuzzy.pot

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0alpha1\n"
"Project-Id-Version: Odoo Server 10.0alpha1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-06-24 08:47+0000\n"
"PO-Revision-Date: 2016-06-24 08:47+0000\n"

2
base_search_fuzzy/i18n/bg.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/bs.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/ca.po

@ -7,7 +7,7 @@
# Carles Antoli <carlesantoli@hotmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-17 13:11+0000\n"
"PO-Revision-Date: 2017-01-17 13:11+0000\n"

2
base_search_fuzzy/i18n/cs.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/da.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/de.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/el_GR.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/en_GB.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_AR.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_CL.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_CO.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_CR.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_DO.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_EC.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_ES.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_MX.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_PE.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_PY.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/es_VE.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/et.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/eu.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/fa.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/fi.po

@ -7,7 +7,7 @@
# Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/fr.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/fr_CA.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/fr_CH.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/gl.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/gl_ES.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/he.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/hr.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/hr_HR.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/hu.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/id.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/it.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/ja.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/ko.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/lt.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/lt_LT.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/lv.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/mk.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/mn.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/nb.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/nb_NO.po

@ -7,7 +7,7 @@
# Imre Kristoffer Eilertsen <imreeil42@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/nl.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/nl_BE.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/pl.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/pt.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/pt_BR.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/pt_PT.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/ro.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/ru.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/sk.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/sl.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/sr.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/sr@latin.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/sv.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/th.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/tr.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/tr_TR.po

@ -7,7 +7,7 @@
# Ozge Altinisik <ozge@altinkaya.com.tr>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/uk.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/vi.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/vi_VN.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/zh_CN.po

@ -7,7 +7,7 @@
# Jeffery CHEN <jeffery9@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

2
base_search_fuzzy/i18n/zh_TW.po

@ -6,7 +6,7 @@
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Project-Id-Version: Odoo Server 10.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-14 04:21+0000\n"
"PO-Revision-Date: 2017-01-14 04:21+0000\n"

31
base_search_fuzzy/models/ir_model.py

@ -1,11 +1,12 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from openerp import models, api
from openerp.osv import expression
from odoo import _, api, models
from odoo.osv import expression
_logger = logging.getLogger(__name__)
@ -19,23 +20,28 @@ def patch_leaf_trgm(method):
table_alias = '"%s"' % (eleaf.generate_alias())
if operator == '%':
sql_operator = '%%'
params = []
if left in model._columns:
formats = model._columns[left]._symbol_set[0]
if left in model._fields:
column = '%s.%s' % (table_alias, expression._quote(left))
query = '(%s %s %s)' % (column, sql_operator, formats)
elif left in expression.MAGIC_COLUMNS:
query = '(%s %s %s)' % (
column,
sql_operator,
model._fields[left].column_format,
)
elif left in models.MAGIC_COLUMNS:
query = "(%s.\"%s\" %s %%s)" % (
table_alias, left, sql_operator)
params = right
else: # Must not happen
raise ValueError(
"Invalid field %r in domain term %r" % (left, leaf))
raise ValueError(_(
"Invalid field %r in domain term %r" % (left, leaf)
))
if left in model._columns:
params = model._columns[left]._symbol_set[1](right)
if left in model._fields:
params = str(right)
if isinstance(params, basestring):
params = [params]
@ -67,7 +73,8 @@ class IrModel(models.Model):
_inherit = 'ir.model'
def _register_hook(self, cr, ids=None):
@api.model_cr
def _register_hook(self):
# We have to prevent wrapping the function twice to avoid recursion
# errors
if not hasattr(expression.expression._expression__leaf_to_sql,
@ -82,4 +89,4 @@ class IrModel(models.Model):
'__decorated__'):
models.BaseModel._generate_order_by = patch_generate_order_by(
models.BaseModel._generate_order_by)
return super(IrModel, self)._register_hook(cr)
return super(IrModel, self)._register_hook()

18
base_search_fuzzy/models/trgm_index.py

@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from openerp import SUPERUSER_ID, _, api, exceptions, fields, models
from odoo import _, api, exceptions, fields, models
from psycopg2.extensions import AsIs
@ -46,7 +47,7 @@ class TrgmIndex(models.Model):
'GiST for often-updated data."'
)
@api.model
@api.model_cr
def _trgm_extension_exists(self):
self.env.cr.execute("""
SELECT name, installed_version
@ -64,13 +65,13 @@ class TrgmIndex(models.Model):
return 'installed'
@api.model
@api.model_cr
def _is_postgres_superuser(self):
self.env.cr.execute("SHOW is_superuser;")
superuser = self.env.cr.fetchone()
return superuser is not None and superuser[0] == 'on' or False
@api.model
@api.model_cr
def _install_trgm_extension(self):
extension = self._trgm_extension_exists()
if extension == 'missing':
@ -88,14 +89,15 @@ class TrgmIndex(models.Model):
return True
return False
def _auto_init(self, cr, context=None):
res = super(TrgmIndex, self)._auto_init(cr, context)
if self._install_trgm_extension(cr, SUPERUSER_ID, context=context):
@api.model_cr_context
def _auto_init(self):
res = super(TrgmIndex, self)._auto_init()
if self._install_trgm_extension():
_logger.info('The pg_trgm is loaded in the database and the '
'fuzzy search can be used.')
return res
@api.model
@api.model_cr
def get_not_used_index(self, index_name, table_name, inc=1):
if inc > 1:
new_index_name = index_name + str(inc)

4
base_search_fuzzy/tests/test_query_generation.py

@ -2,8 +2,8 @@
# © 2016 Eficent Business and IT Consulting Services S.L.
# © 2016 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp.osv import expression
from openerp.tests.common import TransactionCase, at_install, post_install
from odoo.osv import expression
from odoo.tests.common import TransactionCase, at_install, post_install
@at_install(False)

4
base_search_fuzzy/views/trgm_index.xml

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<odoo>
<data>
<record model="ir.ui.view" id="trgm_index_view_form">
@ -44,4 +44,4 @@
groups="base.group_no_one"/>
</data>
</openerp>
</odoo>
Loading…
Cancel
Save