Error with sql files OpenObject Server 6.0

Bug #610938 reported by Marcilene Ribeiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
Unassigned

Bug Description

When trying to run sql file, it generates the following error:

ERROR:common.message:Message global name 'fp' is not defined

To resolve the issue opened the __init__.py of addons and assigns the file fp.
Below:
 def process_sql_file(cr, file):
 + fp=file
        queries = fp.read().split(';')
        for query in queries:
            new_query = ' '.join(query.split())
            if new_query:
                cr.execute(new_query)

Related branches

Changed in openobject-server:
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Doty,
Thanks for reporting.
It has been fixed by revision 2559 <email address hidden>.

Changed in openobject-server:
importance: Undecided → Medium
milestone: none → 6.0
status: Confirmed → Fix Released
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.