Error in base_setup while creating a new database

Bug #309331 reported by Jan Verlaan
2
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
Stephane Wirtel (OpenERP)

Bug Description

revno: 1426
branch nick: server
timestamp: Thu 2008-12-18 11:20:03 +0100
Python2.4 on Debian Etch

Reproduction:
Create a new database, fill your company details and in next screen choose profile "Service Profile"
With module "module account_analytic_analysis" the installer stops in FATAL ERROR and the database is half populated with the service profile.

The final error In short: File "/openerp/server/bin/sql_db.py", line 121, in execute -> ProgrammingError: syntax error at or near "EXISTS" at character 14

tracelog:
*******
*******
[Thu Dec 18 14:27:41 2008] INFO:init:module hr_timesheet_sheet: loading hr_timesheet_sheet_demo.xml
[Thu Dec 18 14:27:41 2008] INFO:init:module account_analytic_analysis: registering objects
[Thu Dec 18 14:27:41 2008] INFO:init:module account_analytic_analysis loading objects
[Thu Dec 18 14:27:41 2008] INFO:init:module account_analytic_analysis: creating or updating database tables
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[01]: Exception in call: Traceback (most recent call last):
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[02]: File "/openerp/server/bin/wizard/__init__.py", line 73, in execute_cr
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[03]: action_res = action(self, cr, uid, data, context)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[04]: File "/openerp/addons/base_setup/wizard/wizard_base_setup.py", line 195, in _update
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[05]: (db, pool)=pooler.restart_pool(cr.dbname, update_module=True)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[06]: File "/openerp/server/bin/pooler.py", line 55, in restart_pool
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[07]: return get_db_and_pool(db_name, force_demo, update_module=update_module)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[08]: File "/openerp/server/bin/pooler.py", line 38, in get_db_and_pool
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[09]: addons.load_modules(db, force_demo, status, update_module)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[10]: File "/openerp/server/bin/addons/__init__.py", line 588, in load_modules
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[11]: load_module_graph(cr, graph, status, report=report)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[12]: File "/openerp/server/bin/addons/__init__.py", line 480, in load_module_graph
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[13]: init_module_objects(cr, m, modules)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[14]: File "/openerp/server/bin/addons/__init__.py", line 262, in init_module_objects
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[15]: obj.init(cr)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[16]: File "/openerp/addons/account_analytic_analysis/account_analytic_analysis.py", line 621, in init
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[17]: cr.execute('DROP VIEW IF EXISTS account_analytic_analysis_summary_month')
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[18]: File "/openerp/server/bin/sql_db.py", line 76, in wrapper
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[19]: return f(self, *args, **kwargs)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[20]: File "/openerp/server/bin/sql_db.py", line 121, in execute
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[21]: res = self._obj.execute(query, p or None)
[Thu Dec 18 14:27:41 2008] ERROR:web-services:[22]: ProgrammingError: syntax error at or near "EXISTS" at character 14

Changed in openobject-server:
assignee: nobody → matrixise
Changed in openobject-server:
status: New → Fix Released
Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

provided Solution is creating a new error in CRM module! ...

revno: 2044
branch nick: addons
timestamp: Thu 2008-12-18 15:02:48 +0100

revno: 1427
branch nick: server
timestamp: Thu 2008-12-18 15:02:32 +0100

NameError: global name 'drop_view_if_exists' is not defined

Reproduction:
Create a new company database, after filling in the company data you can choose the company profile.
Choose for the "Service Profile"
Hereafter you must choose the specific modules to install. Check all modules. (specially the CRM ones)

The installer stops with a FATAL ERROR and the database is not populated correct.

Trace log:
*****
*****
[Thu Dec 18 15:41:13 2008] INFO:init:module crm_configuration: registering objects
[Thu Dec 18 15:41:13 2008] INFO:init:module crm_configuration loading objects
[Thu Dec 18 15:41:13 2008] INFO:init:module crm_configuration: creating or updating database tables
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[01]: Traceback (most recent call last):
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[02]: File "/openerp/server/bin/osv/osv.py", line 85, in execute_cr
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[03]: return getattr(object, method)(cr, uid, *args, **kw)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[04]: File "/openerp/addons/profile_service/profile_service.py", line 67, in action_install
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[05]: db, pool = pooler.restart_pool(cr.dbname, update_module=True)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[06]: File "/openerp/server/bin/pooler.py", line 55, in restart_pool
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[07]: return get_db_and_pool(db_name, force_demo, update_module=update_module)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[08]: File "/openerp/server/bin/pooler.py", line 38, in get_db_and_pool
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[09]: addons.load_modules(db, force_demo, status, update_module)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[10]: File "/openerp/server/bin/addons/__init__.py", line 588, in load_modules
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[11]: load_module_graph(cr, graph, status, report=report)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[12]: File "/openerp/server/bin/addons/__init__.py", line 480, in load_module_graph
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[13]: init_module_objects(cr, m, modules)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[14]: File "/openerp/server/bin/addons/__init__.py", line 262, in init_module_objects
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[15]: obj.init(cr)
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[16]: File "/openerp/addons/crm_configuration/report/crm_report.py", line 89, in init
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[17]: drop_view_if_exists(cr, "report_crm_case_section_stage")
[Thu Dec 18 15:41:13 2008] ERROR:web-services:[18]: NameError: global name 'drop_view_if_exists' is not defined

Changed in openobject-server:
status: Fix Released → In Progress
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Don't forget to upgrade your server please.

Changed in openobject-server:
status: In Progress → Fix Released
Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

I have done a "bzr pull" on all directories (server, addons, addons-extra, web, client)
I did a "./setup.py install" in /server directory.
Restarted the client.
I did create a total new database and the 2e error popup. (NameError: global name 'drop_view_if_exists' is not defined) but the first error is gone.

Did I miss something? Please advice if this is the case.
Thanks in advance,
Jan

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote : Re: [Bug 309331] Re: Error in base_setup while creating a new database

Janneman wrote:
> I have done a "bzr pull" on all directories (server, addons, addons-extra, web, client)
> I did a "./setup.py install" in /server directory.
> Restarted the client.
> I did create a total new database and the 2e error popup. (NameError: global name 'drop_view_if_exists' is not defined) but the first error is gone.
>
> Did I miss something? Please advice if this is the case.
> Thanks in advance,
> Jan
>
I will check on an other computer, but on mine, this is works fine !

--
Stephane Wirtel - "As OpenERP is OpenSource, please feel free to contribute."
Developper - Technical Instructor OpenERP
OpenERP - Tiny SPRL
Chaussee de Namur, 40
B-1367 Gerompont
Tel: +32.81.81.37.00
Web: http://www.tiny.be
Web: http://www.openerp.com
Planet: http://www.openerp.com/planet/
Blog: http://stephane-wirtel-at-tiny.blogspot.com

Changed in openobject-server:
milestone: none → 5.0-rc2
status: Fix Released → In Progress
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Ok, sorry, this is my fault.

You can upgrade your addons directory

Changed in openobject-server:
status: In Progress → Fix Released
Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Thanks Stephane,

I finished now to setup a new company with profile "Service with all options on" :-) :-) :-)
Great!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.