← Back to team overview

credativ team mailing list archive

[Merge] lp:~therp-nl/openupgrade-addons/7.0-product_rename_precision into lp:openupgrade-addons

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-addons/7.0-product_rename_precision into lp:openupgrade-addons.

Requested reviews:
  OpenUpgrade Committers (openupgrade-committers)

For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-addons/7.0-product_rename_precision/+merge/174671

Implementing fix for product precision name as suggested by Sébastien Beau.

-- 
https://code.launchpad.net/~therp-nl/openupgrade-addons/7.0-product_rename_precision/+merge/174671
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-addons/7.0-product_rename_precision into lp:openupgrade-addons.
=== added file 'product/migrations/7.0.1.1/data.xml'
--- product/migrations/7.0.1.1/data.xml	1970-01-01 00:00:00 +0000
+++ product/migrations/7.0.1.1/data.xml	2013-07-15 09:00:42 +0000
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <!-- assign new name, as this is the primary key
+             by which precisions are retrieved -->
+        <record id="decimal_price" model="decimal.precision">
+            <field name="name">Product Price</field>
+        </record>
+    </data>
+</openerp>

=== modified file 'product/migrations/7.0.1.1/post-migration.py'
--- product/migrations/7.0.1.1/post-migration.py	2013-07-12 14:42:11 +0000
+++ product/migrations/7.0.1.1/post-migration.py	2013-07-15 09:00:42 +0000
@@ -20,8 +20,9 @@
 ##############################################################################
 
 from openupgrade import openupgrade
-from openerp import pooler, SUPERUSER_ID
 
 @openupgrade.migrate()
 def migrate(cr, version):
-    pass
+    openupgrade.load_xml(
+        cr, 'product',
+        'migrations/7.0.1.1/data.xml')


Follow ups