Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
8889 Lượt xem

I had successfully migrated from Odoo 8 to Odoo 9, however 2 things i noticed which was not happening. Guess probably I would have missed a cue.


In the module say product, in which post-migration.py script exists, I had added additional SQL execute statement, to my surprise it didn't get executed !! strange


Secondly, openupgrade server is not considering my custom addon path, even though I had clearly specified in the config file, and the same is been explicitly passed while running migrate.py.

Am I missing something.



Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Added the solution, if anyone is looking for it.

Openupgrade creates a copy of addon in the tmp folder to perform its migration.

Hence first paste the link of custom-addon directory into that tmp folder.(/var/tmp/openupgrade/9.0/)

and then include those custom-addon in the file 'migrate.py'.

migrate.py 

migrations = {
    '9.0': {
        'addons': {
            'addons': {
                'type': 'link',
                'url': os.path.join('server', 'addons'),
            },
            'custom_addons': {
                'type': 'link',
                'url': os.path.join('custom_addons'),
            },
},


Note: If Custom addons exists for former version i.e 8.0 in this case, then the above steps applies for that as well. 


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

For the addons path, I had the same surprise. It seems the addons are only taken from the ~/.local/share/Odoo/addons/9.0 folder. Place your addons here and it should work.

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you, sure indeed I tried this, not a bad idea, however I found its better not to mix our custom modules while running migrate script, I mean once the base module migration is done, then if we just re-update the 'base' module, this will port all our custom module successfully..

Tác giả

But if you really want to include our custom path, then all you need to do is, copy custom addon into the tmp folder along with the addon, (note, openupgrade creates a copy of addon in the tmp folder to perform its migration) and there also exists a copy of migrate.py, in that we can append the custom-addon-name... this will help include our custom modules....

Do this, if it is really needed, else no need...

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 23
2230
1
thg 8 19
4513
1
thg 3 15
5571
DB Migration Đã xử lý
4
thg 12 22
5430
1
thg 5 25
2009