My explanation Diff comments:
> === added file 'openupgrade_analysis_work.txt' > --- openupgrade_analysis_work.txt 1970-01-01 00:00:00 +0000 > +++ openupgrade_analysis_work.txt 2014-09-10 14:45:34 +0000 > @@ -0,0 +1,26 @@ > +---Fields in module 'sale_crm'--- > + > +# Nothing done > +sale_crm / account.invoice / section_id (many2one) : > NEW relation: crm.case.section > +sale_crm / account.invoice.report / section_id (many2one) : > NEW relation: crm.case.section > +sale_crm / res.users / default_section_id (many2one) : > NEW relation: crm.case.section > + > + > +# Covert from m2o to m2m > +sale_crm / sale.order / categ_id (many2one) : > DEL relation: crm.case.categ > +sale_crm / sale.order / categ_ids (many2many) : > NEW relation: crm.case.categ > + > + > +# Nothing done I mean nothing done as I haven't analyzed it thoroughly and I don't want to confuse anyone in the future. Saying nothing to do says that I have analyzed it and decided the best recourse is to do nothing... I don't know... this is just wording... > +---XML records in module 'sale_crm'--- > +DEL ir.ui.menu: base.menu_base_partner > +NEW ir.ui.view: sale_crm.account_invoice_form > +NEW ir.ui.view: sale_crm.account_invoice_groupby_inherit > +NEW ir.ui.view: sale_crm.account_invoice_report_tree > +NEW ir.ui.view: sale_crm.account_invoice_tree > +NEW ir.ui.view: sale_crm.res_user_form > +NEW ir.ui.view: sale_crm.view_users_form_preferences > +DEL ir.ui.view: sale_crm.board_crm_form_inherit_replace1 > +DEL ir.ui.view: sale_crm.board_crm_form_inherit_replace3 > +NEW mail.message.subtype: sale_crm.mt_salesteam_order_confirmed > +NEW mail.message.subtype: sale_crm.mt_salesteam_order_sent > > === added file 'post-migration.py' > --- post-migration.py 1970-01-01 00:00:00 +0000 > +++ post-migration.py 2014-09-10 14:45:34 +0000 > @@ -0,0 +1,31 @@ > +# -*- encoding: utf-8 -*- > +############################################################################## > +# > +# OpenERP, Open Source Management Solution > +# This module copyright (C) 2014 Savoir-faire Linux > +# (<http://www.savoirfairelinux.com>). > +# > +# This program is free software: you can redistribute it and/or modify > +# it under the terms of the GNU Affero General Public License as > +# published by the Free Software Foundation, either version 3 of the > +# License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU Affero General Public License for more details. > +# > +# You should have received a copy of the GNU Affero General Public License > +# along with this program. If not, see <http://www.gnu.org/licenses/>. > +# > +############################################################################## > + > +from openerp import pooler > +from openupgrade import openupgrade > + > + > [email protected]() > +def migrate(cr, version): > + pool = pooler.get_pool(cr.dbname) That is only to do outside of openupgrade, you are not supposed to run open upgrade more than once. Also, that check is done in the the decorator IIRC. > + openupgrade.m2o_to_m2m(cr, pool['sale.order'], 'sale_order', 'categ_ids', > + openupgrade.get_legacy_name('categ_id')) > > === added file 'pre-migration.py' > --- pre-migration.py 1970-01-01 00:00:00 +0000 > +++ pre-migration.py 2014-09-10 14:45:34 +0000 > @@ -0,0 +1,34 @@ > +# -*- encoding: utf-8 -*- > +############################################################################## > +# > +# OpenERP, Open Source Management Solution > +# This module copyright (C) 2014 Savoir-faire Linux > +# (<http://www.savoirfairelinux.com>). > +# > +# This program is free software: you can redistribute it and/or modify > +# it under the terms of the GNU Affero General Public License as > +# published by the Free Software Foundation, either version 3 of the > +# License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU Affero General Public License for more details. > +# > +# You should have received a copy of the GNU Affero General Public License > +# along with this program. If not, see <http://www.gnu.org/licenses/>. > +# > +############################################################################## > + > +from openupgrade import openupgrade > + > +column_renames = { > + 'sale_order': [ > + ('categ_id', None), > + ], > +} > + > + > [email protected]() > +def migrate(cr, version): > + openupgrade.rename_columns(cr, column_renames) That check is done in the decorator > -- https://code.launchpad.net/~savoirfairelinux-openerp/openupgrade-addons/sale_crm/+merge/234126 Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openupgrade-addons/sale_crm. -- Mailing list: https://launchpad.net/~savoirfairelinux-openerp Post to : [email protected] Unsubscribe : https://launchpad.net/~savoirfairelinux-openerp More help : https://help.launchpad.net/ListHelp

