From dc844d92b6652206bfdf60ca20006ae10edb60f7 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Tue, 8 Nov 2011 13:07:54 +0100 Subject: [PATCH] [IMP] edi: cleanup comments, copyright years, etc. bzr revid: odo@openerp.com-20111108120754-vzhmszqy02a4ovkt --- addons/account/edi/invoice_action_data.xml | 2 +- addons/edi/__openerp__.py | 2 - addons/edi/models/res_company.py | 4 +- addons/edi/models/res_currency.py | 44 +------------------ addons/edi/models/res_partner.py | 4 +- .../edi/purchase_order_action_data.xml | 2 +- addons/sale/edi/sale_order_action_data.xml | 2 +- 7 files changed, 8 insertions(+), 52 deletions(-) diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index c38b1f8829a..32a2f1ea2f9 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -3,7 +3,7 @@ - + if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context) code ir.actions.server diff --git a/addons/edi/__openerp__.py b/addons/edi/__openerp__.py index 54635a54f48..4d96780b10c 100644 --- a/addons/edi/__openerp__.py +++ b/addons/edi/__openerp__.py @@ -45,8 +45,6 @@ technical OpenERP documentation at http://doc.openerp.com ], 'js': [ 'static/src/js/edi.js', - #'static/src/js/edi_invoice.js', - #'static/src/js/edi_sale_purchase_order.js', ], "css": [ "static/src/css/edi.css" diff --git a/addons/edi/models/res_company.py b/addons/edi/models/res_company.py index 2cf863e6d3d..665dfb9487d 100644 --- a/addons/edi/models/res_company.py +++ b/addons/edi/models/res_company.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2011 Tiny SPRL (). +# OpenERP, Open Source Business Applications +# Copyright (c) 2011 OpenERP S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/edi/models/res_currency.py b/addons/edi/models/res_currency.py index 46f250ce347..d057f4e5bbc 100644 --- a/addons/edi/models/res_currency.py +++ b/addons/edi/models/res_currency.py @@ -61,46 +61,4 @@ class res_currency(osv.osv, EDIMixin): if rate: self.pool.get('res.currency.rate').create(cr, SUPERUSER_ID, {'currency_id': currency_id, 'rate': rate}, context=context) - return currency_id - - - - -#class res_currency(osv.osv): -# """Helper subclass for res.currency providing util methods for working with -# currencies in the context of EDI import/export. The res.currency object -# itself is not EDI-exportable by itself""" -# _inherit = "res.currency" -# -# -# -# -# def edi_export_currency(self, cr, uid, edi_record, currency, context=None): -# """Returns a dict representation of the given currency, suitable for -# inclusion in an EDI document. -# -# :param EDIMixin edi_record: record for which the currency is being exported -# :param browse_record currency: currency record to export -# :return: dict containing the address representation for the currency record, -# similar to a normal EDI Many2One record, with some extra data. -# """ -# result = edi_record.edi_m2o(cr, uid, currency_id, context=context) -# currency = self.pool.get('res.partner').browse(currency_id) -# result.update(symbol=currency.symbol, -# rate=currency.rate) -# return result -# -# def edi_import_currency(self, cr, uid, edi_record, currency, context=None): -# """Retrieve and possibly create a currency EDI specification``[external_id,value]`` for the -# given model, returning the corresponding database ID: -# -# :param EDIMixin edi_record: record for which the currency is being exported -# :param browse_record currency: currency record to export -# :return: dict containing the address representation for the currency record, -# similar to a normal EDI Many2One record, with some extra data. -# """ -# result = edi_record.edi_m2o(cr, uid, currency_id, context=context) -# currency = self.pool.get('res.partner').browse(currency_id) -# result.update(symbol=currency.symbol, -# rate=currency.rate) -# return result \ No newline at end of file + return currency_id \ No newline at end of file diff --git a/addons/edi/models/res_partner.py b/addons/edi/models/res_partner.py index ed82272ea2e..18ec01eb765 100644 --- a/addons/edi/models/res_partner.py +++ b/addons/edi/models/res_partner.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- ############################################################################## # -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (). +# OpenERP, Open Source Business Applications +# Copyright (c) 2011 OpenERP S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index a9065dd28b3..057f95c852c 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -3,7 +3,7 @@ - + if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='purchase.email_template_edi_purchase', context=context) code ir.actions.server diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml index 3dccb161bda..512ed993b3b 100644 --- a/addons/sale/edi/sale_order_action_data.xml +++ b/addons/sale/edi/sale_order_action_data.xml @@ -3,7 +3,7 @@ - + if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context) code ir.actions.server