From 839262a11bda12c3f87fc6b584323d74e184d0fd Mon Sep 17 00:00:00 2001 From: Nicolas Mac Rouillon Date: Tue, 13 Dec 2016 16:02:54 -0300 Subject: [PATCH] FIX remove api.one --- web_advanced_search_wildcard/README.rst | 61 -------- web_advanced_search_wildcard/__init__.py | 0 web_advanced_search_wildcard/__openerp__.py | 21 --- web_advanced_search_wildcard/i18n/de.po | 27 ---- web_advanced_search_wildcard/i18n/es.po | 26 ---- web_advanced_search_wildcard/i18n/fi.po | 26 ---- web_advanced_search_wildcard/i18n/fr.po | 26 ---- web_advanced_search_wildcard/i18n/pt_BR.po | 26 ---- web_advanced_search_wildcard/i18n/sl.po | 26 ---- .../i18n/web_advanced_search_wildcard.pot | 23 --- .../static/description/screenshot.png | Bin 7164 -> 0 bytes .../static/src/js/search.js | 6 - .../views/template.xml | 10 -- web_dashboard_tile/models/tile_tile.py | 136 +++++++++--------- 14 files changed, 70 insertions(+), 344 deletions(-) delete mode 100644 web_advanced_search_wildcard/README.rst delete mode 100644 web_advanced_search_wildcard/__init__.py delete mode 100644 web_advanced_search_wildcard/__openerp__.py delete mode 100644 web_advanced_search_wildcard/i18n/de.po delete mode 100644 web_advanced_search_wildcard/i18n/es.po delete mode 100644 web_advanced_search_wildcard/i18n/fi.po delete mode 100644 web_advanced_search_wildcard/i18n/fr.po delete mode 100644 web_advanced_search_wildcard/i18n/pt_BR.po delete mode 100644 web_advanced_search_wildcard/i18n/sl.po delete mode 100644 web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot delete mode 100644 web_advanced_search_wildcard/static/description/screenshot.png delete mode 100644 web_advanced_search_wildcard/static/src/js/search.js delete mode 100644 web_advanced_search_wildcard/views/template.xml diff --git a/web_advanced_search_wildcard/README.rst b/web_advanced_search_wildcard/README.rst deleted file mode 100644 index 8c6de995..00000000 --- a/web_advanced_search_wildcard/README.rst +++ /dev/null @@ -1,61 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 - -============================ -Wildcard in advanced search -============================ - -Allows =ilike ('matches') operator to advanced search option. - - -Usage -===== -Use % as a placeholder. - -Example: "Zip" - 'matches' - "1%" gives all zip starting with 1 - -.. image:: /web_advanced_search_wildcard/static/description/screenshot.png - :alt: Screenshot - - -Also allows insensitive exact search. -Example "Name" - 'matches' - "john" will find "John" and "john" but not "Johnson". - -Bug Tracker -=========== - -Bugs are tracked on `GitHub 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 -`here `_. - -Credits -======= - -Images ------- - -* Odoo Community Association: `Icon `_. - -Contributors ------------- - -* Markus Schneider -* Thomas Rehn -* L Freeke - - -Maintainer ----------- - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. - -OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use. - -To contribute to this module, please visit https://odoo-community.org. diff --git a/web_advanced_search_wildcard/__init__.py b/web_advanced_search_wildcard/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/web_advanced_search_wildcard/__openerp__.py b/web_advanced_search_wildcard/__openerp__.py deleted file mode 100644 index 797f3a60..00000000 --- a/web_advanced_search_wildcard/__openerp__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# © 2014 initOS GmbH & Co. KG (). -# © 2016 Therp BV . -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -{ - "name": "Wildcard in advanced search", - "summary": "Webmodule to add wildcard operators in advanced search field", - "version": "8.0.1.0.0", - "category": "web", - "license": 'AGPL-3', - "author": "initOS GmbH & Co. KG,Odoo Community Association (OCA),Therp BV", - "application": False, - "installable": True, - "depends": [ - "web" - ], - 'data': [ - "views/template.xml", - ], -} diff --git a/web_advanced_search_wildcard/i18n/de.po b/web_advanced_search_wildcard/i18n/de.po deleted file mode 100644 index 4cfbc4f3..00000000 --- a/web_advanced_search_wildcard/i18n/de.po +++ /dev/null @@ -1,27 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# -# Rudolf Schnapka , 2015. -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-15 09:11+0000\n" -"PO-Revision-Date: 2015-01-04 14:07+0100\n" -"Last-Translator: Rudolf Schnapka \n" -"Language-Team: German \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"Language: de\n" -"X-Generator: Lokalize 1.5\n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "gleicht" - - diff --git a/web_advanced_search_wildcard/i18n/es.po b/web_advanced_search_wildcard/i18n/es.po deleted file mode 100644 index 2f9437ce..00000000 --- a/web_advanced_search_wildcard/i18n/es.po +++ /dev/null @@ -1,26 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_advanced_search_wildcard -# -# Translators: -# Pedro M. Baeza , 2016 -msgid "" -msgstr "" -"Project-Id-Version: web (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-11-26 01:59+0000\n" -"PO-Revision-Date: 2016-10-13 18:37+0000\n" -"Last-Translator: Pedro M. Baeza \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "coincide con" diff --git a/web_advanced_search_wildcard/i18n/fi.po b/web_advanced_search_wildcard/i18n/fi.po deleted file mode 100644 index 91f0ab2e..00000000 --- a/web_advanced_search_wildcard/i18n/fi.po +++ /dev/null @@ -1,26 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_advanced_search_wildcard -# -# Translators: -# Jarmo Kortetjärvi , 2016 -msgid "" -msgstr "" -"Project-Id-Version: web (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-11 02:17+0000\n" -"PO-Revision-Date: 2016-03-07 08:28+0000\n" -"Last-Translator: Jarmo Kortetjärvi \n" -"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fi\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "osumat" diff --git a/web_advanced_search_wildcard/i18n/fr.po b/web_advanced_search_wildcard/i18n/fr.po deleted file mode 100644 index 302b2e39..00000000 --- a/web_advanced_search_wildcard/i18n/fr.po +++ /dev/null @@ -1,26 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_advanced_search_wildcard -# -# Translators: -# Christophe CHAUVET , 2016 -msgid "" -msgstr "" -"Project-Id-Version: web (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-05-06 15:50+0000\n" -"PO-Revision-Date: 2016-05-06 08:19+0000\n" -"Last-Translator: Christophe CHAUVET \n" -"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "correspondances" diff --git a/web_advanced_search_wildcard/i18n/pt_BR.po b/web_advanced_search_wildcard/i18n/pt_BR.po deleted file mode 100644 index 0464430f..00000000 --- a/web_advanced_search_wildcard/i18n/pt_BR.po +++ /dev/null @@ -1,26 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_advanced_search_wildcard -# -# Translators: -# danimaribeiro , 2016 -msgid "" -msgstr "" -"Project-Id-Version: web (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-11 02:17+0000\n" -"PO-Revision-Date: 2016-03-05 16:05+0000\n" -"Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: pt_BR\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "resultados" diff --git a/web_advanced_search_wildcard/i18n/sl.po b/web_advanced_search_wildcard/i18n/sl.po deleted file mode 100644 index f8aa6f65..00000000 --- a/web_advanced_search_wildcard/i18n/sl.po +++ /dev/null @@ -1,26 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_advanced_search_wildcard -# -# Translators: -# Matjaž Mozetič , 2016 -msgid "" -msgstr "" -"Project-Id-Version: web (8.0)\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-26 02:05+0000\n" -"PO-Revision-Date: 2016-02-27 16:56+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "ujemanj" diff --git a/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot b/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot deleted file mode 100644 index e187a2da..00000000 --- a/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot +++ /dev/null @@ -1,23 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-15 09:11+0000\n" -"PO-Revision-Date: 2014-09-15 11:12+0100\n" -"Last-Translator: M\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" - -#. module: web_advanced_search_wildcard -#. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 -#, python-format -msgid "matches" -msgstr "" - diff --git a/web_advanced_search_wildcard/static/description/screenshot.png b/web_advanced_search_wildcard/static/description/screenshot.png deleted file mode 100644 index 57848f902890b9aa4c78caf54ccfbcaed08e3cf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7164 zcmZ`;cRba7-~Y9cc?u~)wrnArIx>qgvPU9h@2qHWWMm`>aYDF^W0S2MLUu;>9$6uK zKOfg~zh2jK-}meJ{=pf)^E==1`MlQ&x~HZ{ModeLAPAYV(k%@HIY|YN1Bp(;->+^u z?(pxF3tCx=h=^!#{O%Y$MY+oBx@tODxIQs;euQXRxw*PNayEO>aTY=7-Yeg_spT=S zH0)_eX?ap~#nKtYLVT{CMV*J}euSKQr1d#|sjPw={q`5kxF7dX>RLrT^W_XY#3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nrN%I_&!TyBnz5h|%oKM=1>B9{pL%8d=aUqyRJZ#kbXiY2>}dL@V|7fNws}nE0AO9tP@y5Xc9@u zimegv# zMkOTJSz21!+J+_)A~ym_Dez|dF;bu(%S%fg#V$j78h~~Jv$FYG4nvy6sgi!I8>y+N zP-wBsZ5>H+ZW2ZSe=yJ8U!5!m>7^AFmKGKoRB*x~7A+T_rq9ZUBS^>m!0#ieZtG$# zuBGmbt^~;^eV-xE7Z(#lp{?S2t&43h9S~vkaqm#IldDDgyn$;5jdQN$Utbb(u(CFq z7wqoto;XEdB}}`I{ohGmh-c*YdaIHO#5z=BN4IBZtgfC9m=0m`=IL&LIZr8L3yT?; zUq2_L#8^WkBNAd_S~|MDjfEI2Hn&Fq5CE4^+}V7hE@<)Nef}fEMKh?s;k7IL(of#T z#)<>z73;UYTkK2;jEd@-ZjJ%ix3{+T8vAl006ji7Cg8PhRdPdFxe4A9zuX2MUHo#` zIOlynK0XMW=^&z3OZSe>$K}PJKn5OrRPIa0CI1Cc6Z(}xis|hi!c`CJiP4P^CqiG( zv?VlKyoAWAf&@5_isXjl&rEO7(}!k~AS*RLh>vD(s%!nsF|x6?9R}Iu0A#r0 zNrSWwf-L3CejRsYzw_R4@*5fanls`n4L}P)*FjAXd`s3x-y=Qx1hw=Y>kXaC!Omp` zb&$^xFg8r)(?C4?vC5y2$-gST1Z%ULO S=28L@A - - - - - diff --git a/web_dashboard_tile/models/tile_tile.py b/web_dashboard_tile/models/tile_tile.py index bc304b69..38ce5c66 100644 --- a/web_dashboard_tile/models/tile_tile.py +++ b/web_dashboard_tile/models/tile_tile.py @@ -142,71 +142,74 @@ class TileTile(models.Model): string='Error Details', compute='_compute_data') - @api.one + @api.multi def _compute_data(self): - if not self.active: - return - model = self.env[self.model_id.model] - eval_context = self._get_eval_context() - domain = self.domain or '[]' - try: - count = model.search_count(eval(domain, eval_context)) - except Exception as e: - self.primary_value = self.secondary_value = 'ERR!' - self.error = str(e) - return - if any([ - self.primary_function and - self.primary_function != 'count', - self.secondary_function and - self.secondary_function != 'count' - ]): - records = model.search(eval(domain, eval_context)) - for f in ['primary_', 'secondary_']: - f_function = f + 'function' - f_field_id = f + 'field_id' - f_format = f + 'format' - f_value = f + 'value' - value = 0 - if self[f_function] == 'count': - value = count - elif self[f_function]: - func = FIELD_FUNCTIONS[self[f_function]]['func'] - if func and self[f_field_id] and count: - vals = [x[self[f_field_id].name] for x in records] - value = func(vals) - if self[f_function]: - try: - self[f_value] = (self[f_format] or '{:,}').format(value) - except ValueError as e: - self[f_value] = 'F_ERR!' - self.error = str(e) - return - else: - self[f_value] = False + for rec in self: + if not rec.active: + return + model = self.env[rec.model_id.model] + eval_context = self._get_eval_context() + domain = rec.domain or '[]' + try: + count = model.search_count(eval(domain, eval_context)) + except Exception as e: + rec.primary_value = rec.secondary_value = 'ERR!' + rec.error = str(e) + return + if any([ + rec.primary_function and + rec.primary_function != 'count', + rec.secondary_function and + rec.secondary_function != 'count' + ]): + records = model.search(eval(domain, eval_context)) + for f in ['primary_', 'secondary_']: + f_function = f + 'function' + f_field_id = f + 'field_id' + f_format = f + 'format' + f_value = f + 'value' + value = 0 + if rec[f_function] == 'count': + value = count + elif rec[f_function]: + func = FIELD_FUNCTIONS[rec[f_function]]['func'] + if func and rec[f_field_id] and count: + vals = [x[rec[f_field_id].name] for x in records] + value = func(vals) + if rec[f_function]: + try: + rec[f_value] = (rec[f_format] or '{:,}').format(value) + except ValueError as e: + rec[f_value] = 'F_ERR!' + rec.error = str(e) + return + else: + rec[f_value] = False - @api.one + @api.multi @api.onchange('primary_function', 'primary_field_id', 'secondary_function', 'secondary_field_id') def _compute_helper(self): - for f in ['primary_', 'secondary_']: - f_function = f + 'function' - f_field_id = f + 'field_id' - f_helper = f + 'helper' - self[f_helper] = '' - field_func = FIELD_FUNCTIONS.get(self[f_function], {}) - help = field_func.get('help', False) - if help: - if self[f_function] != 'count' and self[f_field_id]: - desc = self[f_field_id].field_description - self[f_helper] = help % desc - else: - self[f_helper] = help + for rec in self: + for f in ['primary_', 'secondary_']: + f_function = f + 'function' + f_field_id = f + 'field_id' + f_helper = f + 'helper' + rec[f_helper] = '' + field_func = FIELD_FUNCTIONS.get(rec[f_function], {}) + help = field_func.get('help', False) + if help: + if rec[f_function] != 'count' and rec[f_field_id]: + desc = rec[f_field_id].field_description + rec[f_helper] = help % desc + else: + rec[f_helper] = help - @api.one + @api.multi def _compute_active(self): ima = self.env['ir.model.access'] - self.active = ima.check(self.model_id.model, 'read', False) + for rec in self: + rec.active = ima.check(rec.model_id.model, 'read', False) def _search_active(self, operator, value): cr = self.env.cr @@ -226,17 +229,18 @@ class TileTile(models.Model): return [('id', 'in', ids)] # Constraints and onchanges - @api.one + @api.multi @api.constrains('model_id', 'primary_field_id', 'secondary_field_id') def _check_model_id_field_id(self): - if any([ - self.primary_field_id and - self.primary_field_id.model_id.id != self.model_id.id, - self.secondary_field_id and - self.secondary_field_id.model_id.id != self.model_id.id - ]): - raise ValidationError( - _("Please select a field from the selected model.")) + for rec in self: + if any([ + rec.primary_field_id and + rec.primary_field_id.model_id.id != rec.model_id.id, + rec.secondary_field_id and + rec.secondary_field_id.model_id.id != rec.model_id.id + ]): + raise ValidationError( + _("Please select a field from the selected model.")) @api.onchange('model_id') def _onchange_model_id(self):