Merge lp:~sylvain-legal/openupgrade-server/three-functions-for-addons-migration into lp:openupgrade-server
Status: | Rejected |
---|---|
Rejected by: | Holger Brunn (Therp) |
Proposed branch: | lp:~sylvain-legal/openupgrade-server/three-functions-for-addons-migration |
Merge into: | lp:openupgrade-server |
Diff against target: |
100 lines (+85/-0) 2 files modified
openerp/openupgrade/openupgrade.py (+38/-0) openerp/openupgrade/openupgrade_70.py (+47/-0) |
To merge this branch: | bzr merge lp:~sylvain-legal/openupgrade-server/three-functions-for-addons-migration |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stefan Rijnhart (Opener) | Needs Fixing | ||
Review via email: mp+174668@code.launchpad.net |
Description of the change
1/ Add a file openupgrade_70.py containing specific function for the migration of modules from xx -> 7.0.
def get_partner_
def get_partner_
2/ Add a function warn_possible_
Typical use :
openupgrade-addons / product / ... / post-migration.py
# [...]
possible_
{'table' : 'product_template', 'field' : 'loc_case', 'new_module' : 'stock',},
{'table' : 'product_template', 'field' : 'purchase_ok', 'new_module' : 'purchase',},
# [...]
]
@openupgrade.
def migrate(cr, version):
# [...]
openupgrade
# [...]
Again, the question of having copyright assigned to George Arbitbol pops up.
warn_possible_ dataloss: Can you tell me the exact use case for this function? I noticed that in 7.0, a number of functionalies have been split off to separate 'glue' modules. For example, there is now sale_stock for functionality that was first in the sale and stock modules. However, this module will be installed automatically if sale and stock are both installed, which will be the case if you have the sale module installed in 6.1 as it still depended on stock.
The other methods seem very useful to me. I have three minor comments for them.
l.58: I think mentioning the year is useful for copyright assignments.
# This module copyright (C) 2013 Georges Abitbol
l.87: you are not supposed to perform variable substitution inline when using cr.execute() (unless you are substituting table names as there is no other way). The following should work:
WHERE id=%s""", address_ id,))
(partner_
Same for l. 99.