This forum is now just an archive. Use the new Q&A website
It is currently Wed Apr 23, 2014 11:14 am

All times are UTC + 2 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 12:24 pm 
Offline

Joined: Fri Mar 02, 2012 11:01 am
Posts: 3
Location: Switzerland
Most of the scripts posted by batonac are pre-scripts in our approach. This is to fix the conflicts from the official addons.
Post-script is to fix the conflicts introduced by your own customized modules.


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 12:26 pm 
Offline

Joined: Mon Nov 07, 2011 6:30 pm
Posts: 15
Location: Netherlands
The pre scripts, are those available at some location?
We only use certified modules so upgrading should be easy if I read your steps.


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 12:29 pm 
Offline

Joined: Fri Mar 02, 2012 11:01 am
Posts: 3
Location: Switzerland
It will be much easier in your case. I am not sure where you can find complete pre-scripts. I leave the question to someone who can answer.
batonac's script is already a good start.


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 12:47 pm 
Offline

Joined: Mon Nov 07, 2011 6:30 pm
Posts: 15
Location: Netherlands
fwang wrote:
It will be much easier in your case. I am not sure where you can find complete pre-scripts. I leave the question to someone who can answer.
batonac's script is already a good start.


Do you have an site of them?


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 12:51 pm 
Offline

Joined: Tue Jan 19, 2010 12:24 pm
Posts: 141
Location: Amsterdam
Hi,

the OpenUpgrade project already provides pre- and post-scripts for a number of modules. See http://readthedocs.org/docs/openupgrade-server/en/latest/modules60-61.html

Cheers,
Stefan.

_________________
http://therp.nl - OpenERP implementaties, Amsterdam, Nederland.


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 1:13 pm 
Offline

Joined: Mon Nov 07, 2011 6:30 pm
Posts: 15
Location: Netherlands
Stefan Rijnhart wrote:
Hi,

the OpenUpgrade project already provides pre- and post-scripts for a number of modules. See http://readthedocs.org/docs/openupgrade-server/en/latest/modules60-61.html

Cheers,
Stefan.


I am new to this, and the docs of that openupgrade is not that clear to me. Is there a howto available with the steps needed with the needed scripts and and files?


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 02, 2012 1:36 pm 
Offline

Joined: Tue Jan 19, 2010 12:24 pm
Posts: 141
Location: Amsterdam
Hi Johan,

Are all modules that you have installed covered by the project yet?

The OpenUpgrade server and addon projects on Launchpad contain the sources of OpenERP enriched with the migration scripts for the modules indicated. Installation is similar to the installation of OpenERP using bzr. Create a copy of your database, then run the OpenERP server from the commandline with the extra arguments

Code:
-d <copy-of-database> -u all --stop-after-init


Monitor the server log file during this process. You currently may have to run the command above several times until all new module dependencies are added (I am currently looking to fix that) and processed.

Chances are that you run into a fatal or serious error. Please report back to the OpenUpgrade project on Launchpad through the Bug or Answers sections.

Cheers,
Stefan.

_________________
http://therp.nl - OpenERP implementaties, Amsterdam, Nederland.


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Thu Mar 08, 2012 1:50 pm 
Offline

Joined: Mon Feb 23, 2009 2:20 pm
Posts: 5
Code:
update res_partner_bank set
bank_name = (select substring(name from 1 for 32) from res_bank where res_bank.id = res_partner_bank.bank),
bank_bic = (select bic from res_bank where res_bank.id = res_partner_bank.bank);


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Fri Mar 16, 2012 10:01 am 
Offline

Joined: Mon Feb 23, 2009 2:20 pm
Posts: 5
Other SQL

Code:
update ir_property
set name = 'property_stock_valuation_account_id'
where name = 'property_stock_variation';


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Thu Sep 20, 2012 4:47 pm 
Offline

Joined: Sat May 14, 2011 10:43 am
Posts: 3
Just successfully migrated from 6.0.1 to 6.1. I was moving a database to a new server, that had 6.1 installed, so I essentially used the sql commands on this thread.

There is one further proble I found. The module mail_gateway in version 6.0.3 became mail in 6.1. This created a duplicate view: res.partner.emails.info.inherit which defined the field Emails. This caused the form view of partners to display incorrectly.

Deleted the mail_gateway version of the view and all OK.


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Mon Oct 08, 2012 8:05 pm 
Offline

