Browse Source

[MIG] Migrate module from 8.0 to 9.0

pull/1047/head
Mourad Elhadj Mimoune 8 years ago
committed by aheficent
parent
commit
55784681d3
  1. 2
      sql_export/__init__.py
  2. 4
      sql_export/__openerp__.py
  3. 1
      sql_export/models/__init__.py
  4. 0
      sql_export/models/sql_export.py
  5. 3
      sql_export/views/sql_export_view.xml
  6. 3
      sql_export/wizard/wizard_file.py

2
sql_export/__init__.py

@ -1,2 +1,2 @@
from . import sql_export
from . import models
from . import wizard from . import wizard

4
sql_export/__openerp__.py

@ -20,7 +20,7 @@
############################################################################## ##############################################################################
{'name': 'SQL Export', {'name': 'SQL Export',
'version': '0.1',
'version': '9.0.1.0.0',
'author': 'Akretion,Odoo Community Association (OCA)', 'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'http://www.akretion.com', 'website': 'http://www.akretion.com',
'license': 'AGPL-3', 'license': 'AGPL-3',
@ -29,7 +29,7 @@
'depends': ['base', 'depends': ['base',
], ],
'data': [ 'data': [
'sql_export_view.xml',
'views/sql_export_view.xml',
'wizard/wizard_file_view.xml', 'wizard/wizard_file_view.xml',
'security/sql_export_security.xml', 'security/sql_export_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',

1
sql_export/models/__init__.py

@ -0,0 +1 @@
from . import sql_export

0
sql_export/sql_export.py → sql_export/models/sql_export.py

3
sql_export/sql_export_view.xml → sql_export/views/sql_export_view.xml

@ -51,7 +51,8 @@
</record> </record>
<menuitem id="sql_export_menu" name="Sql Export" parent="base.menu_reporting" sequence="80"/>
<menuitem id="sql_export_menu" name="Sql Export"
parent="base.menu_reporting_dashboard" sequence="80"/>
<menuitem id="sql_export_menu_view" name="Sql Export" parent="sql_export_menu" action="sql_export_tree_action" sequence="1"/> <menuitem id="sql_export_menu_view" name="Sql Export" parent="sql_export_menu" action="sql_export_tree_action" sequence="1"/>

3
sql_export/wizard/wizard_file.py

@ -85,7 +85,8 @@ class SqlFileWizard(models.TransientModel):
variable_dict['company_id'] = self.env.user.company_id.id variable_dict['company_id'] = self.env.user.company_id.id
if "%(user_id)s" in sql_export.query: if "%(user_id)s" in sql_export.query:
variable_dict['user_id'] = self._uid variable_dict['user_id'] = self._uid
format_query = self.env.cr.mogrify(sql_export.query, variable_dict).decode('utf-8')
format_query = self.env.cr.mogrify(
sql_export.query, variable_dict).decode('utf-8')
query = "COPY (" + format_query + ") TO STDOUT WITH " + \ query = "COPY (" + format_query + ") TO STDOUT WITH " + \
sql_export.copy_options sql_export.copy_options
name = 'export_query_%s' % uuid.uuid1().hex name = 'export_query_%s' % uuid.uuid1().hex

Loading…
Cancel
Save