Merge lp:~therp-nl/openupgrade-addons/6.0-hr_expense_fix_flow_stop into lp:openupgrade-addons/6.0

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 4790
Proposed branch: lp:~therp-nl/openupgrade-addons/6.0-hr_expense_fix_flow_stop
Merge into: lp:openupgrade-addons/6.0
Diff against target: 42 lines (+21/-1)
2 files modified
hr_expense/migrations/6.0.1.0/data/hr_expense_workflow.xml (+8/-0)
hr_expense/migrations/6.0.1.0/post-migration.py (+13/-1)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-addons/6.0-hr_expense_fix_flow_stop
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve
Review via email: mp+143051@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'hr_expense/migrations/6.0.1.0/data'
=== added file 'hr_expense/migrations/6.0.1.0/data/hr_expense_workflow.xml'
--- hr_expense/migrations/6.0.1.0/data/hr_expense_workflow.xml 1970-01-01 00:00:00 +0000
+++ hr_expense/migrations/6.0.1.0/data/hr_expense_workflow.xml 2013-01-13 22:07:24 +0000
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record id="act_refused" model="workflow.activity">
5 <field name="flow_stop" eval="False"/>
6 </record>
7 </data>
8</openerp>
09
=== modified file 'hr_expense/migrations/6.0.1.0/post-migration.py'
--- hr_expense/migrations/6.0.1.0/post-migration.py 2012-06-07 14:51:52 +0000
+++ hr_expense/migrations/6.0.1.0/post-migration.py 2013-01-13 22:07:24 +0000
@@ -2,7 +2,7 @@
2##############################################################################2##############################################################################
3#3#
4# OpenERP, Open Source Management Solution4# OpenERP, Open Source Management Solution
5# This migration script copyright (C) 2012 Therp BV (<http://therp.nl>)5# This migration script copyright (C) 2012-2013 Therp BV (<http://therp.nl>)
6#6#
7# This program is free software: you can redistribute it and/or modify7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as8# it under the terms of the GNU Affero General Public License as
@@ -32,3 +32,15 @@
32def migrate(cr, version):32def migrate(cr, version):
33 pool = pooler.get_pool(cr.dbname)33 pool = pooler.get_pool(cr.dbname)
34 openupgrade.set_defaults(cr, pool, defaults_force, force=True)34 openupgrade.set_defaults(cr, pool, defaults_force, force=True)
35 openupgrade.load_xml(
36 cr, 'account',
37 'migrations/6.0.1.0/data/hr_expense_workflow.xml')
38 # Fix existing workflow instances
39 openupgrade.logged_query(
40 cr,
41 """
42 UPDATE wkf_instance SET state = 'active'
43 WHERE res_type = 'hr.expense.expense'
44 AND res_id IN
45 (select id from hr_expense_expense where state = 'cancelled');
46 """)

Subscribers

People subscribed via source and target branches