From adc8356be9f3d226ed70a6842e93317d9243ac53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 18 Jul 2008 21:40:45 +0200 Subject: [PATCH] Add docstring for raise_user_error --- trytond/osv/orm.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index aa385ffe67..caec08210a 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -862,6 +862,22 @@ class ORM(object): def raise_user_error(self, cursor, error, error_args=None, error_description='', error_description_args=None, context=None): + ''' + Raise an exception that will be display as an error message + in the client. + + :param cursor: the database cursor + :param error: the key of the dictionary _error_messages used + for error message + :param error_args: the arguments that will be used + for "%"-based substitution + :param error_description: the key of the dictionary + _error_messages used for error description + :param error_description_args: the arguments that will be used + for "%"-based substitution + :param context: the context in which the language key will + be used for translation + ''' translation_obj = self.pool.get('ir.translation') if context is None: