← Back to team overview

credativ team mailing list archive

[Merge] lp:~sylvain-legal/openupgrade-addons/migration-product into lp:openupgrade-addons

 

Sylvain LE GAL has proposed merging lp:~sylvain-legal/openupgrade-addons/migration-product into lp:openupgrade-addons.

Requested reviews:
  Stefan Rijnhart (Therp) (stefan-therp)

For more details, see:
https://code.launchpad.net/~sylvain-legal/openupgrade-addons/migration-product/+merge/174434

'Product' migration : 
- adding pre-migration.py script. 
- adding post-migration.py script. (empty)
- adding openupgrade_analysis_work.txt. (text to describe analyse)
-- 
https://code.launchpad.net/~sylvain-legal/openupgrade-addons/migration-product/+merge/174434
Your team OpenUpgrade Committers is subscribed to branch lp:openupgrade-addons.
=== added file 'product/migrations/7.0.1.1/openupgrade_analysis_work.txt'
--- product/migrations/7.0.1.1/openupgrade_analysis_work.txt	1970-01-01 00:00:00 +0000
+++ product/migrations/7.0.1.1/openupgrade_analysis_work.txt	2013-07-12 14:55:37 +0000
@@ -0,0 +1,67 @@
+---product---
+
+product      / product.product          / product_image (binary)        : DEL 
+product      / product.product          / image (binary)                : NEW 
+### -> just renamed
+
+product      / product.product          / message_ids (one2many)        : NEW relation: mail.message
+### -> new fonctionality of mail module : OK.
+
+product      / product.template         / type (selection)              : selection_keys is now '['consu', 'service']' ('['consu', 'product', 'service']')
+### -> more selection_keys : OK
+
+product      / product.template         / loc_case (char)               : module is now 'stock' ('product')
+product      / product.template         / loc_rack (char)               : module is now 'stock' ('product')
+product      / product.template         / loc_row (char)                : module is now 'stock' ('product')
+product      / product.template         / procure_method (selection)    : module is now 'procurement' ('product')
+product      / product.template         / purchase_ok (boolean)         : module is now 'purchase' ('product')
+product      / product.template         / sale_delay (float)            : module is now 'stock' ('product')
+product      / product.template         / supply_method (selection)     : module is now 'procurement' ('product')
+### TODO -> test if stock, procurement and purchase are installed.
+
+deleted xml-id of model decimal.precision: product.decimal_sale
+new     xml-id of model decimal.precision: product.decimal_price 
+### (replace previous xml-id) (Cf. : use in 'sale/sale.py')
+
+deleted xml-id of model decimal.precision: product.decimal_purchase 
+### Deleted. merged with "product.decimal_account" (Cf. use in 'purchase/purchase.py')
+
+new     xml-id of model decimal.precision: product.decimal_discount # New : OK
+
+deleted xml-id of model product.category: product.cat0
+new     xml-id of model product.category: product.product_category_all 
+### (replace previous xml-id)
+
+new     xml-id of model product.category: product.product_category_1 # New : OK
+
+deleted xml-id of model product.product: product.product_consultant
+new     xml-id of model product.product: product.product_product_consultant 
+### (replace previous xml-id)
+
+deleted xml-id of model product.uom: product.uom_day
+new     xml-id of model product.uom: product.product_uom_day 
+### (replace previous xml-id)
+
+deleted xml-id of model product.uom: product.uom_hour
+new     xml-id of model product.uom: product.product_uom_hour 
+### (replace previous xml-id)
+
+new     xml-id of model product.uom: product.product_uom_dozen # New : OK
+new     xml-id of model product.uom: product.product_uom_litre # New : OK
+
+new     xml-id of model product.uom.categ: product.product_uom_categ_vol # New : OK
+
+-- System XML IDs (Nothing to do)--
+deleted xml-id of model ir.actions.act_window: product.product_form_config_action
+new     xml-id of model ir.actions.act_window.view: product.open_view_product_kanban1
+
+deleted xml-id of model ir.actions.todo: product.config_wizard_res_product_installer
+
+new     xml-id of model ir.model.access: product.access_product_category_sale_manager
+
+new     xml-id of model res.groups: product.group_costing_method
+new     xml-id of model res.groups: product.group_mrp_properties
+new     xml-id of model res.groups: product.group_purchase_pricelist
+new     xml-id of model res.groups: product.group_sale_pricelist
+new     xml-id of model res.groups: product.group_stock_packaging
+new     xml-id of model res.groups: product.group_uom

=== added file 'product/migrations/7.0.1.1/post-migration.py'
--- product/migrations/7.0.1.1/post-migration.py	1970-01-01 00:00:00 +0000
+++ product/migrations/7.0.1.1/post-migration.py	2013-07-12 14:55:37 +0000
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This migration script copyright (C) 2012-2013 Georges Abitbol
+#
+#    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
+from openerp import pooler, SUPERUSER_ID
+
+@openupgrade.migrate()
+def migrate(cr, version):
+    pass

=== added file 'product/migrations/7.0.1.1/pre-migration.py'
--- product/migrations/7.0.1.1/pre-migration.py	1970-01-01 00:00:00 +0000
+++ product/migrations/7.0.1.1/pre-migration.py	2013-07-12 14:55:37 +0000
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    This migration script copyright (C) 2012-2013 Georges Abitbol
+#
+#    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 = {
+    'product_product': [
+        ('product_image', 'image'),
+    ]
+}
+
+xmlid_renames = [
+    ('product.decimal_sale', 'product.decimal_price'), 
+    ('product.cat0', 'product.product_category_all'), 
+    ('product.product_consultant', 'product.product_product_consultant'), 
+    ('product.uom_day', 'product.product_uom_day'), 
+    ('product.uom_hour', 'product.product_uom_hour'), 
+]
+
+@openupgrade.migrate()
+def migrate(cr, version):
+    openupgrade.rename_columns(cr, column_renames)
+    openupgrade.rename_xmlids(cr, xmlid_renames)


Follow ups