credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #05407
[Merge] lp:~therp-nl/openupgrade-server/7.0-propagate_partner_fields into lp:openupgrade-server
Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-server/7.0-propagate_partner_fields into lp:openupgrade-server.
Requested reviews:
OpenUpgrade Committers (openupgrade-committers)
For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-propagate_partner_fields/+merge/180542
--
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-propagate_partner_fields/+merge/180542
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-server/7.0-propagate_partner_fields into lp:openupgrade-server.
=== modified file 'openerp/addons/base/migrations/7.0.1.3/post-migration.py'
--- openerp/addons/base/migrations/7.0.1.3/post-migration.py 2013-07-25 06:42:40 +0000
+++ openerp/addons/base/migrations/7.0.1.3/post-migration.py 2013-08-16 12:23:12 +0000
@@ -76,6 +76,9 @@
'mobile', 'phone', 'state_id', 'street', 'street2', 'type', 'zip',
'partner_id', 'name',
]
+ propagate_fields = [
+ 'lang', 'tz',
+ ]
partner_found = []
processed_ids = []
@@ -137,6 +140,11 @@
partner_vals.update({
'is_company': False,
'parent_id': address['partner_id']})
+ propagated_values = partner_obj.read(
+ cr, SUPERUSER_ID, address['partner_id'],
+ propagate_fields, load="_classic_read")
+ propagated_values.pop('id')
+ partner_vals.update(propagated_values)
create_partner(
address['id'], partner_vals, partner_defaults)
processed_ids.append(address['id'])
Follow ups