From da7ce435e055446c04092e00789a8904f85af898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 6 Aug 2008 00:27:20 +0200 Subject: [PATCH] Remove _error_messages in ORM object and put the translation in translation.xml --- trytond/ir/translation.xml | 25 +++++++++++++++++++++++++ trytond/osv/orm.py | 5 +---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/trytond/ir/translation.xml b/trytond/ir/translation.xml index 7d13fad580..f007f1c63e 100644 --- a/trytond/ir/translation.xml +++ b/trytond/ir/translation.xml @@ -68,6 +68,31 @@ + + None + en_US + error + You are not allowed to delete this record. + ir + + + + None + en_US + error + This record is part of the base configuration. + ir + + + + None + en_US + error + You are not allowed to modify this record. + ir + + + ir.translation.update_report.init form diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 5637754b58..115fc60b18 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -519,10 +519,7 @@ class ORM(object): self._constraints = [] self._inherit_fields = [] self._order = [('id', 'ASC')] - self._error_messages = { - 'delete_xml_record': 'You are not allowed to delete this record.', - 'xml_record_desc': "This record is part of the base configuration.", - 'write_xml_record': 'You are not allowed to modify this record.'} + self._error_messages = {} # reinit the cache on _columns and _defaults self.__columns = None self.__defaults = None