[FIX-BUG: lp:695038 OO-OReport Desiner]

lp bug: https://launchpad.net/bugs/695038 fixed

bzr revid: jam@tinyerp.com-20101229054521-p6lcfprxoi1ts4ib
This commit is contained in:
jam-openerp 2010-12-29 11:15:21 +05:30
parent a9719db5df
commit e0432a6800
4 changed files with 1 additions and 36 deletions

View File

@ -36,8 +36,7 @@ upload the report using the same wizard.
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': ['security/base_report_security.xml',
'wizard/base_report_design_view.xml'],
'init_xml': ['wizard/base_report_design_view.xml'],
'update_xml': ['base_report_designer_installer.xml'],
'demo_xml': [],
'installable': True,

View File

@ -140,28 +140,16 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
ErrorDialog("Connection Refuse...","Please enter valid Login/Password")
self.win.endExecute()
try:
ids = self.sock.execute(sDatabase,UID,sPassword, 'res.groups' , 'search', [('name','=','OpenOfficeReportDesigner')])
ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
dict_groups =self.sock.execute(sDatabase, UID,sPassword, 'res.groups' , 'read',ids,['users'])
except :
import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ServerParameter', LOG_ERROR, info)
if not len(ids) :
ErrorDialog("Group Not Found!!! Create a group named \n\n"'"OpenOfficeReportDesigner"'" \n\n ","","Group Name Error")
self.logobj.log_write('Group Error',LOG_WARNING, ':Create a group OpenOfficeReportDesigner using database %s' % (sDatabase))
self.win.endExecute()
if not len(ids_module):
ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error")
self.logobj.log_write('Module Not Found',LOG_WARNING, ':base_report_designer not install in database %s' % (sDatabase))
self.win.endExecute()
if UID not in dict_groups[0]['users']:
ErrorDialog("Connection Refuse...","You have not access these Report Designer")
self.logobj.log_write('Connection Refuse',LOG_WARNING, " Not Access Report Designer ")
self.win.endExecute()
else:
desktop=getDesktop()
doc = desktop.getCurrentComponent()

View File

@ -1,22 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data noupdate="1">
<record id="res_groups_openofficereportdesigner0" model="res.groups">
<field eval="[(6,0,[])]" name="menu_access"/>
<field eval="[(6,0,[])]" name="rule_groups"/>
<field eval="[(6,0,[ref('base.user_root')])]" name="users"/>
<field eval="&quot;&quot;&quot;OpenOfficeReportDesigner&quot;&quot;&quot;" name="name"/>
</record>
<record id="ir_model_access_openofficereportdesigner0" model="ir.model.access">
<field name="model_id" ref="base.model_ir_actions_report_xml"/>
<field eval="1" name="perm_read"/>
<field eval="&quot;&quot;&quot;OpenOfficeReportDesigner&quot;&quot;&quot;" name="name"/>
<field eval="1" name="perm_unlink"/>
<field eval="1" name="perm_write"/>
<field eval="1" name="perm_create"/>
<field name="group_id" ref="res_groups_openofficereportdesigner0"/>
</record>
</data>
</openerp>