credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05957
[Merge] lp:~therp-nl/openupgrade-addons/7.0-analytic_state_to_project into lp:openupgrade-addons
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-addons/7.0-analytic_state_to_project into lp:openupgrade-addons.
Requested reviews:
OpenUpgrade Committers (openupgrade-committers)
For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-addons/7.0-analytic_state_to_project/+merge/219435
See https://code.launchpad.net/~yann-papouin/openupgrade-addons/7.0-bug-1318686-project/+merge/219214 for discussion
--
https://code.launchpad.net/~therp-nl/openupgrade-addons/7.0-analytic_state_to_project/+merge/219435
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-addons/7.0-analytic_state_to_project into lp:openupgrade-addons.
=== modified file 'project/migrations/7.0.1.1/openupgrade_analysis_work.txt'
--- project/migrations/7.0.1.1/openupgrade_analysis_work.txt 2014-03-10 14:27:54 +0000
+++ project/migrations/7.0.1.1/openupgrade_analysis_work.txt 2014-05-13 22:03:48 +0000
@@ -7,7 +7,7 @@
### -> New complete model for categorizing tasks. It can be none category. (Nothing to do)
project / project.project / state (selection) : NEW required: required, selection_keys: ['cancelled', 'close', 'draft', 'open', 'pending', 'template'], req_default: open
-### -> This state field has been moved from analytic account to the project. Done.
+### -> This state field has been decoupled from the one on analytic account, but with the same selection -> copy its values
project / project.task / stage_id (many2one) : NEW relation: project.task.type
project / project.task / type_id (many2one) : DEL relation: project.task.type
=== modified file 'project/migrations/7.0.1.1/post-migration.py'
--- project/migrations/7.0.1.1/post-migration.py 2014-05-13 21:52:19 +0000
+++ project/migrations/7.0.1.1/post-migration.py 2014-05-13 22:03:48 +0000
@@ -25,12 +25,12 @@
def copy_state_from_analytic_account(cr):
openupgrade.logged_query(cr, """
UPDATE project_project pp
- SET state = account_analytic_account.%s
+ SET state = account_analytic_account.state
FROM project_project
INNER JOIN account_analytic_account
ON account_analytic_account.id = project_project.analytic_account_id
WHERE pp.analytic_account_id is not NULL
- """ %(openupgrade.get_legacy_name('state')))
+ """)
def short_name(name):
"""Keep first word(s) of name to make it small enough
=== modified file 'project/migrations/7.0.1.1/pre-migration.py'
--- project/migrations/7.0.1.1/pre-migration.py 2014-03-27 10:43:36 +0000
+++ project/migrations/7.0.1.1/pre-migration.py 2014-05-13 22:03:48 +0000
@@ -22,9 +22,6 @@
from openupgrade import openupgrade
column_renames = {
- 'account_analytic_account':[
- ('state', None),
- ],
'project_task':[
('type_id', 'stage_id'),
],
Follow ups