From 5e59e53c78445f7420b28d5da4488a6b382974db Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 2 Jun 2014 02:27:00 +0200 Subject: [PATCH 1/3] [FIX] remove raised error if obsolete fields are in old views --- openerp/osv/orm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 7c953a512f8f..ebe9408bd97d 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1575,7 +1575,9 @@ def _validate(self, cr, uid, ids, context=None): _("The field(s) `%s` failed against a constraint: %s") % (', '.join(fields), translated_msg) ) if error_msgs: - raise except_orm('ValidateError', '\n'.join(error_msgs)) + # OpenUpgrade: do not raise for obsolete fields + # raise except_orm('ValidateError', '\n'.join(error_msgs)) + pass def default_get(self, cr, uid, fields_list, context=None): """ From 95abc7243521e57c57d86c51dc95beb4a260d6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=A9al?= Date: Mon, 2 Jun 2014 14:38:43 +0200 Subject: [PATCH 2/3] complete doc on xml_ids --- openerp/openupgrade/doc/source/xmlids.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openerp/openupgrade/doc/source/xmlids.rst b/openerp/openupgrade/doc/source/xmlids.rst index 13a0f06cb3ff..1afa4205b75c 100644 --- a/openerp/openupgrade/doc/source/xmlids.rst +++ b/openerp/openupgrade/doc/source/xmlids.rst @@ -54,7 +54,10 @@ More interesting are * Any general data added by the module. Typically, data is loaded one time only using the 'noupdate' flag in the XML. You cannot simply force-load such data in your upgrade script, or you will for instance reset the - sequences used for invoice numbering. Revise any data carefully and + sequences used for invoice numbering. + You can use this script + 'OpenUpgrade/script/compare_noupdate_xml_records.py' + Revise any data carefully and copy relevant, new data in a separate file. Load it from your post script using :meth:`~openupgrade.load_xml` from the module :mod:`openupgrade` which is included with the OpenUpgrade Server package. You may also have From 97362e488a96ab47b8132eb0ba04bc6ed7ce1fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=A9al?= Date: Mon, 2 Jun 2014 15:47:08 +0200 Subject: [PATCH 3/3] [FIX] change script name in doc --- openerp/openupgrade/doc/source/xmlids.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/openupgrade/doc/source/xmlids.rst b/openerp/openupgrade/doc/source/xmlids.rst index 1afa4205b75c..cf3a80ab4cec 100644 --- a/openerp/openupgrade/doc/source/xmlids.rst +++ b/openerp/openupgrade/doc/source/xmlids.rst @@ -56,7 +56,7 @@ More interesting are such data in your upgrade script, or you will for instance reset the sequences used for invoice numbering. You can use this script - 'OpenUpgrade/script/compare_noupdate_xml_records.py' + 'OpenUpgrade/scripts/compare_noupdate_xml_records.py' Revise any data carefully and copy relevant, new data in a separate file. Load it from your post script using :meth:`~openupgrade.load_xml` from the module :mod:`openupgrade`