LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2011, 05:44 AM   #1
thaladiyan
LQ Newbie
 
Registered: Jun 2011
Posts: 2

Rep: Reputation: Disabled
How to reduce the python version in Ubuntu - v11


Hi,
How to reduce the python version in ubuntu version 11 for OpenERP purpose.


any one reply...?

Last edited by thaladiyan; 08-18-2011 at 11:16 PM. Reason: python v2.7 installed in Ubuntu v11 -- for OpenERP support so which version support in python in OpenERP Ubuntu OS
 
Old 08-18-2011, 06:11 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Welcome to LQ.

Which version(s) of python is installed ?
What is the output from the command 'python --version' ?

Are you trying to install the Ubuntu 11.04 Natty packages ?
https://launchpad.net/openobject-client
https://launchpad.net/ubuntu/natty/i386/openerp-client

Or from source code ? Which version of OpenERP ?

..
 
Old 08-18-2011, 11:24 PM   #3
thaladiyan
LQ Newbie
 
Registered: Jun 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Welcome to LQ.

Which version(s) of python is installed ?
What is the output from the command 'python --version' ?

Are you trying to install the Ubuntu 11.04 Natty packages ?
https://launchpad.net/openobject-client
https://launchpad.net/ubuntu/natty/i386/openerp-client

Or from source code ? Which version of OpenERP ?

..
My Source code OpenERP version - 6.0

I m costmized in OpenERP v6.0 in Windows....but now i m that source code implemented Ubuntu Server edition python version not suppotted...how...?

my source code there....type error will be their...
---------------------------------------------------------
ERROR
======
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/openerp-server/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.7/dist-packages/openerp-server/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/openerp-server/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/openerp-server/addons/project/project.py", line 464, in create
aupa_obj.create(cr, uid, cus_user_project)
File "/usr/local/lib/python2.7/dist-packages/openerp-server/addons/project/project.py", line 1329, in create
super(employee_role_project, self).create(cr, uid, vals, context=context)
TypeError: super(type, obj): obj must be an instance or subtype of type



Source Code [ Error Line i mentioned font style Italic and UnderLine that string.....]
===========
def create(self, cr, uid, vals, context=None):
project_pool = self.pool.get('project.structure')
aprt_type_pool = self.pool.get('custom.apartment.type')
price_list_type_pool = self.pool.get('custom.price.list.type')
price_list_pool = self.pool.get('custom.price.list')
cpss_pool = self.pool.get('custom.payment.schedule.stages')
cpsh_pool = self.pool.get('custom.payment.schedule.header')
user_pool = self.pool.get('custom.user.details')
acc_vou_pool = self.pool.get('account.voucher')
acc_mov_pool = self.pool.get('account.move')
acc_journal_pool = self.pool.get('account.journal')
acc_batch_pool = self.pool.get('custom.voucher.batch.hdr')
usr_ids = user_pool.search(cr, uid, [('id','=',vals.get('role_id'))])
div_ids = self.search(cr, uid, [('div_code_id','=',vals.get('div_code_id')),('project_id','=',vals.get('project_id')),('role_id','=' ,vals.get('role_id'))])
if div_ids:
raise osv.except_osv(_('Invalid!'), _('Division and Project Should be unique for a User!'))
for s in user_pool.browse(cr, uid, usr_ids, context):
if div_ids:
raise osv.except_osv(_('Invalid!'), _('Division and Project Should be unique for a User!'))
if s:
cr.execute('select * from custom_division_user_rel where div_code_id=%s and uid=%s',(vals.get('div_code_id'),s.user_id.id))
res = cr.fetchall();
if not res:
cr.execute('insert into custom_division_user_rel(div_code_id,uid) values(%s,%s)', (vals.get('div_code_id'),s.user_id.id))
#pro_str_ids = project_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
#for pro_str in project_pool.browse(cr, uid, pro_str_ids, context):
# cr.execute('insert into project_structure_user_rel(project_structure_id,uid) values(%s,%s)', (pro_str.id,s.user_id.id))
pro_str_ids = project_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for pro_str in project_pool.browse(cr, uid, pro_str_ids, context):
cr.execute('insert into project_structure_user_rel(project_structure_id,uid) values(%s,%s)', (pro_str.id,s.user_id.id))

aprt_type_ids = aprt_type_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for aprt_type in aprt_type_pool.browse(cr, uid, aprt_type_ids, context):
#raise osv.except_osv(_('Error!'), _('%s-%s')%(aprt_type.id,s.user_id.id,))
cr.execute('insert into custom_apartment_type_user_rel(apartment_type_id,uid) values(%s,%s)', (aprt_type.id,s.user_id.id))

price_list_type_ids = price_list_type_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for pri_lst_type in price_list_type_pool.browse(cr, uid, price_list_type_ids, context):
cr.execute('insert into custom_price_list_type_user_rel(price_list_type_id,uid) values(%s,%s)', (pri_lst_type.id,s.user_id.id))

price_list_ids = price_list_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for pri_lst in price_list_pool.browse(cr, uid, price_list_ids, context):
cr.execute('insert into custom_price_list_user_rel(price_list_id,uid) values(%s,%s)', (pri_lst.id,s.user_id.id))

cpss_ids = cpss_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for cps_stage in cpss_pool.browse(cr, uid, cpss_ids, context):
cr.execute('insert into custom_payment_schedule_stages_user_rel(payment_schedule_stage_id,uid) values(%s,%s)', (cps_stage.id,s.user_id.id))

cpsh_ids = cpsh_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for cps_header in cpsh_pool.browse(cr, uid, cpsh_ids, context):
cr.execute('insert into custom_payment_schedule_header_user_rel(payment_schedule_header_id,uid) values(%s,%s)', (cps_header.id,s.user_id.id))

acv_ids = acc_vou_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for acv in acc_vou_pool.browse(cr, uid, acv_ids, context):
cr.execute('insert into account_voucher_rel(account_voucher_id,uid) values(%s,%s)', (acv.id,s.user_id.id))

acm_ids = acc_mov_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for acm in acc_mov_pool.browse(cr, uid, acm_ids, context):
cr.execute('insert into account_move_rel(account_move_id,uid) values(%s,%s)', (acm.id,s.user_id.id))

acj_ids = acc_journal_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for acj in acc_journal_pool.browse(cr, uid, acj_ids, context):
cr.execute('insert into account_journal_rel(account_journal_id,uid) values(%s,%s)', (acj.id,s.user_id.id))

batch_ids = acc_batch_pool.search(cr, uid, [('project_id','=',vals.get('project_id'))])
for batch in acc_batch_pool.browse(cr, uid, batch_ids, context):
cr.execute('insert into custom_voucher_batch_hdr_rel(custom_voucher_batch_hdr_id,uid) values(%s,%s)', (batch.id,s.user_id.id))

#raise osv.except_osv(_('Invalid action !'), _('%s,%s')%(vals.get('project_id'),s.user_id.id))

return super(employee_role_project, self).create(cr, uid, vals, context=context)

Last edited by thaladiyan; 08-18-2011 at 11:26 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu v10 or v11 commands cheat sheet banuazizi Linux - Newbie 4 07-17-2011 07:05 PM
Adding safely other python version yaximik Linux - Software 1 05-04-2011 12:49 PM
Updating version for the python thangappan Linux - Newbie 4 09-08-2009 01:46 AM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 12:05 PM
Need help in installing new python version.... Robert135 Linux - Software 1 12-30-2004 01:50 AM


All times are GMT -5. The time now is 09:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration