Browse Source

base_optional_quick_create: fix bug detected by pylint

pull/31/head
Stéphane Bidoul 9 years ago
committed by Gilles Meyomesse
parent
commit
d9a60f2125
  1. 40
      base_optional_quick_create/i18n/en.po
  2. 22
      base_optional_quick_create/i18n/fr.po
  3. 22
      base_optional_quick_create/i18n/pt_BR.po
  4. 22
      base_optional_quick_create/i18n/sl.po
  5. 35
      base_optional_quick_create/i18n/zh_CN.po
  6. 9
      base_optional_quick_create/models/ir_model.py

40
base_optional_quick_create/i18n/en.po

@ -1,40 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_optional_quick_create
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: server-tools (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
"PO-Revision-Date: 2015-09-18 13:54+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: English (http://www.transifex.com/oca/OCA-server-tools-8-0/language/en/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: en\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: base_optional_quick_create
#: field:ir.model,avoid_quick_create:0
msgid "Avoid quick create"
msgstr "Avoid quick create"
#. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:37
#, python-format
msgid "Can't create quickly. Opening create form"
msgstr "Can't create quickly. Opening create form"
#. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:36
#, python-format
msgid "Error"
msgstr "Error"
#. module: base_optional_quick_create
#: model:ir.model,name:base_optional_quick_create.model_ir_model
msgid "Models"
msgstr "Models"

22
base_optional_quick_create/i18n/fr.po

@ -3,15 +3,15 @@
# * base_optional_quick_create # * base_optional_quick_create
# #
# Translators: # Translators:
# FIRST AUTHOR <EMAIL@ADDRESS>, 2014
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: server-tools (8.0)\n"
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
"PO-Revision-Date: 2015-09-18 13:54+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fr/)\n"
"POT-Creation-Date: 2016-07-30 00:58+0000\n"
"PO-Revision-Date: 2016-07-30 00:58+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
@ -19,22 +19,16 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: field:ir.model,avoid_quick_create:0
#: model:ir.model.fields,field_description:base_optional_quick_create.field_ir_model_avoid_quick_create
msgid "Avoid quick create" msgid "Avoid quick create"
msgstr "" msgstr ""
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:37
#: code:addons/base_optional_quick_create/models/ir_model.py:19
#, python-format #, python-format
msgid "Can't create quickly. Opening create form" msgid "Can't create quickly. Opening create form"
msgstr "" msgstr ""
#. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:36
#, python-format
msgid "Error"
msgstr "Erreur"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: model:ir.model,name:base_optional_quick_create.model_ir_model #: model:ir.model,name:base_optional_quick_create.model_ir_model
msgid "Models" msgid "Models"

22
base_optional_quick_create/i18n/pt_BR.po

@ -3,15 +3,15 @@
# * base_optional_quick_create # * base_optional_quick_create
# #
# Translators: # Translators:
# Armando Vulcano Junior <vulcano@uol.com.br>, 2015
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: server-tools (8.0)\n"
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
"PO-Revision-Date: 2015-09-18 21:14+0000\n"
"Last-Translator: Armando Vulcano Junior <vulcano@uol.com.br>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_BR/)\n"
"POT-Creation-Date: 2016-07-30 00:58+0000\n"
"PO-Revision-Date: 2016-07-30 00:58+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
@ -19,22 +19,16 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: field:ir.model,avoid_quick_create:0
#: model:ir.model.fields,field_description:base_optional_quick_create.field_ir_model_avoid_quick_create
msgid "Avoid quick create" msgid "Avoid quick create"
msgstr "Evite criação rápida" msgstr "Evite criação rápida"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:37
#: code:addons/base_optional_quick_create/models/ir_model.py:19
#, python-format #, python-format
msgid "Can't create quickly. Opening create form" msgid "Can't create quickly. Opening create form"
msgstr "Não pode criar rapidamente; Abrindo formulário de criação" msgstr "Não pode criar rapidamente; Abrindo formulário de criação"
#. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:36
#, python-format
msgid "Error"
msgstr "Erro"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: model:ir.model,name:base_optional_quick_create.model_ir_model #: model:ir.model,name:base_optional_quick_create.model_ir_model
msgid "Models" msgid "Models"

22
base_optional_quick_create/i18n/sl.po

@ -3,15 +3,15 @@
# * base_optional_quick_create # * base_optional_quick_create
# #
# Translators: # Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: server-tools (8.0)\n"
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-29 11:14+0000\n"
"PO-Revision-Date: 2015-09-24 11:46+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/sl/)\n"
"POT-Creation-Date: 2016-07-30 00:58+0000\n"
"PO-Revision-Date: 2016-07-30 00:58+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n" "Content-Transfer-Encoding: \n"
@ -19,22 +19,16 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: field:ir.model,avoid_quick_create:0
#: model:ir.model.fields,field_description:base_optional_quick_create.field_ir_model_avoid_quick_create
msgid "Avoid quick create" msgid "Avoid quick create"
msgstr "Izogibanje hitremu ustvarjanju" msgstr "Izogibanje hitremu ustvarjanju"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:37
#: code:addons/base_optional_quick_create/models/ir_model.py:19
#, python-format #, python-format
msgid "Can't create quickly. Opening create form" msgid "Can't create quickly. Opening create form"
msgstr "Ne morete hitro ustvariti. Odpiram obrazec za ustvarjanje" msgstr "Ne morete hitro ustvariti. Odpiram obrazec za ustvarjanje"
#. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/model.py:36
#, python-format
msgid "Error"
msgstr "Napaka"
#. module: base_optional_quick_create #. module: base_optional_quick_create
#: model:ir.model,name:base_optional_quick_create.model_ir_model #: model:ir.model,name:base_optional_quick_create.model_ir_model
msgid "Models" msgid "Models"

35
base_optional_quick_create/i18n/zh_CN.po

@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_optional_quick_create
#
# Translators:
# Jeffery Chenn <jeffery9@gmail.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-08-31 11:58+0000\n"
"PO-Revision-Date: 2016-08-31 11:58+0000\n"
"Last-Translator: Jeffery Chenn <jeffery9@gmail.com>, 2016\n"
"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#. module: base_optional_quick_create
#: model:ir.model.fields,field_description:base_optional_quick_create.field_ir_model_avoid_quick_create
msgid "Avoid quick create"
msgstr "避免快速创建"
#. module: base_optional_quick_create
#: code:addons/base_optional_quick_create/models/ir_model.py:19
#, python-format
msgid "Can't create quickly. Opening create form"
msgstr ""
#. module: base_optional_quick_create
#: model:ir.model,name:base_optional_quick_create.model_ir_model
msgid "Models"
msgstr "模型"

9
base_optional_quick_create/models/ir_model.py

@ -2,10 +2,9 @@
# © 2013 Agile Business Group sagl (<http://www.agilebg.com>) # © 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# © 2016 ACSONE SA/NA (<http://acsone.eu>) # © 2016 ACSONE SA/NA (<http://acsone.eu>)
from openerp import api, fields, models
from openerp.exceptions import Warning
from openerp import api, fields, models, _
from openerp.exceptions import UserError
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
from openerp.tools.translate import _
class IrModel(models.Model): class IrModel(models.Model):
@ -17,9 +16,7 @@ class IrModel(models.Model):
def _wrap_name_create(): def _wrap_name_create():
def wrapper(self, cr, uid, name, context=None): def wrapper(self, cr, uid, name, context=None):
raise orm.except_orm(
_('Error'),
_("Can't create quickly. Opening create form"))
raise UserError(_("Can't create quickly. Opening create form"))
return wrapper return wrapper
for model in self.browse(cr, SUPERUSER_ID, ids): for model in self.browse(cr, SUPERUSER_ID, ids):

Loading…
Cancel
Save