Joined: Mon Nov 07, 2011 6:30 pm
Posts: 15
Location: Netherlands
I tried to preform the update from 6.0.3 t0 6.1 but without success.
The server code seems ok but when I launch the GTK client I het this:
Code:
python bin/openerp-client.py -v -l debug
Traceback (most recent call last):
  File "bin/openerp-client.py", line 134, in <module>
    win.sig_login()
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/gui/main.py", line 1011, in sig_login
    self.sig_home_new(quiet=True, except_id=id)
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/gui/main.py", line 1166, in sig_home_new
    except_id=except_id)
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/gui/main.py", line 1154, in sig_win_new
    obj.execute(act_id, {'window':self.window})
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/action/main.py", line 87, in execute
    self._exec_action(res,datas,context)
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/action/main.py", line 147, in _exec_action
    limit=datas['limit'], auto_refresh=datas['auto_refresh'], auto_search = datas['auto_search'], search_view = datas['search_view'])
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/gui/window/__init__.py", line 48, in create
    auto_refresh=auto_refresh, auto_search=auto_search, search_view=search_view)
  File "/home/me/Temp/openerp-client-6.1.1/bin/modules/gui/window/form.py", line 75, in __init__
    show_search=True, window=self.window, limit=limit, readonly=bool(auto_refresh), auto_search=auto_search, search_view=search_view)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/screen/screen.py", line 134, in __init__
    view = self.add_view_id(view_id, view_type[0], help=help)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/screen/screen.py", line 594, in add_view_id
    toolbar=view.get('toolbar', False), submenu=view.get('submenu', False), name=view.get('name',False), context=context)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/screen/screen.py", line 640, in add_view
    view = parser.parse(self, root_node, self.fields, toolbar=toolbar, submenu=submenu, name=name, help=help)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/view/widget_parse.py", line 53, in parse
    wid, child, buttons, on_write = widget.parse(screen.resource, node, fields)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/view/form_gtk/parser.py", line 581, in parse
    _, widgets, saws, on_write = self.parse(model, node, fields, paned=hp)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/view/form_gtk/parser.py", line 591, in parse
    widget, widgets, saws, on_write = self.parse(model, node, fields, paned=paned)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/view/form_gtk/parser.py", line 572, in parse
    widget_act = action(self.window, self.parent, model, attrs)
  File "/home/me/Temp/openerp-client-6.1.1/bin/widget/view/form_gtk/action.py", line 46, in __init__
    raise Exception, 'ActionNotFound'
Exception: ActionNotFound


Any ideas?


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Tue Oct 09, 2012 9:33 am 
Offline

Joined: Wed Feb 16, 2005 12:26 pm
Posts: 2746
Location: Annecy & Toulon,France
johan.smits wrote:
I tried to preform the update from 6.0.3 t0 6.1 but without success.
how ?

_________________
SISalp's free openerp hosting http://sisalp.fr/openerp-serveur-gratuit.html


Top
 Profile  
 
 Post subject: Re: OpenERP 6.0.1 to 6.1
PostPosted: Tue Oct 09, 2012 9:45 am 
Offline

Joined: Mon Nov 07, 2011 6:30 pm
Posts: 15
Location: Netherlands
Redhatter wrote:
batonac wrote:
This allowed me to use my 6.0 database in 6.1! I've only found one error so far. When I hit the settings tab I get this message:
Quote:
Uncaught TypeError: Cannot read property 'view_mode' of undefined
http://localhost:8069/web/webclient/js? ... stock:5490

Is this something to be scared about? Can it be fixed?


Well, it's good to know those steps at least partially worked for someone else. I didn't strike your issue… the first thing I'd be looking at is any custom modules which you may have. To be honest, I have no idea, there's a lot of voodoo within OpenERP and I'm only just scratching the surface.

For completeness, the following is currently being used in a shell script to "automatically" migrate our production 6.0 instance over for a development 6.1 instance.

