openerp-sage50 team mailing list archive
-
openerp-sage50 team
-
Mailing list archive
-
Message #00000
[Merge] lp:~openerp-sage50/openerp-sage-50/6.1-exportsage50 into lp:openerp-sage-50
Gestion-Ressources has proposed merging lp:~openerp-sage50/openerp-sage-50/6.1-exportsage50 into lp:openerp-sage-50.
Requested reviews:
OpenERP Sage 50 (openerp-sage50)
For more details, see:
https://code.launchpad.net/~openerp-sage50/openerp-sage-50/6.1-exportsage50/+merge/158246
[ADD] exportsage50
--
https://code.launchpad.net/~openerp-sage50/openerp-sage-50/6.1-exportsage50/+merge/158246
Your team OpenERP Sage 50 is requested to review the proposed merge of lp:~openerp-sage50/openerp-sage-50/6.1-exportsage50 into lp:openerp-sage-50.
=== added directory 'exportsage50'
=== added file 'exportsage50/__init__.py'
--- exportsage50/__init__.py 1970-01-01 00:00:00 +0000
+++ exportsage50/__init__.py 2013-04-10 23:45:26 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import wizard
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'exportsage50/__openerp__.py'
--- exportsage50/__openerp__.py 1970-01-01 00:00:00 +0000
+++ exportsage50/__openerp__.py 2013-04-10 23:45:26 +0000
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+ 'name': 'Export to Sage50',
+ 'version': '1.0',
+ "category": 'Accounting & Finance',
+ 'complexity': "easy",
+ 'description': """
+French version below
+
+Export accounting data from OpenErp to Sage50.
+====================================
+ Export accounting data from OpenErp to Sage50. The exportation generates the imp file to import in Sage50.
+
+
+Documentation : layout of the import file (.IMP)
+====================================
+A PDF document (in the /doc repository) gives more details about the .IMP file layout that can be imported into Sage 50. This document is part of the Sage 50 SDK (Software Development Kit) available for download at the following address : http://na.sage.com/sage-simply-accounting/lp/partners/sdk/?isnow=ssa.
+
+
+
+Sage 50: After creating .IMP file
+====================================
+Solution:
+Importing purchase invoices, purchase quotes, sales invoices and sales orders into Sage 50
+How to import purchase invoices, purchase quotes, sales invoices and sales orders?
+ You can import purchase invoices, purchase quotes, sales invoices and sales orders into Sage 50. The transaction(s) details should be in a text file with extension .IMP.
+
+
+After you have created the .IMP file, you can import the transaction(s) into Sage 50 by following these steps: (Account information is not included in the .IMP format because when importing the file, you will receive a pop-up screen to ask you "Select an Account to match".)
+
+From the Home Window, go to File, Import/Export
+Click on Import Transactions (the Import Transactions Wizard appears)
+Select on 'Import purchase invoices, purchase quotes, sales invoices, sales orders or time slips' and click Next
+You can now create a backup of your file
+Click Next
+Click on Browse and select the .IMP file previously created
+If the customer (or vendor) in the transaction(s) you are trying to import does not exist in the Sage 50 company, you will get a new window asking you if you want to add this customer (or vendor), or if you want to select another customer (or vendor) from the existing ones
+You will also get a similar window if the import file uses an inventory item which does not exist in Sage 50.
+You will see a summary of the imported transactions, click OK and then Finish.
+If you got any errors importing the data, open the .IMP file in Notepad and use the attached .PDF document to verify the file format. Once the errors have been corrected, you can try the import again.
+Note: View KB25664 for information about some possible errors when importing .IMP file. Sage Business Care plan does NOT include support for SDK. Please, contact one of our partners website for further assistance.
+
+Possible errors when importing purchase invoices, purchase quotes, sales invoices and/or sales orders
+====================================
+Questions and Answers
+Import started... Errors occurred while importing.
+Line x does not contain compatible tax information.
+Invalid date. The date must be between <date1> and <date2>.
+
+
+A: These are the possible reasons for getting any of these error messages when importing transactions into Simply Accounting:
+
+- The import file (extension .IMP) you are using does not have the proper format.
+ Refer to the KB article 25659 for more information about the format of the import file.
+
+- The transaction type is not enabled in the Simply Accounting company. To enable the feature, from the Home Window in Simply Accounting, go to Setup, Settings, Company, Features, make sure the type of transaction you want to import is checked
+
+- The dates in the import file do not match the fiscal year dates in Simply Accounting.
+ Open the import file in Notepad and make the necessary changes
+
+#####
+
+Exportation des données comptables de OpenERP vers Sage50.
+==============================================
+Ce module exporte des données comptables de OpenERP vers Sage50. Le module génére un fichier imp file qui peut être importé dans Sage50.
+
+Documentation : Format du fichier à importer (.IMP)
+====================================
+Un document .PDF (dans le répertoire /doc) donne plus de détails sur le format du fichier .IMP qui peut être importé dans Sage 50. Ce document fait parti du Kit de développement - SDK de Sage 50 qui peut-être téléchargé à l'adresse suivante : http://na.sage.com/sage-simply-accounting/lp/partners/sdk/?isnow=ssa.
+
+Guide d'utilisation export Sage 50
+========================================
+Comment exporter les données comptables à partir d'OpenERP?
+Un manuel d'utilisation est disponible dans le répertoire /doc du module.
+Il peut être également téléchargé sur le site de Gestion-Ressources à l'adresse suivante : http://gestion-ressources.com/contributions
+
+
+ """,
+ 'author': 'Gestion-Ressources (support@xxxxxxxxxxxxxxxxxxxxxx, El HADJI DEM)',
+ 'website': 'http://www.gestion-ressources.com',
+ 'images': [],
+ 'depends': ['account'],
+ 'init_xml': [],
+ 'update_xml': [
+ 'wizard/exportsage50.xml'
+ ],
+ 'demo_xml': [],
+ 'test':[],
+ 'installable': True,
+ 'auto_install': False,
+ 'certificate': '',
+ 'application': True,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added directory 'exportsage50/docs'
=== added file 'exportsage50/docs/Guide_Export_Sage_50_OpenERP_FR.pdf'
Binary files exportsage50/docs/Guide_Export_Sage_50_OpenERP_FR.pdf 1970-01-01 00:00:00 +0000 and exportsage50/docs/Guide_Export_Sage_50_OpenERP_FR.pdf 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/docs/dev-import.pdf'
Binary files exportsage50/docs/dev-import.pdf 1970-01-01 00:00:00 +0000 and exportsage50/docs/dev-import.pdf 2013-04-10 23:45:26 +0000 differ
=== added directory 'exportsage50/i18n'
=== added file 'exportsage50/i18n/fr.po'
--- exportsage50/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ exportsage50/i18n/fr.po 2013-04-10 23:45:26 +0000
@@ -0,0 +1,116 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * gr_exportsage50
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1-1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-02-25 15:57+0000\n"
+"PO-Revision-Date: 2013-02-25 15:57+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: gr_exportsage50
+#: field:exportsage,formats:0
+msgid "File Format"
+msgstr "Format de fichier"
+
+#. module: gr_exportsage50
+#: help:exportsage,invoice_ids:0
+msgid "This is the list of invoices that have been generated for this sales order. The same sales order may have been invoiced in several times (by line for example)."
+msgstr "Il s'agit de la liste des factures qui ont été générées pour les bons de commande. Les mêmes bons de commandes peuvent être facturés en plusieurs fois (par ligne, par exemple)."
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+msgid "Export done"
+msgstr "Export terminé"
+
+#. module: gr_exportsage50
+#: selection:exportsage,state:0
+msgid "get"
+msgstr "obtenir"
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+#: field:exportsage,invoice_ids:0
+msgid "Invoices"
+msgstr "Factures"
+
+#. module: gr_exportsage50
+#: field:exportsage,state:0
+msgid "unknown"
+msgstr "inconnu"
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+msgid "Create"
+msgstr "Créer"
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+msgid "This action allows you to export accounting data from OpenErp to Simply account.You should have the same configuration about the tax information"
+msgstr "Cette action vous permet d'exporter les données comptables de OpenErp vers Sage50.Vous devrez avoir la même configuration sur les taxes."
+
+#. module: gr_exportsage50
+#: field:exportsage,name:0
+msgid "Filename"
+msgstr "Nom du fichier"
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+#: model:ir.ui.menu,name:gr_exportsage50.menu_report
+msgid "Export to Sage50"
+msgstr "Exporter vers Sage50"
+
+#. module: gr_exportsage50
+#: code:addons/gr_exportsage50/wizard/exportsage50.py:72
+#, python-format
+msgid "You have to select at least 1 Invoice. And try again"
+msgstr "Vous devez sélectionner au moins 1 facture. Essayez à nouveau"
+
+#. module: gr_exportsage50
+#: model:ir.model,name:gr_exportsage50.model_exportsage
+msgid "Create imp file to export in sage50"
+msgstr "Créer un fichier .imp pour l'export vers sage50"
+
+#. module: gr_exportsage50
+#: selection:exportsage,state:0
+msgid "choose"
+msgstr "Choisir"
+
+#. module: gr_exportsage50
+#: field:exportsage,data:0
+msgid "File"
+msgstr "Fichier"
+
+#. module: gr_exportsage50
+#: code:addons/gr_exportsage50/wizard/exportsage50.py:72
+#, python-format
+msgid "Error"
+msgstr "Erreur"
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: gr_exportsage50
+#: view:exportsage:0
+msgid "_Close"
+msgstr "_Fermer"
+
+#. module: gr_exportsage50
+#: field:exportsage,config_logo:0
+msgid "Image"
+msgstr "Image"
+
+#. module: gr_exportsage50
+#: model:ir.actions.act_window,name:gr_exportsage50.action_account_invoice_generate_export
+msgid "Export accounting data to Sage50"
+msgstr "Exporter les données comptables vers Sage50"
+
=== added directory 'exportsage50/images'
=== added file 'exportsage50/images/accounting-hover.png'
Binary files exportsage50/images/accounting-hover.png 1970-01-01 00:00:00 +0000 and exportsage50/images/accounting-hover.png 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/accounting.png'
Binary files exportsage50/images/accounting.png 1970-01-01 00:00:00 +0000 and exportsage50/images/accounting.png 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/accounts.jpeg'
Binary files exportsage50/images/accounts.jpeg 1970-01-01 00:00:00 +0000 and exportsage50/images/accounts.jpeg 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/bank_statement.jpeg'
Binary files exportsage50/images/bank_statement.jpeg 1970-01-01 00:00:00 +0000 and exportsage50/images/bank_statement.jpeg 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/cash_register.jpeg'
Binary files exportsage50/images/cash_register.jpeg 1970-01-01 00:00:00 +0000 and exportsage50/images/cash_register.jpeg 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/chart_of_accounts.jpeg'
Binary files exportsage50/images/chart_of_accounts.jpeg 1970-01-01 00:00:00 +0000 and exportsage50/images/chart_of_accounts.jpeg 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/customer_invoice.jpeg'
Binary files exportsage50/images/customer_invoice.jpeg 1970-01-01 00:00:00 +0000 and exportsage50/images/customer_invoice.jpeg 2013-04-10 23:45:26 +0000 differ
=== added file 'exportsage50/images/journal_entries.jpeg'
Binary files exportsage50/images/journal_entries.jpeg 1970-01-01 00:00:00 +0000 and exportsage50/images/journal_entries.jpeg 2013-04-10 23:45:26 +0000 differ
=== added directory 'exportsage50/static'
=== added directory 'exportsage50/static/src'
=== added directory 'exportsage50/static/src/img'
=== added file 'exportsage50/static/src/img/icon.png'
Binary files exportsage50/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and exportsage50/static/src/img/icon.png 2013-04-10 23:45:26 +0000 differ
=== added directory 'exportsage50/wizard'
=== added file 'exportsage50/wizard/__init__.py'
--- exportsage50/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ exportsage50/wizard/__init__.py 2013-04-10 23:45:26 +0000
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import exportsage50
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
+
=== added file 'exportsage50/wizard/exportsage50.py'
--- exportsage50/wizard/exportsage50.py 1970-01-01 00:00:00 +0000
+++ exportsage50/wizard/exportsage50.py 2013-04-10 23:45:26 +0000
@@ -0,0 +1,160 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv, fields
+from StringIO import StringIO
+import csv
+import web
+import urllib2
+import urllib
+import base64
+import cStringIO
+import tools
+from tools.translate import _
+from tools.misc import get_iso_codes
+import pooler
+import time
+from datetime import datetime
+import decimal_precision as dp
+
+
+class exportsage(osv.osv):
+
+ """
+ Wizard
+ """
+ _name = "exportsage"
+ _description = "Create imp file to export in sage50"
+ _inherit = "ir.wizard.screen"
+ _columns = {
+ 'data': fields.binary('File', readonly=True),
+ 'name': fields.char('Filename', 20, readonly=True),
+ 'formats': fields.char( 'File Format',10),
+ 'state': fields.selection( ( ('choose','choose'), # choose date
+ ('get','get'), # get the file
+ ) ),
+ 'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_export_rel', 'order_id', 'invoice_id', 'Invoices',required=True ,help="This is the list of invoices that have been generated for this sales order. The same sales order may have been invoiced in several times (by line for example)."),
+ }
+ _defaults = {
+ 'state': lambda *a: 'choose',
+ }
+ def act_cancel(self, cr, uid, ids, context=None):
+ #self.unlink(cr, uid, ids, context)
+ return {'type':'ir.actions.act_window_close' }
+
+
+ def act_destroy(self, *args):
+ return {'type':'ir.actions.act_window_close' }
+
+
+ def create_report(self,cr,uid,ids,context={}):
+ this = self.browse(cr, uid, ids)[0]
+ data = self.read(cr, uid, ids, [], context=context)[0]
+ if not data['invoice_ids']:
+ raise osv.except_osv(_('Error'), _('You have to select at least 1 Invoice. And try again'))
+
+ output = '<Version>''\n'+'"12001"'+','+'"1"''\n'+'</Version>\n\n'
+ #Faire le traitement des autres lignes dans les lignes de factures
+ pool=pooler.get_pool(cr.dbname)
+ line_obj=pool.get('account.invoice')
+ if 1==1:
+ for line in line_obj.browse(cr, uid, data['invoice_ids']):
+ #for line in line_obj.browse(cr, uid, ids):
+ # tag de debut pour les lignes de factures
+ output += '<SalInvoice>''\n'
+ #informations sur le client
+ customer_name = line.partner_id.name
+ oneTimefield ="" or ""
+ contact_name = line.partner_id.address[0].name or ""
+ street1 = line.partner_id.address[0].street or ""
+ street2 = line.partner_id.address[0].street2 or ""
+ city = line.partner_id.address[0].city or ""
+ province_state = line.partner_id.address[0].state_id.name or ""
+ zip_code = line.partner_id.address[0].zip or ""
+ country = line.partner_id.address[0].country_id.name or ""
+ phone1 = line.partner_id.address[0].phone or ""
+ mobile = line.partner_id.address[0].mobile or ""
+ fax = line.partner_id.address[0].fax or ""
+ email = line.partner_id.address[0].email or ""
+ # ligne de client
+ customer ='"'+customer_name+'"'+','+oneTimefield+',"'+contact_name+'"'+',"'+street1+'"'+',"'+street2+'"'+',"'+city+'"'+',"'+province_state+'"'+',"'+zip_code+'"'+',"'+country+'"'+',"'+phone1+'"'+',"'+mobile+'"'+',"'+fax+'"'+',"'+email+'"'
+ #print customer
+ #exit(0)
+ output += customer.encode('UTF-8')+'\n'
+ #informations sur la facture
+ no_of_details = str(len(line.abstract_line_ids))
+ order_no = "" or ""
+ invoice_no = str(line.number)
+ if line.date_invoice:
+ entry_date = datetime.strptime(line.date_invoice,"%Y-%m-%d").strftime('%m-%d-%Y') # date format : mm-dd-yyyy
+ else:
+ entry_date = ""
+ paid_by_type = str(0) # (between 0 and 3)
+ paid_by_source = "" or ""
+ total_amount = str(line.amount_total) or ""
+ freight_amount = str(0.00)
+ sale_invoice = '"'+no_of_details+'"'+',"'+order_no+'"'+',"'+invoice_no+'"'+',"'+entry_date+'"'+',"'+paid_by_type+'"'+',"'+paid_by_source+'"'+',"'+total_amount+'"'+',"'+freight_amount+'"'
+ output += sale_invoice.encode('UTF-8')+'\n'
+ product_line_invoice_with_taxe = ""
+ #Sale invoice detail lines
+ if line.abstract_line_ids:
+ for product in line.abstract_line_ids:
+ item_number = str(product.id)
+ quantity = str(product.quantity)
+ price = str(product.price_unit)
+ amount = product.quantity * product.price_unit
+ amount = str(round(amount,self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')))
+ one_product_invoice = '"'+item_number+'"'+',"'+quantity+'"'+',"'+price+'"'+',"'+amount+'"'
+ one_product_invoice = one_product_invoice.encode('UTF-8')
+ tax_product_line = ""
+ # tax information pour chaque produit
+ if product.invoice_line_tax_id:
+ for one_taxe in product.invoice_line_tax_id:
+ tax_name = one_taxe.name
+ if one_taxe.price_include:
+ tax_included = str(1) # 1=yes,0=No
+ else:
+ tax_included = str(0) # 1=yes,0=No
+ tax_refundable = str(1) # 1=yes,0=No
+ tax_rate = str(one_taxe.amount)
+ tax_amount = str(one_taxe.amount)
+ tax_product_line += ',"'+tax_name+'"'+',"'+tax_included+'"'+',"'+tax_refundable+'"'+',"'+tax_rate+'"'+',"'+tax_amount+'"'
+
+ #tax_product_line = tax_product_line[:-1]
+ tax_product_line = tax_product_line.encode('UTF-8')
+ product_line_invoice_with_taxe += one_product_invoice + tax_product_line+'\n'
+ #print product_line_invoice_with_taxe , exit(0)
+ output += product_line_invoice_with_taxe
+ # tag de fin pour les lignes de factures
+ #output += '</SalInvoice>\n'
+ output += '</SalInvoice>\n\n\n'
+ #output += '\n' + this.start_date + ',' + this.end_date
+ this.formats = 'imp'
+ filename = 'export_to_sage50'
+ this.name = "%s.%s" % (filename, this.formats)
+ out=base64.encodestring(output)
+ return self.write(cr, uid, ids, {'state':'get', 'data':out, 'name':this.name, 'format' : this.formats}, context=context)
+
+
+exportsage()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'exportsage50/wizard/exportsage50.xml'
--- exportsage50/wizard/exportsage50.xml 1970-01-01 00:00:00 +0000
+++ exportsage50/wizard/exportsage50.xml 2013-04-10 23:45:26 +0000
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <!-- =========== VIEWS =========== -->
+ <record id="account_invoice_generate_export_view" model="ir.ui.view">
+ <field name="name">Export to Sage50</field>
+ <field name="model">exportsage</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Export to Sage50" col="3" >
+ <group col="2" fill="0" height="2500" states="choose">
+ <label colspan="4" width="220" string="This action allows you to export accounting data from OpenErp to Simply account.You should have the same configuration about the tax information"/>
+ <separator string="Invoices" colspan="4"/>
+ <field name="invoice_ids" colspan="4" nolabel="1"/>
+ <separator colspan="2"/>
+ <group colspan="2">
+ <button special="cancel" icon="gtk-cancel" string="Cancel"/>
+ <button type="object" name="create_report" icon="gtk-go-forward"
+ string="Create"/>
+ </group>
+ <field invisible="1" name="state"/>
+ <field invisible="1" name="formats"/>
+ </group>
+ <group col="3" fill="0" states="get">
+ <separator colspan="3" string="Export done"/>
+ <field name="name" invisible="1" width="100"/>
+ <field name="data" nolabel="1" readonly="1" filename="name" colspan="4"/>
+ <button icon="gtk-close" name="act_destroy" special="cancel" string="_Close" type="object"/>
+ </group>
+ </form>
+ </field>
+ </record>
+ <!-- =========== ACTIONS =========== -->
+ <record id="action_account_invoice_generate_export" model="ir.actions.act_window">
+ <field name="name">Export accounting data to Sage50</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">exportsage</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="account_invoice_generate_export_view"/>
+ <field name="target">new</field>
+ </record>
+ <!-- =========== MENU ITEMS =========== -->
+ <menuitem id="menu_report" name="Export to Sage50"
+ action="action_account_invoice_generate_export"
+ parent="account.menu_finance_reporting"
+ sequence="40" />
+ </data>
+</openerp>
+
Follow ups