Model Mapping / Record Filter

Model Mapping / Record Filter

Postby cscmvi » Fri Oct 30, 2009 2:38 pm

Greetings from Tampere, Finland!

How is the fields dictionary used in the record filter python expression? I can't seem to understand it's data model.

br, Marko

ps. The server_migration module is great work!
cscmvi
 
Posts: 2
Joined: Fri Oct 30, 2009 2:28 pm

Re: Model Mapping / Record Filter

Postby sraps » Fri Oct 30, 2009 8:14 pm

cscmvi wrote:Greetings from Tampere, Finland!

How is the fields dictionary used in the record filter python expression? I can't seem to understand it's data model.

br, Marko

ps. The server_migration module is great work!


Hi, I have noticed some activity from Finland on OpenERP. I really appreciate your interest in our work.

Well as I do not make mappings by myself - I made analysis and a concept of this model, probably, I will not tell exact usage of this environment variable....

This is intended to make more advanced mappings. For example when one object on donating system produces two objects on receiving base.

This is an example from one of our mappings, hope this will help you.

Code: Select all
if fields['type']!='contact':
     is_valid=True
else:
     is_valid=False


We are almost ready with some sample data for this module. It will actually be ready made mappings to move migration mappings from one server to another. This is important for not recreating similar stuff, but reuse them in other migration projects. As you would probably do with Partners and other common models.

Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: Model Mapping / Record Filter

Postby cscmvi » Fri Oct 30, 2009 9:26 pm

Got my test working. Thanks a lot for your help Kaspars! So it was a basic python dictionary variable. :oops:

Forgot to mention in earlier post that the source file wizard_model_compare.py had an issue that prevents action 'Model fields on New and Old Server' from functioning:

To get it right, change the line:
compare_models_wizard('migration.models_compare.menu')
To:
compare_models_wizard('migration.import_models.menu')

And yes, reusability of mappings is an important factor. Great to hear that enhancement is on it's way. Indeed, you guys are doing a very remarkable work for the OpenErp community.

br, Marko
cscmvi
 
Posts: 2
Joined: Fri Oct 30, 2009 2:28 pm

Re: Model Mapping / Record Filter

Postby sraps » Thu Nov 05, 2009 2:44 pm

We have released a bugfix release for migration modules as well as couple of other modules too.

Please take a look, as it should correct this error too.

Thank you for involvement!

Best regards,
Kaspars
sraps
 
Posts: 403
Joined: Mon May 04, 2009 10:04 pm

Re: Model Mapping / Record Filter

Postby watson70 » Mon Oct 13, 2014 7:56 am

I have been using OpenERP V5 for about two years now for my very small company (one person so far :D ). I'd like to switch to V6. :D
watson
watson70
 
Posts: 1
Joined: Mon Oct 13, 2014 7:54 am


Return to Server Data Migration

cron
Copyright © 2001 Alistek Ltd., ALL RIGHTS RESERVED