Code:
        echo '******************************************************'
        echo '** PLEASE NOTE: This is for migrating 6.0->6.1 only **'
        echo '******************************************************'
        psql --username=openerp --host=localhost ${dst_db} << END_PSQL
        -- Delete troublesome module certificates --
        DELETE FROM ir_module_module WHERE certificate='00899858104035139949';
        DELETE FROM ir_module_module WHERE certificate='001056784984222247309';
        DELETE FROM ir_module_module WHERE certificate='001278773815818292125';
        -- Add in new module fields --
        ALTER TABLE ir_module_module ADD COLUMN "sequence" integer;
        ALTER TABLE ir_module_module ALTER COLUMN "sequence" SET DEFAULT 100;
        ALTER TABLE ir_module_module ADD COLUMN complexity character varying(32);
        ALTER TABLE ir_module_module ADD COLUMN icon character varying(128);
        ALTER TABLE ir_module_module ADD COLUMN application boolean;
        ALTER TABLE ir_module_module ALTER COLUMN application SET DEFAULT false;
        -- Add in company resource fields --
        ALTER TABLE res_company ADD COLUMN expense_currency_exchange_account_id integer;
        COMMENT ON COLUMN res_company.expense_currency_exchange_account_id IS 'Expense Currency Rate';
        ALTER TABLE res_company ADD COLUMN income_currency_exchange_account_id integer;
        COMMENT ON COLUMN res_company.income_currency_exchange_account_id IS 'Income Currency Rate';
        -- Add in new model fields --
        ALTER TABLE ir_model_fields ADD column serialization_field_id int
                references ir_model_fields on delete cascade;
        -- Uninstall Thunderbird module --
        ALTER TABLE ONLY public.thunderbird_installer DROP CONSTRAINT thunderbird_installer_write_uid_fkey;
        ALTER TABLE ONLY public.thunderbird_installer DROP CONSTRAINT thunderbird_installer_create_uid_fkey;
        ALTER TABLE ONLY public.thunderbird_installer DROP CONSTRAINT thunderbird_installer_pkey;
        ALTER TABLE public.thunderbird_installer ALTER COLUMN id DROP DEFAULT;
        DROP SEQUENCE public.thunderbird_installer_id_seq;
        DROP TABLE public.thunderbird_installer;
        DELETE FROM ir_act_window WHERE name='Install Thunderbird Plug-In';
        DELETE FROM ir_act_window WHERE name='Thunderbird Plug-In Configuration';
        DELETE FROM ir_model_fields WHERE model LIKE 'thunderbird.%';
        DELETE FROM ir_model_fields WHERE name='thunderbird';
        DELETE FROM ir_model_access WHERE name='ir.actions.todo.thunderbird.installer';
        DELETE FROM ir_model_data WHERE module='thunderbird';
        DELETE FROM ir_model_data WHERE name LIKE '%thunderbird%';
        DELETE FROM ir_model WHERE model LIKE 'thunderbird.%';
        DELETE FROM ir_ui_menu WHERE name LIKE 'Thunderbird%';
        DELETE FROM ir_ui_view WHERE model LIKE 'thunderbird.%';
        DELETE FROM ir_ui_view WHERE name LIKE 'thunderbird.%';
        DELETE FROM ir_module_module WHERE name='thunderbird';
        DELETE FROM ir_translation WHERE name LIKE 'thunderbird%';
END_PSQL
        su openerp -c 'openerp-server \
                -c /etc/openerp/openerp-server.conf \
                --db_host=localhost \
                --log-level=debug \
                -r openerp \
                -d development \
                --update=all \
                --stop-after-init'
        # Run it again to make sure!
        su openerp -c 'openerp-server \
                -c /etc/openerp/openerp-server.conf \
                --db_host=localhost \
                --log-level=debug \
                -r openerp \
                -d development \
                --update=all \
                --stop-after-init'
        psql --username=openerp --host=localhost ${dst_db} << END_PSQL
        -- Having updated schemas, migrate contact last names --
        UPDATE res_partner_contact SET last_name=name;
        UPDATE res_partner_contact SET name=last_name||' '||first_name WHERE first_name IS NOT NULL;
        UPDATE res_partner_contact SET name=last_name WHERE first_name IS NULL;
        UPDATE res_partner_address SET contact_id=res_partner_job.contact_id FROM res_partner_job WHERE res_partner_job.address_id=res_partner_address.id AND res_partner_address.contact_id IS NULL;
        UPDATE res_partner_address SET function=res_partner_job.function FROM res_partner_job WHERE res_partner_job.address_id=res_partner_address.id AND res_partner_address.function IS NULL;
        UPDATE res_partner_address SET email=res_partner_job.email FROM res_partner_job WHERE res_partner_job.address_id=res_partner_address.id AND res_partner_address.email IS NULL;
        -- Fix action for scheduling --
        UPDATE ir_act_window SET context='{}' WHERE name like 'Schedule %' AND
                res_model like 'project.compute.%';
END_PSQL
        # Run once more
        su openerp -c 'openerp-server \
                -c /etc/openerp/openerp-server.conf \
                --db_host=localhost \
                --log-level=debug \
                -r openerp \
                -d development \
                --update=all \
                --stop-after-init'


This gets our particular instance about 90% there. Still some niggling issues, but it mostly works okay. The big issue being that the new base_contact module now looks for some information in res.partner.address instead of res.partner.job; so I've had to massage the database somewhat to get that data over.

I'm also looking at the project management stuff, Faces integration is lacking, I have some patches to fix some of this, but I'm also discovering that Faces has some rather critical omissions and is very difficult code to follow, and so I'm also looking at other options including integration of resourcelevel (written in Ruby) and/or going the DIY route.


As posted in this item.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP