← Back to team overview

openerp-india team mailing list archive

[Bug 1082924] Re: [Windows]Version 7 - Contracts Mgmt installation stops with error

 

Hi Carlos,

I'm not sure of that because it happens as soon you install/activate the
account analytic analysis. And as the contract management module has a
dependency on it, it activate the account analytic analysis once the
contract mngt module is installed.

The problem is with the init method of account_analytic_analysis.py file

ProgrammingError: syntax error at or near "with mu"
LINE 2: with mu as

def init(self, cr):
        tools.sql.drop_view_if_exists(cr, 'account_analytic_analysis_summary_user')
        cr.execute('''CREATE OR REPLACE VIEW account_analytic_analysis_summary_user AS (
            with mu as
                (select max(id) as max_user from res_users)
            , lu AS
                (SELECT   
                 l.account_id AS account_id,   
                 coalesce(l.user_id, 0) AS user_id,   
                 SUM(l.unit_amount) AS unit_amount   
             FROM account_analytic_line AS l,   
                 account_analytic_journal AS j   
             WHERE (j.type = 'general' ) and (j.id=l.journal_id)   
             GROUP BY l.account_id, l.user_id   
            )
            select (lu.account_id * mu.max_user) + lu.user_id as id,
                    lu.account_id as account_id,
                    lu.user_id as "user",
                    unit_amount
            from lu, mu)''')

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1082924

Title:
  [Windows]Version 7 - Contracts Mgmt installation stops with error

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  Contracts Management installation stops with an error.
  This is on Windows 7 using openerp-allinone-setup-7.0beta.exe, version OpenERP 6.2dev-20121116-000101.

  To replicate, create a new empty database, go to settings/module. Install Contracts Management. The module installation stops with the following error:
   
  OpenERP Server Error
  Client Traceback (most recent call last):
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\http.py", line 192, in dispatch
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\controllers\main.py", line 1225, in call_button
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\controllers\main.py", line 1159, in call_common
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\controllers\main.py", line 1183, in _call_kw
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\session.py", line 42, in proxy
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\session.py", line 30, in proxy_method
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\session.py", line 105, in send

  
  Server Traceback (most recent call last):
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\web\session.py", line 91, in send
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\netsvc.py", line 361, in dispatch_rpc
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\service\web_services.py", line 596, in dispatch
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\osv\osv.py", line 167, in execute_kw
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\osv\osv.py", line 121, in wrapper
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\osv\osv.py", line 176, in execute
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\osv\osv.py", line 164, in execute_cr
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\base\module\module.py", line 368, in button_immediate_install
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\base\module\module.py", line 418, in _button_immediate_function
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\pooler.py", line 39, in restart_pool
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\modules\registry.py", line 178, in new
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\modules\loading.py", line 337, in load_modules
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\modules\loading.py", line 248, in load_marked_modules
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\modules\loading.py", line 161, in load_module_graph
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\modules\module.py", line 377, in init_module_models
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\openerp\addons\account_analytic_analysis\account_analytic_analysis.py", line 530, in init
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\sql_db.py", line 162, in wrapper
    File "E:\Program Files\OpenERP 6.2dev-20121116-000101\Server\server\.\openerp\sql_db.py", line 227, in execute
  ProgrammingError: syntax error at or near "with mu"
  LINE 2:             with mu as
                      ^

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1082924/+subscriptions


References