diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index e4a5a5435fd..47d267461f3 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -5353,8 +5353,7 @@ def convert_pgerror_23502(model, fields, info, e): message = _(u"Missing required value for the field '%s'.") % field_name field = fields.get(field_name) if field: - message = _(u"%s This might be '%s' in the current model, or a field " - u"of the same name in an o2m.") % (message, field['string']) + message = _(u"Missing required value for the field '%s' (%s)") % (field['string'], field_name) return { 'message': message, 'field': field_name, diff --git a/openerp/tests/addons/test_impex/tests/test_load.py b/openerp/tests/addons/test_impex/tests/test_load.py index 0afbf6f49c3..f21f7f332ca 100644 --- a/openerp/tests/addons/test_impex/tests/test_load.py +++ b/openerp/tests/addons/test_impex/tests/test_load.py @@ -393,18 +393,14 @@ class test_required_string_field(ImporterCase): def test_empty(self): result = self.import_(['value'], [[]]) self.assertEqual(result['messages'], [message( - u"Missing required value for the field 'value'. This might be " - u"'unknown' in the current model, or a field of the same name in " - u"an o2m.")]) + u"Missing required value for the field 'value' (unknown)")]) self.assertIs(result['ids'], False) @mute_logger('openerp.sql_db', 'openerp.osv.orm') def test_not_provided(self): result = self.import_(['const'], [['12']]) self.assertEqual(result['messages'], [message( - u"Missing required value for the field 'value'. This might be " - u"'unknown' in the current model, or a field of the same name in " - u"an o2m.")]) + u"Missing required value for the field 'unknown'")]) self.assertIs(result['ids'], False) class test_text(ImporterCase):