[19.0][OU-ADD] crm: Migration scripts#5706
Conversation
797fb16 to
73525be
Compare
|
/ocabot migration crm Depends on :
|
aa5b185 to
6648cdb
Compare
6648cdb to
bbe8e93
Compare
| # NOTHING TO DO | ||
|
|
||
| crm / crm.lead / mobile (char) : DEL | ||
| # DONE: if phone is empty and mobile not set phone with mobile |
There was a problem hiding this comment.
I think we should concatenate the mobile in the pone field in case both exist, or write it on the internal notes to not lose data. And put if done in pre-migration or post-migration.
There was a problem hiding this comment.
I had the feeling more case can appear so I tag it as case 1. If we concatenate that, can this cause trouble with phone_validation ?
| # NOTHING TO DO | ||
|
|
||
| crm / crm.lead / won_status (selection) : NEW selection_keys: ['lost', 'pending', 'won'], isfunction: function, stored | ||
| #DONE: set to prevent massive compute |
There was a problem hiding this comment.
| #DONE: set to prevent massive compute | |
| # DONE: pre-migration: pre-created column and set it to prevent massive computation |
There was a problem hiding this comment.
And I see you have done it on post-migration, so this is not preventing anything.
|
|
||
| crm / crm.stage / team_id (many2one) : DEL relation: crm.team | ||
| crm / crm.stage / team_ids (many2many) : NEW relation: crm.team | ||
| # Done: Transform m2o to m2m |
There was a problem hiding this comment.
| # Done: Transform m2o to m2m | |
| # DONE: post-migration: Transform m2o to m2m |
| @openupgrade.migrate() | ||
| def migrate(env, version): | ||
| # do not load noupdate_changes.xml, because all entries are problematic | ||
| # the necessary changes are done manually in the _load_data_* functions below |
There was a problem hiding this comment.
Why the color loading in the stages is problematic? cc @hbrunn
There was a problem hiding this comment.
I assume that is because what happens if those records were eliminated by the user, but in this can be manged by the https://github.com/OCA/openupgradelib/blob/ac165a1dccd1fba4f09fb15c194420cdaa4672af/openupgradelib/openupgrade.py#L434
Am i wrong?
There was a problem hiding this comment.
it's indeed problematic when the stages are deleted. for this hack to be active, you need to pass mode='init_no_create', and then also pass an xml transformation to remove overwriting the config parameter. also a way to go, but not really simpler than what happens now. would be future proof for subsequent changes to the file though
There was a problem hiding this comment.
OK, the forcecreate="False" parameter is the defining one. Then please:
- Specify the real reasons, not only to mention "conflicting".
- Put the
load_datainstruction, but commented, to give context.
cc @Tecnativa TT58614
@pedrobaeza