← Back to team overview

avanzosc team mailing list archive

[Merge] lp:~avanzosc/openerp-spain/optimizacion_remesas into lp:openerp-spain/6.0

 

Urtzi Odriozola has proposed merging lp:~avanzosc/openerp-spain/optimizacion_remesas into lp:openerp-spain/6.0.

Requested reviews:
  Jordi Esteve (www.zikzakmedia.com) (jesteve-zikzakmedia)

For more details, see:
https://code.launchpad.net/~avanzosc/openerp-spain/optimizacion_remesas/+merge/83640

+ Optimizacion de código en creación de remesa (cobros en pago directo)
+ Tratamiento de archivo de devolución de remesas
-- 
https://code.launchpad.net/~avanzosc/openerp-spain/optimizacion_remesas/+merge/83640
Your team Avanzosc Developers is subscribed to branch lp:~avanzosc/openerp-spain/optimizacion_remesas.
=== added directory 'account_payment_extension'
=== added file 'account_payment_extension/__init__.py'
--- account_payment_extension/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/__init__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import payment
+import account_invoice
+import account_move_line
+import wizard

=== added file 'account_payment_extension/__openerp__.py'
--- account_payment_extension/__openerp__.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/__openerp__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,61 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    "name" : "Account Payment Extension",
+    "version" : "1.1",
+    "author" : "Zikzakmedia SL",
+    "category" : "Generic Modules/Accounting",
+    "website" : "www.zikzakmedia.com",
+    "license" : "GPL-3",
+    "description": """Account payment extension.
+
+This module extends the account_payment module with a lot of features:
+    * Definition of payment types (cash, bank transfer, automatical bank transfer, ...). The payment type has a translatable name and note that can be shown in the invoices.
+    * Two default payment types for partners (client and supplier).
+    * Automatic selection of payment type in invoices. Now an invoice can have a payment term (30 days, 30/60 days, ...) and a payment type (cash, bank transfer, ...).
+    * A default check field in partner bank accounts. The default partner bank accounts are selected in invoices and payments.
+    * New menu/tree/forms to see payments to receive and payments to pay.
+    * The payments show tree editable fields: Due date, bank account and a check field (for example to write down if a bank check in paper support has been received).
+    * Two types of payment orders: Payable payment orders (from supplier invoices) and receivable payment orders (from client invoices). So we can make payment orders to receive the payments of our client invoices. Each payment order type has its own sequence.
+    * The payment orders allow negative payment amounts. So we can have payment orders for supplier invoices (pay money) and refund supplier invoices (return or receive money). Or for client invoices (receive money) and refund client invoices (return or pay money).
+    * Payment orders: Selected invoices are filtered by payment type, the second message communication can be set at the same time for several invoices.
+Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).
+""",
+    "depends" : [
+        "base",
+        "account",
+        "account_payment",
+        ],
+    "init_xml" : [],
+    "demo_xml" : [],
+    "update_xml" : [
+        'security/ir.model.access.csv',
+        "payment_wizard.xml",
+        "payment_view.xml",
+        "payment_sequence.xml",
+        ],
+    "active": False,
+    "installable": True,
+}
+

=== added file 'account_payment_extension/account_invoice.py'
--- account_payment_extension/account_invoice.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/account_invoice.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,134 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import netsvc
+from osv import fields, osv
+
+class account_invoice(osv.osv):
+    _inherit='account.invoice'
+    _columns={
+        'payment_type': fields.many2one('payment.type', 'Payment type'),
+    }
+
+    def onchange_partner_id(self, cr, uid, ids, type, partner_id, date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
+        # Copy partner data to invoice, also the new field payment_type
+        result = super(account_invoice, self).onchange_partner_id(cr, uid, ids, type, partner_id, date_invoice, payment_term, partner_bank_id, company_id)
+        payment_type = False
+        if partner_id:
+            partner_line = self.pool.get('res.partner').browse(cr, uid, partner_id)
+            if partner_line:
+                if type=='in_invoice' or type=='in_refund':
+                    payment_type = partner_line.payment_type_supplier.id
+                else:
+                    payment_type = partner_line.payment_type_customer.id
+            if payment_type:
+                result['value']['payment_type'] = payment_type
+        return self.onchange_payment_type(cr, uid, ids, payment_type, partner_id, result)
+
+    def onchange_payment_type(self, cr, uid, ids, payment_type, partner_id, result = None):
+        if result is None:
+            result = {'value': {}}
+        if payment_type and partner_id:
+            bank_types = self.pool.get('payment.type').browse(cr, uid, payment_type).suitable_bank_types
+            if bank_types: # If the payment type is related with a bank account
+                bank_types = [bt.code for bt in bank_types]
+                partner_bank_obj = self.pool.get('res.partner.bank')
+                args = [('partner_id', '=', partner_id), ('default_bank', '=', 1), ('state', 'in', bank_types)]
+                bank_account_id = partner_bank_obj.search(cr, uid, args)
+                if bank_account_id:
+                    result['value']['partner_bank_id'] = bank_account_id[0]
+                    return result
+        result['value']['partner_bank_id'] = False
+        return result
+
+    def action_move_create(self, cr, uid, ids, *args):
+        ret = super(account_invoice, self).action_move_create(cr, uid, ids, *args)
+        if ret:
+            for inv in self.browse(cr, uid, ids):
+                move_line_ids = []
+                for move_line in inv.move_id.line_id:
+                    if (move_line.account_id.type == 'receivable' or move_line.account_id.type == 'payable') and move_line.state != 'reconciled' and not move_line.reconcile_id.id:
+                        move_line_ids.append(move_line.id)
+                if len(move_line_ids) and inv.partner_bank_id:
+                    aml_obj = self.pool.get("account.move.line")
+                    aml_obj.write(cr, uid, move_line_ids, {'partner_bank_id': inv.partner_bank_id.id})
+        return ret
+
+    def refund(self, cr, uid, ids, date=None, period_id=None, description=None, journal_id=None):
+        invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'currency_id', 'invoice_line', 'tax_line', 'journal_id', 'payment_type'])
+        obj_invoice_line = self.pool.get('account.invoice.line')
+        obj_invoice_tax = self.pool.get('account.invoice.tax')
+        obj_journal = self.pool.get('account.journal')
+        new_ids = []
+        for invoice in invoices:
+            del invoice['id']
+
+            type_dict = {
+                'out_invoice': 'out_refund', # Customer Invoice
+                'in_invoice': 'in_refund',   # Supplier Invoice
+                'out_refund': 'out_invoice', # Customer Refund
+                'in_refund': 'in_invoice',   # Supplier Refund
+            }
+
+            invoice_lines = obj_invoice_line.read(cr, uid, invoice['invoice_line'])
+            invoice_lines = self._refund_cleanup_lines(cr, uid, invoice_lines)
+
+            tax_lines = obj_invoice_tax.read(cr, uid, invoice['tax_line'])
+            tax_lines = filter(lambda l: l['manual'], tax_lines)
+            tax_lines = self._refund_cleanup_lines(cr, uid, tax_lines)
+            if journal_id:
+                refund_journal_ids = [journal_id]
+            elif invoice['type'] == 'in_invoice':
+                refund_journal_ids = obj_journal.search(cr, uid, [('type','=','purchase_refund')])
+            else:
+                refund_journal_ids = obj_journal.search(cr, uid, [('type','=','sale_refund')])
+
+            if not date:
+                date = time.strftime('%Y-%m-%d')
+            invoice.update({
+                'type': type_dict[invoice['type']],
+                'date_invoice': date,
+                'state': 'draft',
+                'number': False,
+                'invoice_line': invoice_lines,
+                'tax_line': tax_lines,
+                'journal_id': refund_journal_ids
+            })
+            if period_id:
+                invoice.update({
+                    'period_id': period_id,
+                })
+            if description:
+                invoice.update({
+                    'name': description,
+                })
+            # take the id part of the tuple returned for many2one fields
+            for field in ('address_contact_id', 'address_invoice_id', 'partner_id',
+                    'account_id', 'currency_id', 'payment_term', 'journal_id', 'payment_type'):
+                invoice[field] = invoice[field] and invoice[field][0]
+            # create the new invoice
+            new_ids.append(self.create(cr, uid, invoice))
+
+        return new_ids
+
+account_invoice()

=== added file 'account_payment_extension/account_move_line.py'
--- account_payment_extension/account_move_line.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/account_move_line.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,190 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import netsvc
+from osv import fields, osv
+
+class account_move_line(osv.osv):
+    _name = 'account.move.line'
+    _inherit = 'account.move.line'
+
+    def _invoice(self, cr, uid, ids, name, arg, context=None):
+        return super(account_move_line, self)._invoice(cr, uid, ids, name, arg, context)
+
+    def _invoice_search(self, cr, uid, obj, name, args, context={}):
+        """ Redefinition for searching account move lines without any invoice related ('invoice.id','=',False)"""
+        for x in args:
+            if (x[2] is False) and (x[1] == '=') and (x[0] == 'invoice'):
+                cr.execute('SELECT l.id FROM account_move_line l ' \
+                    'LEFT JOIN account_invoice i ON l.move_id = i.move_id ' \
+                    'WHERE i.id IS NULL', [])
+                res = cr.fetchall()
+                if not len(res):
+                    return [('id', '=', '0')]
+                return [('id', 'in', [x[0] for x in res])]
+        return super(account_move_line, self)._invoice_search(cr, uid, obj, name, args, context=context)
+
+    def amount_to_pay(self, cr, uid, ids, name, arg={}, context={}):
+        """
+        Return amount pending to be paid taking into account payment lines and the reconciliation.
+        Note that the amount to pay can be due to negative supplier refund invoices or customer invoices.
+        """
+
+        if not ids:
+            return {}
+        cr.execute("""SELECT ml.id,
+                    CASE WHEN ml.amount_currency < 0
+                        THEN - ml.amount_currency
+                        WHEN ml.amount_currency > 0
+                        THEN ml.amount_currency
+                        ELSE ml.credit - ml.debit
+                    END AS debt,
+                    (SELECT coalesce(sum(CASE WHEN pl.type='receivable' THEN -amount_currency ELSE amount_currency END),0)
+                        FROM payment_line pl
+                            INNER JOIN payment_order po
+                                ON (pl.order_id = po.id)
+                        WHERE 
+                            pl.move_line_id = ml.id AND
+                            pl.payment_move_id IS NULL AND 
+                            po.state != 'cancel'
+                    ) AS paid,
+                    (
+                        SELECT
+                            COALESCE( SUM(COALESCE(amrl.credit,0) - COALESCE(amrl.debit,0)), 0 )
+                        FROM
+                            account_move_reconcile amr,
+                            account_move_line amrl
+                        WHERE
+                            amr.id = amrl.reconcile_partial_id AND
+                            amr.id = ml.reconcile_partial_id
+                    ) AS unreconciled,
+                    reconcile_id
+                    FROM account_move_line ml
+                    WHERE id in (%s)""" % (",".join([str(int(x)) for x in ids])))
+        result = {}
+        for record in cr.fetchall():
+            id = record[0]
+            debt = record[1] or 0.0
+            paid = record[2]
+            unreconciled = record[3]
+            reconcile_id = record[4]
+            if reconcile_id:
+                debt = 0.0
+            else:
+                if not unreconciled:
+                    unreconciled = debt
+                if debt > 0:
+                    debt = min(debt - paid, max(0.0, unreconciled))
+                else:
+                    debt = max(debt - paid, min(0.0, unreconciled))
+            result[id] = debt
+        return result
+
+    def _to_pay_search(self, cr, uid, obj, name, args, context={}):
+        if not len(args):
+            return []
+        currency = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.currency_id
+
+        # For searching we first discard reconciled moves because the filter is fast and discards most records
+        # quickly.
+        ids = self.pool.get('account.move.line').search(cr, uid, [('reconcile_id','=',False)], context=context)
+        records = self.pool.get('account.move.line').read(cr, uid, ids, ['id', 'amount_to_pay'], context)
+        ids = []
+        for record in records:
+            if not self.pool.get('res.currency').is_zero( cr, uid, currency, record['amount_to_pay'] ):
+                ids.append( record['id'] )
+        if not ids:
+            return [('id','=',False)]
+        return [('id','in',ids)]
+
+    def _payment_type_get(self, cr, uid, ids, field_name, arg, context={}):
+        result = {}
+        invoice_obj = self.pool.get('account.invoice')
+        for rec in self.browse(cr, uid, ids, context):
+            result[rec.id] = (0,0)
+            invoice_id = invoice_obj.search(cr, uid, [('move_id', '=', rec.move_id.id)], context=context)
+            if invoice_id:
+                inv = invoice_obj.browse(cr, uid, invoice_id[0], context)
+                if inv.payment_type:
+                    result[rec.id] = (inv.payment_type.id, self.pool.get('payment.type').browse(cr, uid, inv.payment_type.id, context).name)
+            else:
+                result[rec.id] = (0,0)
+        return result
+
+    def _payment_type_search(self, cr, uid, obj, name, args, context={}):
+        if not len(args):
+            return []
+        operator = args[0][1]
+        value = args[0][2]
+        if not value:
+            return []
+        if isinstance(value, int) or isinstance(value, long):
+            ids = [value]
+        elif isinstance(value, list):
+            ids = value 
+        else:
+            ids = self.pool.get('payment.type').search(cr,uid,[('name','ilike',value)], context=context)
+        if ids:
+            cr.execute('SELECT l.id ' \
+                'FROM account_move_line l, account_invoice i ' \
+                'WHERE l.move_id = i.move_id AND i.payment_type in (%s)' % (','.join(map(str, ids))))
+            res = cr.fetchall()
+            if len(res):
+                return [('id', 'in', [x[0] for x in res])]
+        return [('id','=','0')]
+
+    _columns = {
+        'invoice': fields.function(_invoice, method=True, string='Invoice',
+            type='many2one', relation='account.invoice', fnct_search=_invoice_search),
+        'received_check': fields.boolean('Received check', help="To write down that a check in paper support has been received, for example."),
+        'partner_bank_id': fields.many2one('res.partner.bank','Bank Account'),
+        'amount_to_pay' : fields.function(amount_to_pay, method=True, type='float', string='Amount to pay', fnct_search=_to_pay_search),
+        'payment_type': fields.function(_payment_type_get, fnct_search=_payment_type_search, method=True, type="many2one", relation="payment.type", string="Payment type"),
+    }
+
+    def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
+        for key in vals.keys():
+            if key not in ['received_check', 'partner_bank_id', 'date_maturity']:
+                return super(account_move_line, self).write(cr, uid, ids, vals, context, check, update_check)
+        return super(account_move_line, self).write(cr, uid, ids, vals, context, check, update_check=False)
+
+    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False):
+        menus = [
+            self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_invoice_payments'),
+            self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'menu_action_done_payments'),
+        ]
+        menus = [m[1] for m in menus]
+        if 'active_id' in context and context['active_id'] in menus:
+            # Use standard views for account.move.line object
+            if view_type == 'search':
+                # Get a specific search view (bug in 6.0RC1, it does not give the search view defined in the action window)
+                view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_payment_extension', 'view_payments_filter')[1]
+            result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+        else:
+            # Use special views for account.move.line object (for ex. tree view contains user defined fields)
+            result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+        return result
+
+account_move_line()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'account_payment_extension/i18n'
=== added file 'account_payment_extension/i18n/account_payment_extension.pot'
--- account_payment_extension/i18n/account_payment_extension.pot	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/account_payment_extension.pot	2011-11-28 16:53:26 +0000
@@ -0,0 +1,466 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_extension
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.0-rc1\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-12-17 20:52:45+0000\n"
+"PO-Revision-Date: 2010-12-17 20:52:45+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: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr "Receivable"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type
+#: view:payment.type:0
+#: help:payment.type,name:0
+msgid "Payment Type"
+msgstr "Payment Type"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Direct Payment"
+msgstr "Direct Payment"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Payment order should create account moves but line with amount %.2f for partner \"%s\" has no account assigned."
+msgstr "Payment order should create account moves but line with amount %.2f for partner \"%s\" has no account assigned."
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Invalid model name in the action definition."
+
+#. module: account_payment_extension
+#: help:payment.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr "Specify the Code for Payment Type"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Pay"
+msgstr "Pay"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "You cannot delete payment order(s) which are already confirmed or done!"
+msgstr "You cannot delete payment order(s) which are already confirmed or done!"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_order
+msgid "Payment Order"
+msgstr "Payment Order"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Receive"
+msgstr "Receive"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "Invalid XML for View Architecture!"
+
+#. module: account_payment_extension
+#: field:payment.mode,require_bank_account:0
+msgid "Require Bank Account"
+msgstr "Require Bank Account"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr "Populate Statement with Payment lines"
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr "Payment Lines"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_line
+msgid "Payment Line"
+msgstr "Payment Line"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr "Error ! You can not create recursive Menu."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_mode
+msgid "Payment Mode"
+msgstr "Payment Mode"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr "Communication 2"
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr "Description of the payment type that will be shown in the invoices"
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr "Type"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Search Invoice Payments"
+msgstr "Search Invoice Payments"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+msgid "Suitable Bank Types"
+msgstr "Suitable Bank Types"
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr "_Add"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr "Description"
+
+#. module: account_payment_extension
+#: field:payment.type,company_id:0
+msgid "Company"
+msgstr "Company"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Account move line \"%s\" is not valid"
+msgstr "Account move line \"%s\" is not valid"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr "_Cancel"
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr "Payment type name"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr "Rec. payment order"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr "Payable"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr "Populate payment to pay"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_customer:0
+msgid "Customer Payment Type"
+msgstr "Customer Payment Type"
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,amount:0
+msgid "Next step will automatically select payments up to this amount."
+msgstr "Next step will automatically select payments up to this amount."
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr "Entries"
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr "Active"
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr "Select invoices to pay/receive payment"
+
+#. module: account_payment_extension
+#: help:payment.line,payment_move_id:0
+msgid "Account move that pays this debt."
+msgstr "Account move that pays this debt."
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr "The successor message of payment communication."
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payment"
+msgstr "Payment"
+
+#. module: account_payment_extension
+#: field:payment.order,create_account_moves:0
+msgid "Create Account Moves"
+msgstr "Create Account Moves"
+
+#. module: account_payment_extension
+#: field:payment.line,payment_move_id:0
+msgid "Payment Move"
+msgstr "Payment Move"
+
+#. module: account_payment_extension
+#: field:payment.line,account_id:0
+msgid "Account"
+msgstr "Account"
+
+#. module: account_payment_extension
+#: field:payment.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr "Suitable bank types"
+
+#. module: account_payment_extension
+#: help:payment.mode,require_bank_account:0
+msgid "Ensure all lines in the payment order have a bank account when proposing lines to be added in the payment order."
+msgstr "Ensure all lines in the payment order have a bank account when proposing lines to be added in the payment order."
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+#: field:payment.type,name:0
+msgid "Name"
+msgstr "Name"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr "Due Date"
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr "Default"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr "_Search"
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank_id:0
+msgid "Bank Account"
+msgstr "Bank Account"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr "_Add to payment order"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr "Invalid action!"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Unreconciled"
+msgstr "Unreconciled"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error!"
+msgstr "Error!"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,amount:0
+msgid "Amount"
+msgstr "Amount"
+
+#. module: account_payment_extension
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr "Select the Payment Type for the Payment Mode."
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr "Import payment lines"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payments"
+msgstr "Payments"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_supplier:0
+msgid "Supplier Payment Type"
+msgstr "Supplier Payment Type"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr "Payment type of the customer"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr "Pay. payment order"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_invoice_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_invoice_payments
+msgid "Invoice payments"
+msgstr "Invoice payments"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_done_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_done_payments
+msgid "Done payments"
+msgstr "Done payments"
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: model:ir.model,name:account_payment_extension.model_payment_type
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr "Payment type"
+
+#. module: account_payment_extension
+#: field:payment.type,code:0
+msgid "Code"
+msgstr "Code"
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr "Bank Details"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr "Bank Accounts"
+
+#. module: account_payment_extension
+#: field:payment.order,period_id:0
+msgid "Period"
+msgstr "Period"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Bank Statement"
+msgstr "Bank Statement"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr "Payment type of the supplier"
+
+#. module: account_payment_extension
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr "The Object name must start with x_ and not contain any special character !"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_move_line
+msgid "Journal Items"
+msgstr "Journal Items"
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid "To write down that a check in paper support has been received, for example."
+msgstr "To write down that a check in paper support has been received, for example."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_invoice
+msgid "Invoice"
+msgstr "Invoice"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Narration"
+msgstr "Narration"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner
+msgid "Partner"
+msgstr "Partner"
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr "Received check"
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr "Search Payment lines"
+
+#. module: account_payment_extension
+#: sql_constraint:ir.model.fields:0
+msgid "Size of the field can never be less than 1 !"
+msgstr "Size of the field can never be less than 1 !"
+
+#. module: account_payment_extension
+#: help:payment.order,create_account_moves:0
+msgid "Indicates when account moves should be created for order payment lines. \"Bank Statement\" will wait until user introduces those payments in bank a bank statement. \"Direct Payment\" will mark all payment lines as payied once the order is done."
+msgstr "Indicates when account moves should be created for order payment lines. \"Bank Statement\" will wait until user introduces those payments in bank a bank statement. \"Direct Payment\" will mark all payment lines as payied once the order is done."
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid "Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can have a payment term (30 days, 30/60 days, ...) and a payment type (cash, bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a check field (for example to write down if a bank check in paper support has been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier invoices) and receivable payment orders (from client invoices). So we can make payment orders to receive the payments of our client invoices. Each payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have payment orders for supplier invoices (pay money) and refund supplier invoices (return or receive money). Or for client invoices (receive money) and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the second message communication can be set at the same time for several invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+""
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,show_refunds:0
+msgid "Show Refunds"
+msgstr "Show Refunds"
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,show_refunds:0
+msgid "Indicates if search should include refunds."
+msgstr "Indicates if search should include refunds."
+
+

=== added file 'account_payment_extension/i18n/bg.po'
--- account_payment_extension/i18n/bg.po	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/bg.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,492 @@
+# Bulgarian translation for openobject-addons
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-17 20:52+0000\n"
+"PO-Revision-Date: 2011-03-30 07:27+0000\n"
+"Last-Translator: Dimitar Markov <dimitar.markov@xxxxxxxxx>\n"
+"Language-Team: Bulgarian <bg@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-06-15 05:50+0000\n"
+"X-Generator: Launchpad (build 13168)\n"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr "Приходен"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type
+#: view:payment.type:0
+#: help:payment.type,name:0
+msgid "Payment Type"
+msgstr "Вид на плащане"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Direct Payment"
+msgstr "Директно плащане"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"Payment order should create account moves but line with amount %.2f for "
+"partner \"%s\" has no account assigned."
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Невалидно име на модел при задаване на действие"
+
+#. module: account_payment_extension
+#: help:payment.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Pay"
+msgstr "Плащане"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"You cannot delete payment order(s) which are already confirmed or done!"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_order
+msgid "Payment Order"
+msgstr "Платежно нареждане"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Receive"
+msgstr "Приета"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.mode,require_bank_account:0
+msgid "Require Bank Account"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr "Редове от плащане"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_line
+msgid "Payment Line"
+msgstr "Ред от плащане"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr "Грешка! Не можете да създавате рекурсивни менюта."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_mode
+msgid "Payment Mode"
+msgstr "Режим на плащане"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr "Тип"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Search Invoice Payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.type:0
+msgid "Suitable Bank Types"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr "_Добавяне"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error !"
+msgstr "Грешка!"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr "Описание"
+
+#. module: account_payment_extension
+#: field:payment.type,company_id:0
+msgid "Company"
+msgstr "Фирма"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Account move line \"%s\" is not valid"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr "_Отказ"
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr "Платим"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_customer:0
+msgid "Customer Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,amount:0
+msgid "Next step will automatically select payments up to this amount."
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr "Записи"
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr "Активен"
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.line,payment_move_id:0
+msgid "Account move that pays this debt."
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payment"
+msgstr "Плащане"
+
+#. module: account_payment_extension
+#: field:payment.order,create_account_moves:0
+msgid "Create Account Moves"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.line,payment_move_id:0
+msgid "Payment Move"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.line,account_id:0
+msgid "Account"
+msgstr "Сметка"
+
+#. module: account_payment_extension
+#: field:payment.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr "Подходящи видове банки"
+
+#. module: account_payment_extension
+#: help:payment.mode,require_bank_account:0
+msgid ""
+"Ensure all lines in the payment order have a bank account when proposing "
+"lines to be added in the payment order."
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+#: field:payment.type,name:0
+msgid "Name"
+msgstr "Име"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr "Дата на падеж"
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr "По подразбиране"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr "_Търсене"
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank_id:0
+msgid "Bank Account"
+msgstr "Банкова сметка"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr "_Добавяне към платежно нареждане"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr "Невалидно действие!"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Unreconciled"
+msgstr "Неприравнен"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error!"
+msgstr "Грешка!"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,amount:0
+msgid "Amount"
+msgstr "Количество"
+
+#. module: account_payment_extension
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payments"
+msgstr "Плащания"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_supplier:0
+msgid "Supplier Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_invoice_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_invoice_payments
+msgid "Invoice payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_done_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_done_payments
+msgid "Done payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: model:ir.model,name:account_payment_extension.model_payment_type
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.type,code:0
+msgid "Code"
+msgstr "Код"
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr "Детайли за банката"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr "Банкови сметки"
+
+#. module: account_payment_extension
+#: field:payment.order,period_id:0
+msgid "Period"
+msgstr "Период"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Bank Statement"
+msgstr "Банково извлечение"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Името на обекта трябва да започва с x_ и не може да никакви специални знаци !"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid ""
+"To write down that a check in paper support has been received, for example."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_invoice
+msgid "Invoice"
+msgstr "Фактура"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Narration"
+msgstr "Разказ"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner
+msgid "Partner"
+msgstr "Контрагент"
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: sql_constraint:ir.model.fields:0
+msgid "Size of the field can never be less than 1 !"
+msgstr "Рамерът на полето никога не може да бъде по-малко от 1!"
+
+#. module: account_payment_extension
+#: help:payment.order,create_account_moves:0
+msgid ""
+"Indicates when account moves should be created for order payment lines. "
+"\"Bank Statement\" will wait until user introduces those payments in bank a "
+"bank statement. \"Direct Payment\" will mark all payment lines as payied "
+"once the order is done."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid ""
+"Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and "
+"note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can "
+"have a payment term (30 days, 30/60 days, ...) and a payment type (cash, "
+"bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner "
+"bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a "
+"check field (for example to write down if a bank check in paper support has "
+"been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier "
+"invoices) and receivable payment orders (from client invoices). So we can "
+"make payment orders to receive the payments of our client invoices. Each "
+"payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have "
+"payment orders for supplier invoices (pay money) and refund supplier "
+"invoices (return or receive money). Or for client invoices (receive money) "
+"and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the "
+"second message communication can be set at the same time for several "
+"invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,show_refunds:0
+msgid "Show Refunds"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,show_refunds:0
+msgid "Indicates if search should include refunds."
+msgstr ""

=== added file 'account_payment_extension/i18n/ca.po'
--- account_payment_extension/i18n/ca.po	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/ca.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,537 @@
+# Translation of OpenERP Server.
+# This file containt the translation of the following modules:
+# 	* account_payment_extension
+#
+# Albert Cervera i Areny <albert@xxxxxxxxxxx>, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.0-rc1\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-12-17 20:52+0000\n"
+"PO-Revision-Date: 2011-06-25 07:43+0000\n"
+"Last-Translator: cubells <vicent@xxxxxxxxxxxx>\n"
+"Language-Team: Catalan <kde-i18n-ca@xxxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-06-26 05:16+0000\n"
+"X-Generator: Launchpad (build 13168)\n"
+"Language: ca\n"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr "A cobrar"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type
+#: view:payment.type:0
+#: help:payment.type,name:0
+msgid "Payment Type"
+msgstr "Tipus de pagament"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Direct Payment"
+msgstr "Per pagament directe"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"Payment order should create account moves but line with amount %.2f for "
+"partner \"%s\" has no account assigned."
+msgstr ""
+"L'ordre de pagament hauria de crear els assentaments però la línia amb "
+"import %.2f i l'empresa \"%s\" no té cap compte comptable assignat."
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nom de model no vàlid en la definició de l'acció."
+
+#. module: account_payment_extension
+#: help:payment.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr "Specify the Code for Payment Type"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Pay"
+msgstr "A pagar"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"You cannot delete payment order(s) which are already confirmed or done!"
+msgstr "No podeu eliminar ordres de pagament confirmades ni realitzades!"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_order
+msgid "Payment Order"
+msgstr "Ordre de pagament"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Receive"
+msgstr "A cobrar"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML invàlid per a la definició de la vista!"
+
+#. module: account_payment_extension
+#: field:payment.mode,require_bank_account:0
+msgid "Require Bank Account"
+msgstr "Requereix compte bancari"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr "Emplena extracte amb línies de pagament"
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr "Pagaments"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_line
+msgid "Payment Line"
+msgstr "Línia de pagament"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr "Error! No podeu crear menús recursius."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_mode
+msgid "Payment Mode"
+msgstr "Mode de pagament"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr "Comunicació 2"
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr "Descripció del tipus de pagament que es mostrarà a les factures."
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr "Tipus"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Search Invoice Payments"
+msgstr "Cerca pagaments de factures"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+msgid "Suitable Bank Types"
+msgstr "Tipus de banc adequats"
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr "_Afegeix"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr "Descripció"
+
+#. module: account_payment_extension
+#: field:payment.type,company_id:0
+msgid "Company"
+msgstr "Companyia"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Account move line \"%s\" is not valid"
+msgstr "L'apunt \"%s\" no és vàlid."
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr "_Cancel·la"
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr "Nom tipus de pagament"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr "Ordres de cobrament"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr "A pagar"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr "Cerca pagaments a pagar/cobrar"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_customer:0
+msgid "Customer Payment Type"
+msgstr "Tipus de pagament client"
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,amount:0
+msgid "Next step will automatically select payments up to this amount."
+msgstr ""
+"El següent pas seleccionarà automàticament pagaments fins a arribar a aquest "
+"import."
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr "Entrades"
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr "Actiu"
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr "Selecciona factures a pagar/cobrar"
+
+#. module: account_payment_extension
+#: help:payment.line,payment_move_id:0
+msgid "Account move that pays this debt."
+msgstr "Assentament que paga aquest deute."
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr "El següent missatge del comunicat del pagament/cobrament."
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payment"
+msgstr "Pagament"
+
+#. module: account_payment_extension
+#: field:payment.order,create_account_moves:0
+msgid "Create Account Moves"
+msgstr "Crea els assentaments"
+
+#. module: account_payment_extension
+#: field:payment.line,payment_move_id:0
+msgid "Payment Move"
+msgstr "Assentament del pagament"
+
+#. module: account_payment_extension
+#: field:payment.line,account_id:0
+msgid "Account"
+msgstr "Compte"
+
+#. module: account_payment_extension
+#: field:payment.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr "Tipus de banc adequats"
+
+#. module: account_payment_extension
+#: help:payment.mode,require_bank_account:0
+msgid ""
+"Ensure all lines in the payment order have a bank account when proposing "
+"lines to be added in the payment order."
+msgstr ""
+"Assegura que totes les línies tenen compte bancari quan proposa les línies "
+"de pagament per afegir."
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+#: field:payment.type,name:0
+msgid "Name"
+msgstr "Nom"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr "Data venciment"
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr "Per defecte"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr "_Cerca"
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank_id:0
+msgid "Bank Account"
+msgstr "Compte bancari"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr "_Afegir a l'ordre de pagament"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr "Acció no vàlida!"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Unreconciled"
+msgstr "No conciliat"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error!"
+msgstr "Error!"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,amount:0
+msgid "Amount"
+msgstr "Import"
+
+#. module: account_payment_extension
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr "Seleccioneu el tipus de pagament pel mode de pagament."
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr "Importa línies de pagament"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payments"
+msgstr "Efectes"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_supplier:0
+msgid "Supplier Payment Type"
+msgstr "Tipus de pagament proveïdor"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr "Tipus de pagament com a client."
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr "Ordres de pagament"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_invoice_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_invoice_payments
+msgid "Invoice payments"
+msgstr "Efectes"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_done_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_done_payments
+msgid "Done payments"
+msgstr "Pagaments/cobraments realitzats"
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: model:ir.model,name:account_payment_extension.model_payment_type
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr "Tipus de pagament"
+
+#. module: account_payment_extension
+#: field:payment.type,code:0
+msgid "Code"
+msgstr "Codi"
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr "Detalls del banc"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr "Comptes bancaris"
+
+#. module: account_payment_extension
+#: field:payment.order,period_id:0
+msgid "Period"
+msgstr "Període"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Bank Statement"
+msgstr "Per l'extracte bancari"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr "Tipus de pagament com a proveïdor."
+
+#. module: account_payment_extension
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"El nom de l'objecte ha de començar amb x_ i no contenir cap caràcter "
+"especial!"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_move_line
+msgid "Journal Items"
+msgstr "Anotacions comptables"
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid ""
+"To write down that a check in paper support has been received, for example."
+msgstr ""
+"Serveix per indicar que s'ha rebut un xec en suport paper, per exemple."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Narration"
+msgstr "Descripció"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr "Xec rebut"
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr "Cerca línies de pagament"
+
+#. module: account_payment_extension
+#: sql_constraint:ir.model.fields:0
+msgid "Size of the field can never be less than 1 !"
+msgstr "La grandària del camp no pot ser menor que 1!"
+
+#. module: account_payment_extension
+#: help:payment.order,create_account_moves:0
+msgid ""
+"Indicates when account moves should be created for order payment lines. "
+"\"Bank Statement\" will wait until user introduces those payments in bank a "
+"bank statement. \"Direct Payment\" will mark all payment lines as payied "
+"once the order is done."
+msgstr ""
+"Indica quan s'haurien de crear els assentament comptables per les línies de "
+"pagament. \"Per l'extracte bancari\" esperarà fins que l'usuari introdueixi "
+"l'extracte bancari. \"Per pagament directe\" marcarà totes les línies com a "
+"pagades quan es realitzi aquesta ordre."
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid ""
+"Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and "
+"note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can "
+"have a payment term (30 days, 30/60 days, ...) and a payment type (cash, "
+"bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner "
+"bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a "
+"check field (for example to write down if a bank check in paper support has "
+"been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier "
+"invoices) and receivable payment orders (from client invoices). So we can "
+"make payment orders to receive the payments of our client invoices. Each "
+"payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have "
+"payment orders for supplier invoices (pay money) and refund supplier "
+"invoices (return or receive money). Or for client invoices (receive money) "
+"and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the "
+"second message communication can be set at the same time for several "
+"invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+msgstr ""
+"Extensió de pagaments comptables (Tresoreria).\n"
+"\n"
+"Aquest mòdul estén el mòdul account_payment amb moltes característiques:\n"
+"    * Extensió dels tipus de pagament: El tipus de pagament té un nom i una "
+"descripció traduïbles per mostrar en les factures.\n"
+"    * Dos tipus de pagament per defecte per a les empreses (client i "
+"proveïdor).\n"
+"    * Selecció automàtica del tipus de pagament en les factures. Ara, una "
+"factura pot tenir un termini de pagament (30 dies, 30/60 dies, ...) i un "
+"tipus de pagament (efectiu, transferència bancària, ...).\n"
+"    * Un camp seleccionable per defecte en els comptes bancaris de les "
+"empreses. Es selecciona el compte bancari per defecte de l'empresa en les "
+"factures i els pagaments.\n"
+"    * Nous menús / llistes / formularis per consultar els pagaments "
+"(efectes) a cobrar i a pagar.\n"
+"    * Els pagaments mostren camps editables a la llista: Data de venciment, "
+"compte bancari i un camp de verificació (per exemple, per indicar que s'ha "
+"rebut un xec bancari en suport paper).\n"
+"    * Dos tipus d'ordres de pagament / cobrament: les ordres de pagament (a "
+"partir de les factures de proveïdor) i les ordres de cobrament (a partir de "
+"les factures de client). Ara es pot fer ordres de cobrament (remeses de "
+"rebuts) per rebre els pagaments de les factures dels nostres clients. Cada "
+"tipus d'ordre de pagament té la seva pròpia seqüència.\n"
+"    * Les ordres de pagament / cobrament permeten quantitats en negatiu. "
+"Podem incloure en les ordres de pagament factures de proveïdor (pagament de "
+"diners) i factures d'abonament de proveïdor (devolució o rebre diners). O "
+"les factures de client (recepció de diners) i les factures d'abonament de "
+"client (devolució o pagament de diners).\n"
+"    * A les ordres de pagament: Les factures seleccionades són filtrades per "
+"tipus de pagament. Es pot indicar el segon missatge de la comunicació de la "
+"remesa al mateix temps per a diverses factures.\n"
+"Basat en el treball anterior de Pablo Rocandio i Zikzakmedia (versió 4.2).\n"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,show_refunds:0
+msgid "Show Refunds"
+msgstr "Mostra abonaments"
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,show_refunds:0
+msgid "Indicates if search should include refunds."
+msgstr "Indica si la cerca ha d'incloure abonaments."

=== added file 'account_payment_extension/i18n/es.po'
--- account_payment_extension/i18n/es.po	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/es.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,540 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* account_payment_extension
+#
+# Albert Cervera i Areny <albert@xxxxxxxxxxx>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.10\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-12-17 20:52+0000\n"
+"PO-Revision-Date: 2011-02-15 15:01+0000\n"
+"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
+"<jesteve@xxxxxxxxxxxxxxx>\n"
+"Language-Team: Catalan <kde-i18n-ca@xxxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-06-15 05:50+0000\n"
+"X-Generator: Launchpad (build 13168)\n"
+"Language: ca\n"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr "A cobrar"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type
+#: view:payment.type:0
+#: help:payment.type,name:0
+msgid "Payment Type"
+msgstr "Tipo de pago"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Direct Payment"
+msgstr "Por pago directo"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"Payment order should create account moves but line with amount %.2f for "
+"partner \"%s\" has no account assigned."
+msgstr ""
+"La orden de pago debe generar los asientos pero la línea con importe %.2f y "
+"empresa \"%s\" no tiene cuenta asignada."
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nombre de modelo no válido en la definición de la acción."
+
+#. module: account_payment_extension
+#: help:payment.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr "Indica el código del tipo de pago."
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Pay"
+msgstr "Efectos a pagar"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"You cannot delete payment order(s) which are already confirmed or done!"
+msgstr "¡No puede borrar ordenes de pago ya confirmadas o realizadas!"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_order
+msgid "Payment Order"
+msgstr "Orden de pago"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Receive"
+msgstr "A cobrar"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "¡XML inválido para la definición de la vista!"
+
+#. module: account_payment_extension
+#: field:payment.mode,require_bank_account:0
+msgid "Require Bank Account"
+msgstr "Requerir cuenta bancaria"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr "Rellenar extracto con líneas de pago"
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr "Pagos"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_line
+msgid "Payment Line"
+msgstr "Línea de pago"
+
+#. module: account_payment_extension
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr "¡Error! No puede crear menús recursivos."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_mode
+msgid "Payment Mode"
+msgstr "Modo de pago"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr "Comunicación 2"
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr "Descripción del tipo de pago que se mostrará en las facturas."
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Search Invoice Payments"
+msgstr "Buscar pagos de facturas"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+msgid "Suitable Bank Types"
+msgstr "Tipos de banco adecuados"
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr "_Añadir"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error !"
+msgstr "¡ Error !"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr "Descripción"
+
+#. module: account_payment_extension
+#: field:payment.type,company_id:0
+msgid "Company"
+msgstr "Compañía"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Account move line \"%s\" is not valid"
+msgstr "El apunte \"%s\" no es válido."
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr "_Cancelar"
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr "Nombre tipo de pago"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr "Órdenes de cobro"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr "A pagar"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr "Buscar pagos a pagar/cobrar"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_customer:0
+msgid "Customer Payment Type"
+msgstr "Tipo de pago cliente"
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,amount:0
+msgid "Next step will automatically select payments up to this amount."
+msgstr ""
+"El siguiente paso seleccionará automáticamente pagos hasta llegar a este "
+"importe."
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr "Entradas"
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr "Activo"
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr "Seleccionar facturas a pagar/cobrar"
+
+#. module: account_payment_extension
+#: help:payment.line,payment_move_id:0
+msgid "Account move that pays this debt."
+msgstr "Asiento que paga la deuda."
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr "El siguiente mensaje del comunicado del pago/cobro."
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payment"
+msgstr "Pago"
+
+#. module: account_payment_extension
+#: field:payment.order,create_account_moves:0
+msgid "Create Account Moves"
+msgstr "Crear asientos contables"
+
+#. module: account_payment_extension
+#: field:payment.line,payment_move_id:0
+msgid "Payment Move"
+msgstr "Asiento del pago"
+
+#. module: account_payment_extension
+#: field:payment.line,account_id:0
+msgid "Account"
+msgstr "Cuenta"
+
+#. module: account_payment_extension
+#: field:payment.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr "Tipos de banco adecuados"
+
+#. module: account_payment_extension
+#: help:payment.mode,require_bank_account:0
+msgid ""
+"Ensure all lines in the payment order have a bank account when proposing "
+"lines to be added in the payment order."
+msgstr ""
+"Asegura que todas las línease propuestas para incluir en la orden tienen "
+"cuenta bancaria."
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+#: field:payment.type,name:0
+msgid "Name"
+msgstr "Nombre"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr "Fecha vencimiento"
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr "Por defecto"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr "_Buscar"
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank_id:0
+msgid "Bank Account"
+msgstr "Cuenta bancaria"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr "_Añadir a la orden de pago"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr "Acción no válida!"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Unreconciled"
+msgstr "No conciliado"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error!"
+msgstr "¡Error!"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,amount:0
+msgid "Amount"
+msgstr "Importe"
+
+#. module: account_payment_extension
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr "Seleccione el tipo de pago para el modo de pago."
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr "Importar líneas de pago"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payments"
+msgstr "Efectos"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_supplier:0
+msgid "Supplier Payment Type"
+msgstr "Tipo de pago proveedor"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr "Tipo de pago como cliente."
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr "Órdenes de pago"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_invoice_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_invoice_payments
+msgid "Invoice payments"
+msgstr "Efectos"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_done_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_done_payments
+msgid "Done payments"
+msgstr "Pagos/cobros realizados"
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: model:ir.model,name:account_payment_extension.model_payment_type
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr "Tipo de pago"
+
+#. module: account_payment_extension
+#: field:payment.type,code:0
+msgid "Code"
+msgstr "Código"
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr "Detalles del banco"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr "Cuentas bancarias"
+
+#. module: account_payment_extension
+#: field:payment.order,period_id:0
+msgid "Period"
+msgstr "Período"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Bank Statement"
+msgstr "Por extracto bancario"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr "Tipo de pago como proveedor."
+
+#. module: account_payment_extension
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"¡El nombre del objeto debe empezar con x_ y no contener ningún carácter "
+"especial!"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_move_line
+msgid "Journal Items"
+msgstr "Apuntes"
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid ""
+"To write down that a check in paper support has been received, for example."
+msgstr ""
+"Sirve para indicar que se ha recibido un cheque en soporte papel, por "
+"ejemplo."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Narration"
+msgstr "Descripción"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr "Cheque recibido"
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr "Buscar líneas de pago"
+
+#. module: account_payment_extension
+#: sql_constraint:ir.model.fields:0
+msgid "Size of the field can never be less than 1 !"
+msgstr "¡El tamaño del campo no puede ser menor que 1!"
+
+#. module: account_payment_extension
+#: help:payment.order,create_account_moves:0
+msgid ""
+"Indicates when account moves should be created for order payment lines. "
+"\"Bank Statement\" will wait until user introduces those payments in bank a "
+"bank statement. \"Direct Payment\" will mark all payment lines as payied "
+"once the order is done."
+msgstr ""
+"Indica cuando se deben generar los asientos contables para las líneas de la "
+"orden de pago. \"Por extracto bancario\" esperará a que el usuario "
+"introduzca los pagos en el extracto bancario. \"Por pago directo\" marcará "
+"todas las líneas como pagadas cuando se realice la orden."
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid ""
+"Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and "
+"note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can "
+"have a payment term (30 days, 30/60 days, ...) and a payment type (cash, "
+"bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner "
+"bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a "
+"check field (for example to write down if a bank check in paper support has "
+"been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier "
+"invoices) and receivable payment orders (from client invoices). So we can "
+"make payment orders to receive the payments of our client invoices. Each "
+"payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have "
+"payment orders for supplier invoices (pay money) and refund supplier "
+"invoices (return or receive money). Or for client invoices (receive money) "
+"and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the "
+"second message communication can be set at the same time for several "
+"invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+msgstr ""
+"Extensión de pagos contables (Tesorería).\n"
+"\n"
+"Este módulo extiende el módulo account_payment con muchas características:\n"
+"    * Extensión de los tipos de pago: El tipo de pago tiene un nombre y una "
+"descripción traducibles que se pueden mostrar en las facturas.\n"
+"    * Dos tipos de pago por defecto para las empresas (cliente y "
+"proveedor).\n"
+"    * Selección automática del tipo de pago en las facturas. Ahora, una "
+"factura puede tener un plazo de pago (30 días, 30/60 días, ...) y un tipo de "
+"pago (efectivo, transferencia bancaria, ...).\n"
+"    * Un campo seleccionable por defecto en las cuentas bancarias de las "
+"empresas. Se selecciona la cuenta bancaria por defecto de la empresa en las "
+"facturas y los pagos.\n"
+"    * Nuevos menús / listas / formularios para consultar los pagos (efectos) "
+"a cobrar y a pagar.\n"
+"    * Los pagos muestran campos editables en la lista: Fecha de vencimiento, "
+"cuenta bancaria y un campo de verificación (por ejemplo, para indicar que se "
+"ha recibido un cheque bancario en soporte papel).\n"
+"    * Dos tipos de órdenes de pago/cobro: las órdenes de pago (a partir de "
+"las facturas de proveedor) y las órdenes de cobro (a partir de las facturas "
+"de cliente). Ahora se puede hacer órdenes de cobro (remesas de recibos) para "
+"recibir los pagos de las facturas de nuestros clientes. Cada tipo de orden "
+"de pago tiene su propia secuencia.\n"
+"    * Las órdenes de pago/cobro permiten cantidades en negativo. Podemos "
+"incluir en las órdenes de pago facturas de proveedor (pago de dinero) y "
+"facturas de abono de proveedor (devolución o recibir dinero). O las facturas "
+"de cliente (recepción de dinero) y las facturas de abono de cliente "
+"(devolución o pago de dinero).\n"
+"    * En las órdenes de pago: Las facturas seleccionadas son filtradas por "
+"tipo de pago. Se puede indicar el segundo mensaje de la comunicación de la "
+"remesa al mismo tiempo para varias facturas.\n"
+"Basado en el trabajo anterior de Pablo Rocandio y Zikzakmedia (versión "
+"4.2).\n"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,show_refunds:0
+msgid "Show Refunds"
+msgstr "Mostrar abonos"
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,show_refunds:0
+msgid "Indicates if search should include refunds."
+msgstr "Indica si la búsqueda debe incluir abonos."

=== added file 'account_payment_extension/i18n/fr_BE.po'
--- account_payment_extension/i18n/fr_BE.po	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/fr_BE.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,321 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_extension
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2009-11-26 06:52:54+0000\n"
+"PO-Revision-Date: 2009-11-26 06:52:54+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: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.ui.menu,name:account_payment_extension.menu_pay_payments
+msgid "Payable payment orders"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type_form
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type_form
+#: view:payment.type:0
+msgid "Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "You cannot delete payment order(s) which are already confirmed or done!"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_draft
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_draft
+msgid "Draft pay. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payments_to_pay
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payments_to_pay
+msgid "Payments to pay"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_open
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_open
+msgid "Rec. payment orders to validate"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.ui.menu,name:account_payment_extension.menu_rec_payments
+msgid "Receivable payment orders"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr ""
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_open
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_open
+msgid "Pay. payment orders to validate"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree_new
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form_new
+msgid "New Pay. payment Order"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+msgid "Name"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payments_payable
+msgid "All paid and to pay payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+#: model:ir.ui.menu,name:account_payment_extension.menu_finance_payments
+msgid "Payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payments_payable
+msgid "Payable payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.module.module,shortdesc:account_payment_extension.module_meta_information
+msgid "Account Payment Extension"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payments_receivable
+msgid "Receivable payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: field:res.partner,payment_type_customer:0
+#: field:res.partner,payment_type_supplier:0
+msgid "Payment type"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_draft
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_draft
+msgid "Draft rec. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid "To write down that a check in paper support has been received, for example."
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payments_to_receive
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payments_to_receive
+msgid "Payments to receive"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payments_receivable
+msgid "All received and to receive payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree_new
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form_new
+msgid "New rec. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid "Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can have a payment term (30 days, 30/60 days, ...) and a payment type (cash, bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a check field (for example to write down if a bank check in paper support has been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier invoices) and receivable payment orders (from client invoices). So we can make payment orders to receive the payments of our client invoices. Each payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have payment orders for supplier invoices (pay money) and refund supplier invoices (return or receive money). Or for client invoices (receive money) and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the second message communication can be set at the same time for several invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+""
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr ""
+

=== added file 'account_payment_extension/i18n/pt.po'
--- account_payment_extension/i18n/pt.po	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/pt.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,536 @@
+# Portuguese translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2010-12-17 20:52+0000\n"
+"PO-Revision-Date: 2011-02-15 15:01+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Portuguese <pt@xxxxxx>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-06-15 05:50+0000\n"
+"X-Generator: Launchpad (build 13168)\n"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr "Recebível"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type
+#: view:payment.type:0
+#: help:payment.type,name:0
+msgid "Payment Type"
+msgstr "Tipo de Pagamento"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Direct Payment"
+msgstr "Pagamanto Directo"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"Payment order should create account moves but line with amount %.2f for "
+"partner \"%s\" has no account assigned."
+msgstr ""
+"Ordem de pagamento deve criar movimentos de conta mas linha com cerca de "
+"%.2f para terceiro \"%s\" não tem conta assinada."
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nome do modelo inválido na definição da acção."
+
+#. module: account_payment_extension
+#: help:payment.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Pay"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"You cannot delete payment order(s) which are already confirmed or done!"
+msgstr ""
+"Não pode apagar a(s) ordem(ns) de pagamento(s) que já tenha(m) sido "
+"confirmada(s) ou concluída(s)"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_order
+msgid "Payment Order"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Receive"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML Inválido para a Arquitectura de Vista!"
+
+#. module: account_payment_extension
+#: field:payment.mode,require_bank_account:0
+msgid "Require Bank Account"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr "Preencher a Declaração com linhas de Pagemento"
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr "Linha de Pagamento"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_line
+msgid "Payment Line"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_mode
+msgid "Payment Mode"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr "Comunicação 2"
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr "Descrição do tipo de pagamento que vai ser apresentado nas facturas"
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Search Invoice Payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.type:0
+msgid "Suitable Bank Types"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr "_Add"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error !"
+msgstr "Erro !"
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr "Descrição"
+
+#. module: account_payment_extension
+#: field:payment.type,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Account move line \"%s\" is not valid"
+msgstr "Linha do movimento da conta \"%s\" não é válido"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr "_Cancel"
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr "Nome do tipo de pagamento"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr "Ordem de pagamento recebível"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr "Pagável"
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr "Preencher pagamento para pagar"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_customer:0
+msgid "Customer Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,amount:0
+msgid "Next step will automatically select payments up to this amount."
+msgstr ""
+"Próxima etapa vai selecionar automáticamentos os pagamentos até este "
+"montante."
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr "Movimentos"
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr "Activo"
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr "Seleccionar facturas de pagamento para pagar/receber"
+
+#. module: account_payment_extension
+#: help:payment.line,payment_move_id:0
+msgid "Account move that pays this debt."
+msgstr "Movimento da conta que paga o seu débito."
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr "A mensagem sucessora de comunicação de pagamento."
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payment"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,create_account_moves:0
+msgid "Create Account Moves"
+msgstr "Criar Movimentos de Conta"
+
+#. module: account_payment_extension
+#: field:payment.line,payment_move_id:0
+msgid "Payment Move"
+msgstr "Movimento do Pagamento"
+
+#. module: account_payment_extension
+#: field:payment.line,account_id:0
+msgid "Account"
+msgstr "Conta"
+
+#. module: account_payment_extension
+#: field:payment.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.mode,require_bank_account:0
+msgid ""
+"Ensure all lines in the payment order have a bank account when proposing "
+"lines to be added in the payment order."
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+#: field:payment.type,name:0
+msgid "Name"
+msgstr "Nome"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr "Data da Dívida"
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr "Padrão"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr "_Search"
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank_id:0
+msgid "Bank Account"
+msgstr "Conta Bancária"
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr "Adicionar para ordem de pagamento"
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr "Acção inválida!"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Unreconciled"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error!"
+msgstr "Erro !"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,amount:0
+msgid "Amount"
+msgstr "Montante"
+
+#. module: account_payment_extension
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr "Importar linhas de pagamento"
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payments"
+msgstr "Pagamentos"
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_supplier:0
+msgid "Supplier Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr "Tipo de pagamento do cliente"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr "Ordem de pagamento pagável"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_invoice_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_invoice_payments
+msgid "Invoice payments"
+msgstr "Factura de pagamentos"
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_done_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_done_payments
+msgid "Done payments"
+msgstr "Pagamentos concluídos"
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: model:ir.model,name:account_payment_extension.model_payment_type
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr "Tipo de pagamento"
+
+#. module: account_payment_extension
+#: field:payment.type,code:0
+msgid "Code"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr "Detalhes Bancário"
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,period_id:0
+msgid "Period"
+msgstr "Periodo"
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Bank Statement"
+msgstr "Declaração Bancária"
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr "Tipo de pagamento do fornecedor"
+
+#. module: account_payment_extension
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid ""
+"To write down that a check in paper support has been received, for example."
+msgstr ""
+"Para escrever se suporte de cheque de papel tiver sido recebido por exemplo."
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Narration"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr "Cheque Recebido"
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr "Procurar linhas de pagamento"
+
+#. module: account_payment_extension
+#: sql_constraint:ir.model.fields:0
+msgid "Size of the field can never be less than 1 !"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.order,create_account_moves:0
+msgid ""
+"Indicates when account moves should be created for order payment lines. "
+"\"Bank Statement\" will wait until user introduces those payments in bank a "
+"bank statement. \"Direct Payment\" will mark all payment lines as payied "
+"once the order is done."
+msgstr ""
+"Indica quando movimentos de conta devem ser criadas para linhas de ordem de "
+"pagamento. \"Declaração Bancária\" vai esperar até o utilizador introduzir "
+"estes pagamentos no extrato bancário no banco. \" Pagamento Directo\" vai "
+"assinalar todas as linhas de pagamento como pagas uma vez a ordem for "
+"concluída."
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid ""
+"Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and "
+"note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can "
+"have a payment term (30 days, 30/60 days, ...) and a payment type (cash, "
+"bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner "
+"bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a "
+"check field (for example to write down if a bank check in paper support has "
+"been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier "
+"invoices) and receivable payment orders (from client invoices). So we can "
+"make payment orders to receive the payments of our client invoices. Each "
+"payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have "
+"payment orders for supplier invoices (pay money) and refund supplier "
+"invoices (return or receive money). Or for client invoices (receive money) "
+"and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the "
+"second message communication can be set at the same time for several "
+"invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+msgstr ""
+"Conta prorrogação do pagamento.\n"
+"\n"
+"Este módulo extende o módulo account_payment com uma grande quantidade de "
+"recursos:\n"
+"    * Prorrogação de tipos de pagamento : O tipo de pagamento tem um nome "
+"traduzido e note que ser apresentado nas facturas.\n"
+"    * Dois tipos de pagamentos padrão para terceiros (Cliente e "
+"Fornecedor).\n"
+"    * Selecção automática de tipo de pagamento nas facturas. Agora uma "
+"factura pode ter um termo de pagamento ((30 dias, 30/60 dias, ...) e um tipo "
+"de pagamento (dinheiro transfreência bancária, ...).\n"
+"    * Um campo de verificação em contas bancária de terceiro. A conta "
+"bancária padrão do terceiro são selecionadas nas facturas e pagamentos.\n"
+"    * Novo menu/árvore/formulário para ver pagamentos para receber e "
+"pagamentos para pagar.\n"
+"    * Os pagamentos apresentam campos de árvores editavéis: Data da Dívida, "
+"conta bancária e um campo de verificação (por exemplo para escrever se um "
+"suporte de papel bancário tiver sido recebido).\n"
+"    * Dois tipos de ordens de pagamento : Ordens de pagamento pagáveis (a "
+"paritr de facturas de fornecedor) e ordens de pagamento recebíveis (a partir "
+"de facturas de cliente). Então pode -se efectuar as ordens de pagamento para "
+"recever os pagamentos das nossas facturas de clientes. Cada ordem de tipo de "
+"pagamento tem a sua propria sequência.\n"
+"    * As ordens de pagamento permitem  pagamentos de montante negactivo. "
+"Então podemos ter ordens de pagamento para facturas de fornecedot (pagar com "
+"dinheiro) e reembolsar as facturas do fornecedor (retornar ou receber "
+"dinheiro). Ou para facturas de clientes (dinheiro reccebido) e reembolsar "
+"facturas de cliente (retornar ou pagar com dinheiro).\n"
+"    * Ordens de pagamento: Facturas selecionadas são filtradas pelo tipo de "
+"pagamento a segunda mensagem de comunicação pode ser definida ao mesmo tempo "
+"para várias facturas.\n"
+"Baseado na previsão de trabalho de Pablo Rocando & Zikzakmedia (version for "
+"4.2).\n"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,show_refunds:0
+msgid "Show Refunds"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,show_refunds:0
+msgid "Indicates if search should include refunds."
+msgstr ""

=== added file 'account_payment_extension/i18n/sv.po'
--- account_payment_extension/i18n/sv.po	1970-01-01 00:00:00 +0000
+++ account_payment_extension/i18n/sv.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,517 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment_extension
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.14\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2010-12-17 20:52+0000\n"
+"PO-Revision-Date: 2011-02-15 15:01+0000\n"
+"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-06-15 05:50+0000\n"
+"X-Generator: Launchpad (build 13168)\n"
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Receivable"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_payment_type
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_payment_type
+#: view:payment.type:0
+#: help:payment.type,name:0
+msgid "Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Direct Payment"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"Payment order should create account moves but line with amount %.2f for "
+"partner \"%s\" has no account assigned."
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.type,code:0
+msgid "Specify the Code for Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Pay"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid ""
+"You cannot delete payment order(s) which are already confirmed or done!"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_order
+msgid "Payment Order"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Receive"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.mode,require_bank_account:0
+msgid "Require Bank Account"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_statement_ext
+msgid "Populate Statement with Payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_statement_ext,init,lines:0
+msgid "Payment Lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_line
+msgid "Payment Line"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.ui.menu:0
+msgid "Error ! You can not create recursive Menu."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_payment_mode
+msgid "Payment Mode"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,communication2:0
+msgid "Communication 2"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.type,note:0
+msgid "Description of the payment type that will be shown in the invoices"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,type:0
+msgid "Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Search Invoice Payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.type:0
+msgid "Suitable Bank Types"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_statement_ext,init,add:0
+msgid "_Add"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error !"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.type:0
+#: field:payment.type,note:0
+msgid "Description"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.type,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Account move line \"%s\" is not valid"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,end:0
+#: wizard_button:populate_payment_ext,search,end:0
+#: wizard_button:populate_statement_ext,init,end:0
+msgid "_Cancel"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,payment_type_name:0
+msgid "Payment type name"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_rec_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_rec_payment_order_form
+msgid "Rec. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: selection:payment.order,type:0
+msgid "Payable"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.wizard,name:account_payment_extension.wizard_populate_payment_ext
+msgid "Populate payment to pay"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_customer:0
+msgid "Customer Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,amount:0
+msgid "Next step will automatically select payments up to this amount."
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,search,entries:0
+msgid "Entries"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.type,active:0
+msgid "Active"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:payment.order:0
+msgid "Select invoices to pay/receive payment"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.line,payment_move_id:0
+msgid "Account move that pays this debt."
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,search,communication2:0
+msgid "The successor message of payment communication."
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payment"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,create_account_moves:0
+msgid "Create Account Moves"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.line,payment_move_id:0
+msgid "Payment Move"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.line,account_id:0
+msgid "Account"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.type,suitable_bank_types:0
+msgid "Suitable bank types"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.mode,require_bank_account:0
+msgid ""
+"Ensure all lines in the payment order have a bank account when proposing "
+"lines to be added in the payment order."
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,name:0
+#: field:payment.type,name:0
+msgid "Name"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,duedate:0
+msgid "Due Date"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:res.partner.bank,default_bank:0
+msgid "Default"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,init,search:0
+msgid "_Search"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.move.line,partner_bank_id:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_button:populate_payment_ext,search,create:0
+msgid "_Add to payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Invalid action!"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Unreconciled"
+msgstr ""
+
+#. module: account_payment_extension
+#: code:addons/account_payment_extension/payment.py:0
+#, python-format
+msgid "Error!"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,amount:0
+msgid "Amount"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.mode,type:0
+msgid "Select the Payment Type for the Payment Mode."
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:res.partner,payment_type_supplier:0
+msgid "Supplier Payment Type"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_customer:0
+msgid "Payment type of the customer"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_pay_payment_order_tree
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_pay_payment_order_form
+msgid "Pay. payment order"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_invoice_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_invoice_payments
+msgid "Invoice payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.actions.act_window,name:account_payment_extension.action_done_payments
+#: model:ir.ui.menu,name:account_payment_extension.menu_action_done_payments
+msgid "Done payments"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.invoice,payment_type:0
+#: field:account.move.line,payment_type:0
+#: model:ir.model,name:account_payment_extension.model_payment_type
+#: field:payment.mode,type:0
+msgid "Payment type"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.type,code:0
+msgid "Code"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:res.partner:0
+msgid "Bank Details"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:payment.order,period_id:0
+msgid "Period"
+msgstr ""
+
+#. module: account_payment_extension
+#: selection:payment.order,create_account_moves:0
+msgid "Bank Statement"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:res.partner,payment_type_supplier:0
+msgid "Payment type of the supplier"
+msgstr ""
+
+#. module: account_payment_extension
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:account.move.line,received_check:0
+msgid ""
+"To write down that a check in paper support has been received, for example."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: account_payment_extension
+#: view:account.move.line:0
+msgid "Narration"
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.model,name:account_payment_extension.model_res_partner
+msgid "Partner"
+msgstr ""
+
+#. module: account_payment_extension
+#: field:account.move.line,received_check:0
+msgid "Received check"
+msgstr ""
+
+#. module: account_payment_extension
+#: wizard_view:populate_payment_ext,init:0
+msgid "Search Payment lines"
+msgstr ""
+
+#. module: account_payment_extension
+#: sql_constraint:ir.model.fields:0
+msgid "Size of the field can never be less than 1 !"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:payment.order,create_account_moves:0
+msgid ""
+"Indicates when account moves should be created for order payment lines. "
+"\"Bank Statement\" will wait until user introduces those payments in bank a "
+"bank statement. \"Direct Payment\" will mark all payment lines as payied "
+"once the order is done."
+msgstr ""
+
+#. module: account_payment_extension
+#: model:ir.module.module,description:account_payment_extension.module_meta_information
+msgid ""
+"Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and "
+"note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can "
+"have a payment term (30 days, 30/60 days, ...) and a payment type (cash, "
+"bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner "
+"bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a "
+"check field (for example to write down if a bank check in paper support has "
+"been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier "
+"invoices) and receivable payment orders (from client invoices). So we can "
+"make payment orders to receive the payments of our client invoices. Each "
+"payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have "
+"payment orders for supplier invoices (pay money) and refund supplier "
+"invoices (return or receive money). Or for client invoices (receive money) "
+"and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the "
+"second message communication can be set at the same time for several "
+"invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+msgstr ""
+"Account payment extension.\n"
+"\n"
+"This module extends the account_payment module with a lot of features:\n"
+"    * Extension of payment types: The payment type has a translated name and "
+"note that can be shown in the invoices.\n"
+"    * Two default payment types for partners (client and supplier).\n"
+"    * Automatic selection of payment type in invoices. Now an invoice can "
+"have a payment term (30 days, 30/60 days, ...) and a payment type (cash, "
+"bank transfer, ...).\n"
+"    * A default check field in partner bank accounts. The default partner "
+"bank accounts are selected in invoices and payments.\n"
+"    * New menu/tree/forms to see payments to receive and payments to pay.\n"
+"    * The payments show tree editable fields: Due date, bank account and a "
+"check field (for example to write down if a bank check in paper support has "
+"been received).\n"
+"    * Two types of payment orders: Payable payment orders (from supplier "
+"invoices) and receivable payment orders (from client invoices). So we can "
+"make payment orders to receive the payments of our client invoices. Each "
+"payment order type has its own sequence.\n"
+"    * The payment orders allow negative payment amounts. So we can have "
+"payment orders for supplier invoices (pay money) and refund supplier "
+"invoices (return or receive money). Or for client invoices (receive money) "
+"and refund client invoices (return or pay money).\n"
+"    * Payment orders: Selected invoices are filtered by payment type, the "
+"second message communication can be set at the same time for several "
+"invoices.\n"
+"Based on previous work of Pablo Rocandio & Zikzakmedia (version for 4.2).\n"
+
+#. module: account_payment_extension
+#: wizard_field:populate_payment_ext,init,show_refunds:0
+msgid "Show Refunds"
+msgstr ""
+
+#. module: account_payment_extension
+#: help:populate_payment_ext,init,show_refunds:0
+msgid "Indicates if search should include refunds."
+msgstr ""

=== added file 'account_payment_extension/payment.py'
--- account_payment_extension/payment.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/payment.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,401 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+import netsvc
+from osv import fields, osv
+from tools.translate import _
+import decimal_precision as dp
+
+class payment_type(osv.osv):
+    _name= 'payment.type'
+    _description= 'Payment type'
+    _columns= {
+        'name': fields.char('Name', size=64, required=True, help='Payment Type', translate=True),
+        'code': fields.char('Code', size=64, required=True, help='Specify the Code for Payment Type'),
+        'suitable_bank_types': fields.many2many('res.partner.bank.type',
+            'bank_type_payment_type_rel',
+            'pay_type_id','bank_type_id',
+            'Suitable bank types'),
+        'active': fields.boolean('Active', select=True),
+        'note': fields.text('Description', translate=True, help="Description of the payment type that will be shown in the invoices"),
+        'company_id': fields.many2one('res.company', 'Company', required=True),
+    }
+    _defaults = {
+        'active': lambda *a: 1,
+        'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id
+    }
+
+payment_type()
+
+
+class payment_mode(osv.osv):
+    _inherit = 'payment.mode'
+    _columns = {
+        'type': fields.many2one('payment.type', 'Payment type', required=True, help='Select the Payment Type for the Payment Mode.'),
+        'require_bank_account': fields.boolean('Require Bank Account', help='Ensure all lines in the payment order have a bank account when proposing lines to be added in the payment order.'),
+        'require_received_check': fields.boolean('Require Received Check', help='Ensure all lines in the payment order have the Received Check flag set.'),
+        'require_same_bank_account': fields.boolean('Require the Same Bank Account', help='Ensure all lines in the payment order and the payment mode have the same account number.'),
+    }
+    _defaults = {
+        'require_bank_account': lambda *a: False,
+    }
+payment_mode()
+
+
+class res_partner(osv.osv):
+    _inherit='res.partner'
+    _columns={
+        'payment_type_customer': fields.property(
+            'payment.type',
+            type='many2one',
+            relation='payment.type',
+            string ='Customer Payment Type',
+            method=True,
+            view_load=True,
+            help="Payment type of the customer"),
+        'payment_type_supplier': fields.property(
+            'payment.type',
+            type='many2one',
+            relation='payment.type',
+            string ='Supplier Payment Type',
+            method=True,
+            view_load=True,
+            help="Payment type of the supplier"),
+    }
+res_partner()
+
+
+class res_partner_bank(osv.osv):
+
+    def create(self, cr, uid, vals, context=None):
+        if vals.get('default_bank') and vals.get('partner_id') and vals.get('state'):
+            sql = "UPDATE res_partner_bank SET default_bank='0' WHERE partner_id=%i AND default_bank='1' AND state='%s'" % (vals['partner_id'], vals['state'])
+            cr.execute(sql)
+        return super(res_partner_bank, self).create(cr, uid, vals, context=context)
+
+    def write(self, cr, uid, ids, vals, context=None):
+        if 'default_bank' in vals and vals['default_bank'] == True:
+            partner_bank = self.pool.get('res.partner.bank').browse(cr, uid, ids)[0]
+            partner_id = partner_bank.partner_id.id
+            if 'state' in vals and vals['state']:
+                state = vals['state']
+            else:
+                state = partner_bank.state
+            sql = "UPDATE res_partner_bank SET default_bank='0' WHERE partner_id=%i AND default_bank='1' AND state='%s' AND id<>%i" % (partner_id, state, ids[0])
+            cr.execute(sql)
+        return super(res_partner_bank, self).write(cr, uid, ids, vals, context=context)
+
+    _inherit="res.partner.bank"
+    _columns = {
+        'default_bank' : fields.boolean('Default'),
+    }
+
+res_partner_bank()
+
+
+class payment_order(osv.osv):
+    _name = 'payment.order'
+    _inherit = 'payment.order'
+
+    def _get_type(self, cr, uid, context=None):
+        if context is None:
+            context = {}
+        return context.get('type', 'payable')
+
+    def _get_reference(self, cr, uid, context=None):
+        if context is None:
+            context = {}
+        type = context.get('type', 'payable')
+        model = type == 'payable' and 'payment.order' or 'rec.payment.order'
+        return self.pool.get('ir.sequence').get(cr, uid, model)
+
+    def _get_period(self, cr, uid, context=None):
+        try:
+            # find() function will throw an exception if no period can be found for
+            # current date. That should not be a problem because user would be notified
+            # but as this model inherits an existing one, once installed it will create 
+            # the new field and try to update existing records (even if there are no records yet)
+            # So we must ensure no exception is thrown, otherwise the module can only be installed
+            # once periods are created.
+            periods = self.pool.get('account.period').find(cr, uid)
+            return periods[0]
+        except Exception, e:
+            return False
+
+    def _payment_type_name_get(self, cr, uid, ids, field_name, arg, context=None):
+        result = {}
+        for rec in self.browse(cr, uid, ids, context):
+            result[rec.id] = rec.mode and rec.mode.type.name or ""
+        return result
+
+    def _name_get(self, cr, uid, ids, field_name, arg, context=None):
+        result = {}
+        for rec in self.browse(cr, uid, ids, context):
+            result[rec.id] = rec.reference
+        return result
+
+    _columns = {
+        'type': fields.selection([
+            ('payable','Payable'),
+            ('receivable','Receivable'),
+            ],'Type', readonly=True, select=True),
+        # invisible field to filter payment order lines by payment type
+        'payment_type_name': fields.function(_payment_type_name_get, method=True, type="char", size=64, string="Payment type name"),
+        # The field name is necessary to add attachement documents to payment orders
+        'name': fields.function(_name_get, method=True, type="char", size=64, string="Name"),
+        'create_account_moves': fields.selection([('bank-statement','Bank Statement'),('direct-payment','Direct Payment')],
+                                                 'Create Account Moves',
+                                                 required=True,
+                                                 states={'done':[('readonly',True)]},
+                                                 help='Indicates when account moves should be created for order payment lines. "Bank Statement" '\
+                                                      'will wait until user introduces those payments in bank a bank statement. "Direct Payment" '\
+                                                      'will mark all payment lines as payied once the order is done.'),
+        'period_id': fields.many2one('account.period', 'Period', states={'done':[('readonly',True)]}),
+    }
+    _defaults = {
+        'type': _get_type,
+        'reference': _get_reference,
+        'create_account_moves': lambda *a: 'bank-statement',
+        'period_id': _get_period,
+    }
+
+    def cancel_from_done(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+
+        #Search for account_moves
+        remove = []
+        for move in self.browse(cr,uid,ids,context):
+            #Search for any line
+            for line in move.line_ids:
+                if line.payment_move_id:
+                    remove += [ line.payment_move_id.id ]
+        
+        self.pool.get('account.move').button_cancel( cr, uid, remove, context=context)
+        self.pool.get('account.move').unlink(cr, uid, remove, context)
+        self.write( cr, uid, ids, {
+            'state':'cancel'
+        },context=context)
+        return True
+
+    def unlink(self, cr, uid, ids, context=None):
+        pay_orders = self.read(cr, uid, ids, ['state'], context=context)
+        unlink_ids = []
+        for t in pay_orders:
+            if t['state'] in ('draft', 'cancel'):
+                unlink_ids.append(t['id'])
+            else:
+                raise osv.except_osv(_('Invalid action!'), _('You cannot delete payment order(s) which are already confirmed or done!'))
+        result = super(payment_order, self).unlink(cr, uid, unlink_ids, context=context)
+        return result
+
+    def set_done(self, cr, uid, ids, context=None):
+        company_currency_id = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.currency_id.id
+        
+        try:
+            for order in self.browse(cr, uid, ids, context):
+                if order.create_account_moves != 'direct-payment':
+                    continue
+    
+                for line in order.line_ids:
+                    cr.rollback()
+                    if not line.amount:
+                        continue
+                    
+                    if line.payment_move_id:
+                        continue
+    
+                    if not line.account_id:
+                        raise osv.except_osv(_('Error!'), _('Payment order should create account moves but line with amount %.2f for partner "%s" has no account assigned.') % (line.amount, line.partner_id.name ) )
+    
+                    # This process creates a simple account move with bank and line accounts and line's amount. At the end
+                    # it will reconcile or partial reconcile both entries if that is possible.
+                    move_id = self.pool.get('account.move').create(cr, uid, {
+                        'name': order.reference,
+                        'ref': line.ml_inv_ref.number,
+                        'journal_id': order.mode.journal.id,
+                        'period_id': order.period_id.id,
+                    }, context)
+                    
+                    currency_id = order.mode.journal.currency and order.mode.journal.currency.id or company_currency_id
+    
+                    if line.type == 'payable':
+                        line_amount = line.amount_currency or line.amount
+                    else:
+                        line_amount = -line.amount_currency or -line.amount
+                        
+                    if line_amount >= 0:
+                        account_id = order.mode.journal.default_credit_account_id.id
+                    else:
+                        account_id = order.mode.journal.default_debit_account_id.id
+                    acc_cur = ((line_amount<=0) and order.mode.journal.default_debit_account_id) or line.account_id
+    
+                    ctx = context.copy()
+                    ctx['res.currency.compute.account'] = acc_cur
+                    amount = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency_id, line_amount, context=ctx)
+    
+                    val = {
+                        'name': line.move_line_id and line.move_line_id.name or '/',
+                        'move_id': move_id,
+                        'date': order.date_done,
+                        'ref': line.move_line_id and line.move_line_id.ref or False,
+                        'partner_id': line.partner_id and line.partner_id.id or False,
+                        'account_id': line.account_id.id,
+                        'debit': ((amount>0) and amount) or 0.0,
+                        'credit': ((amount<0) and -amount) or 0.0,
+                        'journal_id': order.mode.journal.id,
+                        'period_id': order.period_id.id,
+                        'currency_id': currency_id,
+                    }
+                    
+                    amount = self.pool.get('res.currency').compute(cr, uid, currency_id, company_currency_id, line_amount, context=ctx)
+                    if currency_id <> company_currency_id:
+                        amount_cur = self.pool.get('res.currency').compute(cr, uid, company_currency_id, currency_id, amount, context=ctx)
+                        val['amount_currency'] = -amount_cur
+    
+                    if line.account_id and line.account_id.currency_id and line.account_id.currency_id.id <> company_currency_id:
+                        val['currency_id'] = line.account_id.currency_id.id
+                        if company_currency_id == line.account_id.currency_id.id:
+                            amount_cur = line_amount
+                        else:
+                            amount_cur = self.pool.get('res.currency').compute(cr, uid, company_currency_id, line.account_id.currency_id.id, amount, context=ctx)
+                        val['amount_currency'] = amount_cur
+    
+                    partner_line_id = self.pool.get('account.move.line').create(cr, uid, val, context, check=False)
+    
+                    # Fill the secondary amount/currency
+                    # if currency is not the same than the company
+                    if currency_id <> company_currency_id:
+                        amount_currency = line_amount
+                        move_currency_id = currency_id
+                    else:
+                        amount_currency = False
+                        move_currency_id = False
+    
+                    self.pool.get('account.move.line').create(cr, uid, {
+                        'name': line.move_line_id and line.move_line_id.name or '/',
+                        'move_id': move_id,
+                        'date': order.date_done,
+                        'ref': line.move_line_id and line.move_line_id.ref or False,
+                        'partner_id': line.partner_id and line.partner_id.id or False,
+                        'account_id': account_id,
+                        'debit': ((amount < 0) and -amount) or 0.0,
+                        'credit': ((amount > 0) and amount) or 0.0,
+                        'journal_id': order.mode.journal.id,
+                        'period_id': order.period_id.id,
+                        'amount_currency': amount_currency,
+                        'currency_id': move_currency_id,
+                    }, context)
+    
+                    move = self.pool.get('account.move').browse(cr, uid, move_id, context)
+                    for x in move.line_id:
+                        if x.state <> 'valid':
+                            raise osv.except_osv(_('Error !'), _('Account move line "%s" is not valid') % x.name)
+    
+                    if line.move_line_id and not line.move_line_id.reconcile_id:
+                        # If payment line has a related move line, we try to reconcile it with the move we just created.
+                        lines_to_reconcile = [
+                            partner_line_id,
+                        ]
+    
+                        # Check if payment line move is already partially reconciled and use those moves in that case.
+                        if line.move_line_id.reconcile_partial_id:
+                            for rline in line.move_line_id.reconcile_partial_id.line_partial_ids:
+                                lines_to_reconcile.append( rline.id )
+                        else:
+                            lines_to_reconcile.append( line.move_line_id.id )
+    
+                        amount = 0.0
+                        for rline in self.pool.get('account.move.line').browse(cr, uid, lines_to_reconcile, context):
+                            amount += rline.debit - rline.credit
+    
+                        currency = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.currency_id
+    
+                        if self.pool.get('res.currency').is_zero(cr, uid, currency, amount):
+                            self.pool.get('account.move.line').reconcile(cr, uid, lines_to_reconcile, 'payment', context=context)
+                        else:
+                            self.pool.get('account.move.line').reconcile_partial(cr, uid, lines_to_reconcile, 'payment', context)
+    
+                    if order.mode.journal.entry_posted:
+                        self.pool.get('account.move').write(cr, uid, [move_id], {
+                            'state':'posted',
+                        }, context)
+    
+                    self.pool.get('payment.line').write(cr, uid, [line.id], {
+                        'payment_move_id': move_id,
+                    }, context)
+                    cr.commit()
+                    
+        except Exception, e:
+            cr.rollback()
+                
+        result = super(payment_order, self).set_done(cr, uid, ids, context)
+        return result
+
+payment_order()
+
+
+class payment_line(osv.osv):
+    _name = 'payment.line'
+    _inherit = 'payment.line'
+
+    def _auto_init(self, cr, context=None):
+        cr.execute("SELECT column_name FROM information_schema.columns WHERE table_name = 'payment_line' and column_name='type'")
+        if cr.fetchone():
+            update_sign = False
+        else:
+            update_sign = True
+        result = super(payment_line, self)._auto_init(cr, context=context)
+
+        if update_sign:
+            # Ensure related store value of field 'type' is updated in the database.
+            # Note that by forcing the update here we also ensure everything is done in the same transaction.
+            # Because addons/__init__.py will execute a commit just after creating table fields.
+            result.sort()
+            for item in result:
+                item[1](cr, *item[2])
+            # Change sign of 'receivable' payment lines
+            cr.execute("UPDATE payment_line SET amount_currency = -amount_currency WHERE type='receivable'")
+        return result
+
+    _columns = {
+        'move_line_id': fields.many2one('account.move.line', 'Entry line', domain="[('reconcile_id','=', False), ('amount_to_pay','<>',0), ('account_id.type','=',parent.type),('payment_type','ilike',parent.payment_type_name or '%')]", help='This Entry Line will be referred for the information of the ordering customer.'),
+        'payment_move_id': fields.many2one('account.move', 'Payment Move', readonly=True, help='Account move that pays this debt.'),
+        'account_id': fields.many2one('account.account', 'Account'),
+        'type': fields.related('order_id','type', type='selection', selection=[('payable','Payable'),('receivable','Receivable')], readonly=True, store=True, string='Type'),
+    }
+
+    def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency=False, company_currency=False, context=None):
+        # Adds account.move.line name to the payment line communication
+        res = super(payment_line, self).onchange_move_line(cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency, company_currency, context)
+        if move_line_id:
+            line = self.pool.get('account.move.line').browse(cr, uid, move_line_id)
+            if line.name != '/':
+                res['value']['communication'] = res['value']['communication'] + '. ' + line.name
+            res['value']['account_id'] = line.account_id.id
+        return res
+
+payment_line()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'account_payment_extension/payment_sequence.xml'
--- account_payment_extension/payment_sequence.xml	1970-01-01 00:00:00 +0000
+++ account_payment_extension/payment_sequence.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+        <record forcecreate="1" id="seq_type_rec_payment_order" model="ir.sequence.type">
+            <field name="name">Receivable payment order</field>
+            <field name="code">rec.payment.order</field>
+        </record>
+
+        <record forcecreate="1" id="seq_rec_payment_order" model="ir.sequence">
+            <field name="name">Receivable payment order</field>
+            <field name="code">rec.payment.order</field>
+            <field eval="3" name="padding"/>
+            <field name="prefix">%(year)s/</field>
+        </record>
+    </data>
+</openerp>

=== added file 'account_payment_extension/payment_view.xml'
--- account_payment_extension/payment_view.xml	1970-01-01 00:00:00 +0000
+++ account_payment_extension/payment_view.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,385 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+
+    <!--************************** PARTNERS - default bank **************************-->
+    <record model="ir.ui.view" id="view_partner_form">
+        <field name="model">res.partner</field>
+        <field name="inherit_id" ref="account.view_partner_property_form"/>
+        <field name="arch" type="xml">
+            <field name="sequence" position="after">
+                  <field name="default_bank"/>
+            </field>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="view_partner_form2">
+        <field name="model">res.partner</field>
+        <field name="inherit_id" ref="account.view_partner_property_form"/>
+        <field name="arch" type="xml">
+            <tree string="Bank Details" position="inside">
+                <field name="default_bank"/>
+            </tree>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="view_partner_form3">
+        <field name="name">view.partner.form3 </field>
+        <field name="model">res.partner.bank</field>
+        <field name="inherit_id" ref="base.view_partner_bank_form"/>
+        <field name="arch" type="xml">
+            <field name="sequence" position="after">
+                <field name="default_bank"/>
+            </field>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="view_partner_bank_tree">
+        <field name="name">view.partner.bank.tree </field>
+        <field name="model">res.partner.bank</field>
+        <field name="inherit_id" ref="base.view_partner_bank_tree"/>
+        <field name="arch" type="xml">
+            <field name="state" position="before">
+                <field name="default_bank"/>
+            </field>
+        </field>
+    </record>
+
+
+    <!--************************** PARTNERS - payment type **************************-->
+    <record model="ir.ui.view" id="view_payment_type_res_partner_form1">
+        <field name="name">res.partner.form.payment_type1</field>
+        <field name="model">res.partner</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account.view_partner_property_form"/>
+        <field name="priority" eval="20"/>
+        <field name="arch" type="xml">
+            <field name="property_account_receivable" position="after">
+                <field name="payment_type_customer" widget="selection"/>
+            </field>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="view_payment_type_res_partner_form2">
+        <field name="name">res.partner.form.payment_type2</field>
+        <field name="model">res.partner</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account.view_partner_property_form"/>
+        <field name="priority" eval="20"/>
+        <field name="arch" type="xml">
+            <field name="property_account_payable" position="after">
+                <field name="payment_type_supplier" widget="selection"/>
+            </field>
+        </field>
+    </record>
+
+
+    <!--****************************** PAYMENT TYPE ******************************-->
+        <record model="ir.ui.view" id="view_payment_type_tree">
+        <field name="name">payment.type.tree</field>
+        <field name="model">payment.type</field>
+        <field name="type">tree</field>
+        <field name="arch" type="xml">
+            <tree string="Payment Type">
+                <field name="name"/>
+                <field name="code"/>
+                <field name="active"/>
+                <field name="company_id" groups="base.group_multi_company"/>
+            </tree>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="view_payment_type_form">
+        <field name="name">payment.type.form</field>
+        <field name="model">payment.type</field>
+        <field name="type">form</field>
+        <field name="arch" type="xml">
+            <form string="Payment Type">
+                <field name="name" select="1"/>
+                <field name="code" select="1"/>
+                <field name="active" select="1"/>
+                <field name="company_id" select="1" widget='selection' groups="base.group_multi_company"/>
+                <separator string="Description" colspan="4"/>
+                <field name="note" nolabel="1" colspan="4"/>
+                <separator string="Suitable Bank Types" colspan="4"/>
+                <field name="suitable_bank_types" nolabel="1" colspan="4"/>
+            </form>
+        </field>
+    </record>
+
+    <record model="ir.actions.act_window" id="action_payment_type">
+        <field name="name">Payment Type</field>
+        <field name="res_model">payment.type</field>
+        <field name="view_mode">tree,form</field>
+    </record>
+
+    <menuitem action="action_payment_type" id="menu_action_payment_type" parent="account.menu_configuration_misc"/>
+
+
+    <!--****************************** PAYMENT MODE ******************************-->
+    <record id="view_payment_mode_form_require_bank_account" model="ir.ui.view">
+        <field name="name">payment.mode.form.require_bank_account</field>
+        <field name="model">payment.mode</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
+        <field name="arch" type="xml">
+            <field name="bank_id" position="before">
+                <field name="require_bank_account"/>
+                <field name="type"/>
+            </field>
+        </field>
+    </record>
+
+
+    <!--****************************** INVOICES ******************************-->
+    <!--Field partner_bank_id in client invoices has a strange domain: domain="[('partner_id.ref_companies', 'in', [company_id])]"-->
+    <record model="ir.ui.view" id="invoice_form3">
+        <field name="name">account.invoice.form3.payment_type</field>
+        <field name="model">account.invoice</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account.invoice_form"/>
+        <field name="arch" type="xml">
+            <field name="partner_bank_id" position="replace">
+                <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
+            </field>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="invoice_form4">
+        <field name="name">account.invoice.form4.payment_type</field>
+        <field name="model">account.invoice</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account.invoice_form"/>
+        <field name="arch" type="xml">
+            <field name="payment_term" position="after">
+                <field domain="[('company_id', '=', company_id)]" name="payment_type" on_change="onchange_payment_type(payment_type, partner_id)" />
+            </field>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="invoice_supplier_form2">
+        <field name="name">account.invoice.supplier.form2</field>
+        <field name="model">account.invoice</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account.invoice_supplier_form"/>
+        <field name="arch" type="xml">
+            <field name="payment_term" position="after">
+                <field domain="[('company_id', '=', company_id)]" name="payment_type" on_change="onchange_payment_type(payment_type, partner_id)" />
+            </field>
+        </field>
+    </record>
+
+
+    <!--************ account.move.line extension to show additional fields **********-->
+    <record model="ir.ui.view" id="payments_move_line_tree">
+        <field name="name">account.payments.move.line.tree</field>
+        <field name="model">account.move.line</field>
+        <field name="type">tree</field>
+        <field name="inherit_id" ref="account_payment.view_move_line_tree_wiz"/>
+        <field name="arch" type="xml">
+            <field name="currency_id" position="replace">
+                <field name="currency_id" groups="base.group_extended"/>
+                <field name="reconcile_id"/>
+                <field name="reconcile_partial_id" groups="base.group_extended"/>
+                <field name="state"/>
+                <field name="payment_type"/>
+            </field>
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="payments_move_line_form">
+        <field name="name">account.payments.move.line.form</field>
+        <field name="model">account.move.line</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account.view_move_line_form"/>
+        <field name="arch" type="xml">
+            <separator string="Narration" position="before">
+                <group col="2" colspan="2">
+                    <separator colspan="2" string="Payment"/>
+                    <field name="payment_type" select="1" widget="selection"/>
+                    <field name="partner_bank_id" domain="[('partner_id','=',partner_id)]"/>
+                    <field name="received_check"/>
+                </group>
+            </separator>
+        </field>
+    </record>
+
+
+    <!--***************************** BANK STATEMENT *********************************-->
+    <record id="view_bank_statement_form_ext" model="ir.ui.view">
+        <field name="name">account.bank.statement.form.ext</field>
+        <field name="model">account.bank.statement</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account_payment.view_bank_statement_form"/>
+        <field name="arch" type="xml">
+            <button name="%(account_payment.action_account_populate_statement_confirm)d" position="replace">
+                <button name="%(wizard_populate_statement_ext)d" string="Import payment lines" type="action" attrs="{'invisible':[('state','=','confirm')]}" icon="gtk-execute"/>
+            </button>
+        </field>
+    </record>
+
+
+    <!--***************************** PAYMENT ORDER *********************************-->
+    <!-- Filter invoices by payment type. Allow negative payment amounts -->
+    <record id="view_payment_order_form_ext1" model="ir.ui.view">
+        <field name="name">payment.order.form.ext1</field>
+        <field name="model">payment.order</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
+        <field name="arch" type="xml">
+            <button name="%(account_payment.action_create_payment_order)d" position="replace">
+                <field name="payment_type_name" invisible="1"/>
+                <field name="type"/>
+                <field name="create_account_moves"/>
+                <group colspan="2" col="1" attrs="{'invisible': [('create_account_moves', '=', 'bank-statement')]}">
+                    <field name="period_id" attrs="{'required': [('create_account_moves', '!=', 'bank-statement')]}"/>
+                </group>
+                <button colspan="2" name="%(wizard_populate_payment_ext)d" string="Select invoices to pay/receive payment" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
+            </button>
+        </field>
+    </record>
+
+    <record id="view_payment_order_form_ext2" model="ir.ui.view">
+        <field name="name">payment.order.form.ext2</field>
+        <field name="model">payment.order</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
+        <field name="arch" type="xml">
+            <field name="move_line_id" position="replace">
+            <group col="6" colspan="4">
+                <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency,context)" select="1"/>
+                <field name="account_id"/>
+                <field name="payment_move_id"/>
+            </group>
+            </field>
+        </field>
+    </record>
+
+    <record id="view_payment_order_form_cancel" model="ir.ui.view">
+        <field name="name">payment.order.form.cancel</field>
+        <field name="model">payment.order</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account_payment.view_payment_order_form"/>
+        <field name="arch" type="xml">
+            <button name="cancel" position="after">
+                <button name="cancel_from_done" states="done" type="object" string="Cancel" icon="gtk-cancel"/>
+            </button>
+        </field>
+    </record>
+
+    <record id="view_payment_line_form_ext1" model="ir.ui.view">
+        <field name="name">payment.line.ext1</field>
+        <field name="model">payment.line</field>
+        <field name="type">form</field>
+        <field name="inherit_id" ref="account_payment.view_payment_line_form"/>
+        <field name="arch" type="xml">
+            <field name="move_line_id" position="replace">
+                <!--<field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency,context)" select="1"/>-->
+            <group col="6" colspan="4">
+                <field name="move_line_id" on_change="onchange_move_line(move_line_id, False, currency, company_currency)" select="1"/>
+                <field name="account_id"/>
+                <field name="payment_move_id"/>
+            </group>
+            </field>
+        </field>
+    </record>
+
+
+    <!--**************************** PAYABLE PAYMENT ORDER ********************************-->
+    <record id="account_payment.action_payment_order_tree" model="ir.actions.act_window">
+        <field name="name">Pay. payment order</field>
+        <field name="res_model">payment.order</field>
+        <field name="view_type">form</field>
+        <field name="view_mode">tree,form</field>
+        <field name="domain">[('type','=','payable')]</field>
+        <field name="context">{'type':'payable'}</field>
+    </record>
+
+    <!--**************************** RECEIVABLE PAYMENT ORDER ********************************-->
+    <record id="action_rec_payment_order_tree" model="ir.actions.act_window">
+        <field name="name">Rec. payment order</field>
+        <field name="res_model">payment.order</field>
+        <field name="view_type">form</field>
+        <field name="view_mode">tree,form</field>
+        <field name="domain">[('type','=','receivable')]</field>
+        <field name="context">{'type':'receivable'}</field>
+    </record>
+    <menuitem action="action_rec_payment_order_tree" id="menu_action_rec_payment_order_form" parent="account_payment.menu_main_payment" sequence="2"/>
+
+    <!--****************************** PAYMENTS ***********************************-->
+    <record id="view_payments_tree" model="ir.ui.view">
+        <field name="name">Payments</field>
+        <field name="model">account.move.line</field>
+        <field name="field_parent">partner_id</field>
+        <field name="type">tree</field>
+        <field name="priority" eval="20"/>
+        <field name="arch" type="xml">
+            <tree string="Payments" editable="top"
+                        colors="grey:reconcile_id!=0;blue:amount_to_pay==0;red:date_maturity&lt;time.strftime('%%Y-%%m-%%d')">
+                <field name="invoice" readonly="1"/>
+                <field name="partner_id" readonly="1"/>
+                <field name="account_id" readonly="1"/>
+                <field name="debit" readonly="1" sum="Total Debit"/>
+                <field name="credit" readonly="1" sum="Total Credit"/>
+                <field name="amount_to_pay" readonly="1" sum="Total Amount to Pay"/>
+                <field name="payment_type" readonly="1"/>
+                <field name="partner_bank_id" domain="[('partner_id','=',partner_id)]"/>
+                <field name="received_check"/>
+                <field name="date_maturity"/>
+                <field name="move_id" readonly="1"/>
+                <field name="reconcile_id" readonly="1"/>
+                <field name="reconcile_partial_id" readonly="1"/>
+            </tree>
+        </field>
+    </record>
+
+    <record id="view_payments_filter" model="ir.ui.view">
+        <field name="name">Invoice Payments Select</field>
+        <field name="model">account.move.line</field>
+        <field name="type">search</field>
+        <field name="priority" eval="20"/>
+        <field name="arch" type="xml">
+            <search string="Search Invoice Payments">
+               <group col='10' colspan='4'>
+                    <filter icon="terp-sale" string="Receive" domain="[('account_id.type','=','receivable')]" help="Receivable payments"/>
+                    <filter icon="terp-purchase" string="Pay" domain="[('account_id.type','=','payable')]" help="Payable payments"/>
+                    <separator orientation="vertical"/>
+                    <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False)]" help="Unreconciled payments"/>
+                    <field name="account_id"/>
+                    <field name="partner_id"/>
+                    <field name="invoice"/>
+                    <field name="date_maturity"/>
+                    <newline/>
+                    <field name="amount_to_pay"/>
+                    <field name="payment_type" widget="selection"/>
+                    <field name="partner_bank_id"/>
+                    <field name="received_check"/>
+               </group>
+           </search>
+        </field>
+    </record>
+
+    <!-- Invoice Payments -->
+    <record model="ir.actions.act_window" id="action_invoice_payments">
+        <field name="name">Invoice payments</field>
+        <field name="res_model">account.move.line</field>
+        <field name="view_type">form</field>
+        <field name="view_id" ref="view_payments_tree"/>
+        <field name="search_view_id" ref="view_payments_filter"/>
+        <field name="domain">[('account_id.type','in',['receivable','payable']),('invoice','&lt;&gt;',False)]</field>
+    </record>
+    <menuitem name="Invoice payments" parent="account_payment.menu_main_payment" action="action_invoice_payments" id="menu_action_invoice_payments" sequence="4"/>
+
+    <!-- Done Payments -->
+    <record model="ir.actions.act_window" id="action_done_payments">
+        <field name="name">Done payments</field>
+        <field name="res_model">account.move.line</field>
+        <field name="view_type">form</field>
+        <field name="view_id" ref="view_payments_tree"/>
+        <field name="search_view_id" ref="view_payments_filter"/>
+        <field name="domain">[('account_id.type','in',['receivable','payable']),('invoice','=',False)]</field>
+    </record>
+    <menuitem name="Done payments" parent="account_payment.menu_main_payment" action="action_done_payments" id="menu_action_done_payments" sequence="5"/>
+
+</data>
+</openerp>

=== added file 'account_payment_extension/payment_wizard.xml'
--- account_payment_extension/payment_wizard.xml	1970-01-01 00:00:00 +0000
+++ account_payment_extension/payment_wizard.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <wizard id="wizard_populate_payment_ext" menu="False" model="payment.order" name="populate_payment_ext" string="Populate payment to pay"/>
+        <wizard id="wizard_populate_statement_ext" menu="False" model="account.bank.statement" name="populate_statement_ext" string="Populate Statement with Payment lines"/>
+    </data>
+</openerp>

=== added directory 'account_payment_extension/security'
=== added file 'account_payment_extension/security/ir.model.access.csv'
--- account_payment_extension/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ account_payment_extension/security/ir.model.access.csv	2011-11-28 16:53:26 +0000
@@ -0,0 +1,4 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_payment_type","payment.type","model_payment_type","account_payment.group_account_payment",1,1,1,1
+"access_payment_type_user","payment.type.user","model_payment_type","base.group_user",1,0,0,0
+

=== added directory 'account_payment_extension/wizard'
=== added file 'account_payment_extension/wizard/__init__.py'
--- account_payment_extension/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/wizard/__init__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,28 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import wizard_payment_order
+import wizard_populate_statement
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+

=== added file 'account_payment_extension/wizard/wizard_payment_order.py'
--- account_payment_extension/wizard/wizard_payment_order.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/wizard/wizard_payment_order.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,209 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+import wizard
+import pooler
+from tools.misc import UpdateableStr
+import time
+
+
+FORM = UpdateableStr()
+
+FIELDS = {
+    'entries': {'string':'Entries', 'type':'many2many', 'relation':'account.move.line',},
+    'communication2': {'string':'Communication 2', 'type':'char', 'size': 64, 'help':'The successor message of payment communication.'},
+}
+
+field_duedate={
+    'duedate': {'string':'Due Date', 'type':'date','required':True, 'default': lambda *a: time.strftime('%Y-%m-%d'),},
+    'amount': {'string':'Amount', 'type':'float', 'help': 'Next step will automatically select payments up to this amount as long as account moves have bank account if that is required by the selected payment mode.'},
+    'show_refunds': {'string':'Show Refunds','type':'boolean', 'help':'Indicates if search should include refunds.', 'default': lambda *a: False},
+    }
+arch_duedate='''<?xml version="1.0" encoding="utf-8"?>
+<form string="Search Payment lines" col="2">
+    <field name="duedate" />
+    <field name="amount" />
+    <field name="show_refunds" />
+</form>'''
+
+
+def search_entries(self, cr, uid, data, context):
+    search_due_date = data['form']['duedate']
+    show_refunds = data['form']['show_refunds']
+
+    pool = pooler.get_pool(cr.dbname)
+    order_obj = pool.get('payment.order')
+    line_obj = pool.get('account.move.line')
+
+    payment = order_obj.browse(cr, uid, data['id'],
+            context=context)
+    ctx = ''
+    if payment.mode:
+        ctx = '''context="{'journal_id': %d}"''' % payment.mode.journal.id
+
+    # Search for move line to pay:
+    domain = [('reconcile_id', '=', False),('account_id.type', '=', payment.type),('amount_to_pay', '<>', 0)]
+
+    if payment.type =='payable' and not show_refunds:
+        domain += [ ('credit','>',0) ]
+    elif not show_refunds:
+        domain += [ ('debit','>',0) ]
+
+    if payment.mode:
+        domain += [('payment_type','=',payment.mode.type.id)]
+
+    domain += ['|',('date_maturity','<',search_due_date),('date_maturity','=',False)]
+    line_ids = line_obj.search(cr, uid, domain, order='date_maturity', context=context)
+
+
+    FORM.string = '''<?xml version="1.0" encoding="utf-8"?>
+<form string="Populate Payment:">
+    <field name="entries" colspan="4" height="300" width="800" nolabel="1"
+        domain="[('id', 'in', [%s])]" %s/>
+    <separator string="Extra message of payment communication" colspan="4"/>
+    <field name="communication2" colspan="4"/>
+</form>''' % (','.join([str(x) for x in line_ids]), ctx)
+
+    selected_ids = []
+
+
+#    if payment.mode.require_bank_account and not line.partner_bank_id:
+#        continue
+#    if payment.mode.require_same_bank_account:
+#        if not line.partner_bank_id:
+#            continue
+#        mode_account = payment.mode.bank_id.acc_number or payment.mode.bank_id.iban
+#        line_account = line.partner_bank_id.acc_number or line.partner_bank_id.iban
+#        if mode_account != line_account:
+#            continue
+#    if payment.mode.require_received_check:
+#        if not line.received_check:
+#            continue
+
+    amount = data['form']['amount']
+    if amount:
+        if payment.mode and payment.mode.require_bank_account:
+            line2bank = pool.get('account.move.line').line2bank(cr, uid, line_ids, payment.mode.id, context)
+        else:
+            line2bank = None
+        # If user specified an amount, search what moves match the criteria taking into account
+        # if payment mode allows bank account to be null.
+        for line in pool.get('account.move.line').browse(cr, uid, line_ids, context):
+            if abs(line.amount_to_pay) <= amount:
+                amount -= abs(line.amount_to_pay)
+                selected_ids.append( line.id )
+    return {
+        'entries': selected_ids,
+    }
+
+
+def create_payment(self, cr, uid, data, context):
+    line_ids= data['form']['entries'][0][2]
+    if not line_ids: return {}
+
+    pool= pooler.get_pool(cr.dbname)
+    order_obj = pool.get('payment.order')
+    line_obj = pool.get('account.move.line')
+
+    payment = order_obj.browse(cr, uid, data['id'],
+            context=context)
+    t = payment.mode and payment.mode.type.id or None
+    line2bank = pool.get('account.move.line').line2bank(cr, uid,
+            line_ids, t, context)
+
+    ## Finally populate the current payment with new lines:
+    for line in line_obj.browse(cr, uid, line_ids, context=context):
+        if payment.date_prefered == "now":
+            #no payment date => immediate payment
+            date_to_pay = False
+        elif payment.date_prefered == 'due':
+            date_to_pay = line.date_maturity
+        elif payment.date_prefered == 'fixed':
+            date_to_pay = payment.date_scheduled
+
+        if payment.type == 'payable':
+            amount_to_pay = line.amount_to_pay
+        else:
+            amount_to_pay = -line.amount_to_pay
+        pool.get('payment.line').create(cr,uid,{
+            'move_line_id': line.id,
+            'amount_currency': amount_to_pay,
+            'bank_id': line2bank.get(line.id),
+            'order_id': payment.id,
+            'partner_id': line.partner_id and line.partner_id.id or False,
+            'communication': (line.ref and line.name!='/' and line.ref+'. '+line.name) or line.ref or line.name or '/',
+            'communication2': data['form']['communication2'],
+            'date': date_to_pay,
+            'currency': line.invoice and line.invoice.currency_id.id or False,
+            'account_id': line.account_id.id,
+            }, context=context)
+    return {}
+
+
+class wizard_payment_order(wizard.interface):
+    """
+    Create a payment object with lines corresponding to the account move line
+    to pay according to the date provided by the user and the mode-type payment of the order.
+    Hypothesis:
+    - Small number of non-reconcilied move line , payment mode and bank account type,
+    - Big number of partner and bank account.
+
+    If a type is given, unsuitable account move lines are ignored.
+    """
+    states = {
+
+        'init': {
+            'actions': [],
+            'result': {
+                'type': 'form',
+                'arch': arch_duedate,
+                'fields':field_duedate,
+                'state': [
+                    ('end','_Cancel'),
+                    ('search','_Search', '', True)
+                ]
+            },
+         },
+
+        'search': {
+            'actions': [search_entries],
+            'result': {
+                'type': 'form',
+                'arch': FORM,
+                'fields': FIELDS,
+                'state': [
+                    ('end','_Cancel'),
+                    ('create','_Add to payment order', '', True)
+                ]
+            },
+         },
+        'create': {
+            'actions': [],
+            'result': {
+                'type': 'action',
+                'action': create_payment,
+                'state': 'end'}
+            },
+        }
+
+wizard_payment_order('populate_payment_ext')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'account_payment_extension/wizard/wizard_populate_statement.py'
--- account_payment_extension/wizard/wizard_populate_statement.py	1970-01-01 00:00:00 +0000
+++ account_payment_extension/wizard/wizard_populate_statement.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,152 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution	
+#    Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+import wizard
+import pooler
+from tools.misc import UpdateableStr
+
+FORM = UpdateableStr()
+
+FIELDS = {
+    'lines': {'string': 'Payment Lines', 'type': 'many2many',
+        'relation': 'payment.line'},
+}
+
+def _search_entries(obj, cr, uid, data, context):
+    pool = pooler.get_pool(cr.dbname)
+    line_obj = pool.get('payment.line')
+    statement_obj = pool.get('account.bank.statement')
+
+    statement = statement_obj.browse(cr, uid, data['id'], context=context)
+
+    line_ids = line_obj.search(cr, uid, [
+        ('move_line_id.reconcile_id', '=', False),
+        ('order_id.mode.journal.id', '=', statement.journal_id.id)])
+    line_ids.extend(line_obj.search(cr, uid, [
+        ('move_line_id.reconcile_id', '=', False),
+        ('order_id.mode', '=', False)]))
+
+    FORM.string = '''<?xml version="1.0"?>
+<form string="Populate Statement:">
+    <field name="lines" colspan="4" height="300" width="800" nolabel="1"
+        domain="[('id', 'in', [%s])]"/>
+</form>''' % (','.join([str(x) for x in line_ids]))
+    return {}
+
+def _populate_statement(obj, cr, uid, data, context):
+    line_ids = data['form']['lines'][0][2]
+    if not line_ids:
+        return {}
+
+    pool = pooler.get_pool(cr.dbname)
+    line_obj = pool.get('payment.line')
+    statement_obj = pool.get('account.bank.statement')
+    statement_line_obj = pool.get('account.bank.statement.line')
+    currency_obj = pool.get('res.currency')
+    move_line_obj = pool.get('account.move.line')
+    voucher_obj = pool.get('account.voucher')
+    voucher_line_obj = pool.get('account.voucher.line')
+
+    statement = statement_obj.browse(cr, uid, data['id'], context=context)
+
+    for line in line_obj.browse(cr, uid, line_ids, context=context):
+        ctx = context.copy()
+        ctx['date'] = line.ml_maturity_date
+        amount_currency = line.type == 'payment' and line.amount_currency or -line.amount_currency
+        amount = currency_obj.compute(cr, uid, line.currency.id,
+                statement.currency.id, amount_currency, context=ctx)
+
+        voucher_id = False
+        if line.move_line_id:
+            #We have to create a voucher and link it to the bank statement line
+            context.update({'move_line_ids': [line.move_line_id.id]})
+            result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.move_line_id.partner_id.id,
+                journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id,
+                ttype=(amount < 0 and 'payment' or 'receipt'), date=line.date or line.move_line_id.date, context=context)
+
+            voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'),
+                            'name': line.move_line_id.name,
+                            'reference': (line.order_id.reference or '?') +'. '+ line.name,
+                            'partner_id': line.move_line_id.partner_id.id,
+                            'journal_id': statement.journal_id.id,
+                            'account_id': result.get('account_id', statement.journal_id.default_credit_account_id.id), # improve me: statement.journal_id.default_credit_account_id.id
+                            'company_id': statement.company_id.id,
+                            'currency_id': statement.currency.id,
+                            'date': line.date or line.move_line_id.date,
+                            'amount': abs(amount),
+                            'period_id': statement.period_id.id}
+            voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
+
+            voucher_line_dict =  {}
+            if result['value']['line_ids']:
+                for line_dict in result['value']['line_ids']:
+                    move_line = move_line_obj.browse(cr, uid, line_dict['move_line_id'], context)
+                    if line.move_line_id.move_id.id == move_line.move_id.id:
+                        voucher_line_dict = line_dict
+            if voucher_line_dict:
+                voucher_line_dict.update({'voucher_id': voucher_id, 'amount': abs(amount)})
+                voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
+
+        statement_line_obj.create(cr, uid, {
+            'name': (line.order_id.reference or '?') +'. '+ line.name,
+            # Tipically: type=='payable' => amount>0  type=='receivable' => amount<0
+            'amount': line.type == 'payable' and amount or -amount,
+            'type': line.order_id.type=='payable' and 'supplier' or 'customer',
+            'partner_id': line.partner_id.id,
+            'account_id': line.move_line_id.account_id.id,
+            'statement_id': statement.id,
+            'ref': line.communication,
+            'voucher_id': voucher_id,
+            }, context=context)
+    return {}
+
+
+class PopulateStatement(wizard.interface):
+    """
+    Populate the current statement with selected payement lines
+    """
+    states = {
+        'init': {
+            'actions': [_search_entries],
+            'result': {
+                'type': 'form',
+                'arch': FORM,
+                'fields': FIELDS,
+                'state': [
+                    ('end', '_Cancel'),
+                    ('add', '_Add', '', True)
+                ]
+            },
+        },
+        'add': {
+            'actions': [],
+            'result': {
+                'type': 'action',
+                'action': _populate_statement,
+                'state': 'end'
+            },
+        },
+    }
+
+PopulateStatement('populate_statement_ext')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+

=== added directory 'l10n_es_devolucion_remesas'
=== added file 'l10n_es_devolucion_remesas/__init__.py'
--- l10n_es_devolucion_remesas/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/__init__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    7 i TRIA
+#    Copyright (C) 2011 - 2012 7 i TRIA <http://www.7itria.cat>
+#    Avanzosc - Avanced Open Source Consulting
+#    Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
+#
+#    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 invoice
+import setitria_mods_comptabilitat
+import wizard
+
+

=== added file 'l10n_es_devolucion_remesas/__openerp__.py'
--- l10n_es_devolucion_remesas/__openerp__.py	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/__openerp__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,45 @@
+
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    7 i TRIA
+#    Copyright (C) 2011 - 2012 7 i TRIA <http://www.7itria.cat>
+#    Avanzosc - Avanced Open Source Consulting
+#    Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
+#
+#    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" : "Devoluciones de remesas.",
+    "version" : "1.0",
+    "depends" : ["account_payment_extension"],
+    "author" : "7 i TRIA & Avanzosc, S.L.",
+    "description": """
+	Este módulo está basado en el módulo setitria_mods_comptabilitat. Actualizado y adaptado a la versión 6.0.3 por Avanzosc, S.L. 
+    	Modulo que añade funcionalidad de introducción de asientos contables (recibos devueltos i gestión dinamica)
+    """,
+    'website': 'http://www.7itria.cat, http://www.avanzosc.com',
+    'init_xml': [],     #los datos que necesitamos para que el modulo funcione
+    'update_xml': [
+            'security/setitria_mods_comptabilitat_security.xml',
+            'security/ir.model.access.csv',
+            'account_invoice_workflow.xml',
+            'account_invoice_view.xml',
+            'setitria_mods_comptabilitat.xml',
+        ],   #las vistas, categorias de acceso, etc... (lo que se ha de cargar cada vez que se actualiza, etc...)
+    'demo_xml': [],
+    'installable': True,
+    'active': False, #sirve para indicar si se quiere instalar cada vez que se crea una nueva BD (se instalaria automaticamente)
+}

=== added file 'l10n_es_devolucion_remesas/account_invoice_view.xml'
--- l10n_es_devolucion_remesas/account_invoice_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/account_invoice_view.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+		<record id="invoice_inh_form" model="ir.ui.view">
+			<field name="name">account.invoice.inh.form</field>
+			<field name="model">account.invoice</field>
+			<field name="inherit_id" ref="account.invoice_form" />
+			<field name="type">form</field>
+			<field name="arch" type="xml">
+				<xpath
+					expr="/form/notebook/page/group/group/button[@string='Print Invoice']"
+					position="replace">
+					<button name="%(account.account_invoices)d" string="Print Invoice"
+						type="action" icon="gtk-print" states="open,paid,unpaid,proforma,sale,proforma2" />
+				</xpath>
+			</field>
+		</record>
+		
+		
+		<record id="view_invoice_customer_inh" model="ir.ui.view">
+	       <field name="name">account.invoice.customer.pay.inh</field>
+	       <field name="model">account.invoice</field>
+	       <field name="type">form</field>
+	       <field name="inherit_id" ref="account_voucher.view_invoice_customer"/>
+	       <field name="arch" type="xml">
+	       <button name="invoice_pay_customer" position="replace">
+	           <button name="invoice_pay_customer" type="object" string="Payment" states="open,unpaid" icon="gtk-go-forward"/>
+	       </button>
+	       </field>
+	    </record>
+	    <record id="view_invoice_supplier_inh" model="ir.ui.view">
+	       <field name="name">account.invoice.supplier.pay.inh</field>
+	       <field name="model">account.invoice</field>
+	       <field name="type">form</field>
+	       <field name="inherit_id" ref="account_voucher.view_invoice_supplier"/>
+	       <field name="arch" type="xml">
+	       <button name="invoice_pay_customer" position="replace">
+	           <button name="invoice_pay_customer" type="object" string="Payment" states="open,unpaid" icon="gtk-go-forward"/>
+	       </button>
+	       </field>
+	    </record>
+	    
+	    <act_window context="{'search_default_partner_id':[active_id], 'type':'out_invoice', 'journal_type': 'sale'}" id="act_res_partner_2_account_invoice_opened" domain="[('type','=','out_invoice')]" name="Customer Invoices" res_model="account.invoice" src_model="res.partner"/>
+	    <act_window context="{'search_default_partner_id':[active_id], 'type':'in_invoice', 'journal_type': 'purchase'}" id="act_partner_2_account_supinvoice" domain="[('type','=','in_invoice')]" name="Supplier Invoices"  res_model="account.invoice" src_model="res.partner"/>
+	
+	</data>
+</openerp>
\ No newline at end of file

=== added file 'l10n_es_devolucion_remesas/account_invoice_workflow.xml'
--- l10n_es_devolucion_remesas/account_invoice_workflow.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/account_invoice_workflow.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record model="workflow.activity" id="account.act_open_test">
+            <field name="wkf_id" ref="account.wkf"/>
+            <field name="name">re-open</field>
+            <field name="action">write({'state':'unpaid'})</field>
+            <field name="kind">function</field>
+        </record>
+        
+        
+        <record id="account.open_test_to_paid" model="workflow.transition">
+            <field name="act_from" ref="account.act_open_test"/>
+            <field name="act_to" ref="account.act_paid"/>
+            <field name="condition">test_paid()</field>
+        </record>
+        
+        <record id="account.t13" model="workflow.transition">
+            <field name="act_from" ref="account.act_paid"/>
+            <field name="act_to" ref="account.act_open"/>
+            <field name="signal">open_test</field>
+        </record>
+        <record id="to_unpaid" model="workflow.transition">
+            <field name="act_from" ref="account.act_paid"/>
+            <field name="act_to" ref="account.act_open_test"/>
+            <field name="signal">open_test2</field>
+        </record>
+    </data>
+</openerp>

=== added file 'l10n_es_devolucion_remesas/invoice.py'
--- l10n_es_devolucion_remesas/invoice.py	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/invoice.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,71 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    7 i TRIA
+#    Copyright (C) 2011 - 2012 7 i TRIA <http://www.7itria.cat>
+#    Avanzosc - Avanced Open Source Consulting
+#    Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
+#
+#    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 time
+from lxml import etree
+import decimal_precision as dp
+
+import netsvc
+import pooler
+from osv import fields, osv, orm
+from tools.translate import _
+
+
+#class account_move(osv.osv):
+#    
+#    _inherit='account.move'
+#    _columns = {
+#                'ret_inv':fields.many2one('account.invoice', 'Return invoice'),
+#                }
+#account_move()
+
+class account_invoice(osv.osv):
+    
+    _inherit = 'account.invoice'
+    
+    _columns = {'state': fields.selection([
+            ('draft','Draft'),
+            ('proforma','Pro-forma'),
+            ('proforma2','Pro-forma'),
+            ('open','Open'),
+            ('paid','Paid'),
+            ('unpaid','Unpaid'),
+            ('cancel','Cancelled')
+            ],'State', select=True, readonly=True,
+            help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \
+            \n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \
+            \n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
+            \n* The \'Paid\' state is set automatically when invoice is paid.\
+            \n* The \'Cancelled\' state is used when user cancel invoice.'), 
+            }
+
+    def test_paid2(self, cr, uid, ids, *args):
+        res = False
+        if ids:
+            inv = self.browse(cr, uid, ids[0])
+            residual = inv._amount_residual
+            if residual == 0.0:
+                res = True
+        return res
+account_invoice()
+    

=== added directory 'l10n_es_devolucion_remesas/security'
=== added file 'l10n_es_devolucion_remesas/security/ir.model.access.csv'
--- l10n_es_devolucion_remesas/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/security/ir.model.access.csv	2011-11-28 16:53:26 +0000
@@ -0,0 +1,5 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_fitxerretornat_admin","setitria.fitxerretornat","model_setitria_fitxerretornat","admin_fitxerretornat",1,1,1,1
+"access_fitxerretornat_user","setitria.fitxerretornat","model_setitria_fitxerretornat","usuario_fitxerretornat",1,0,0,0
+"access_fitxerretornat_admin","setitria.fitxerretornat.line","model_setitria_fitxerretornat_line","admin_fitxerretornat",1,1,1,1
+"access_fitxerretornat_user","setitria.fitxerretornat.line","model_setitria_fitxerretornat_line","usuario_fitxerretornat",1,0,0,0
\ No newline at end of file

=== added file 'l10n_es_devolucion_remesas/security/setitria_mods_comptabilitat_security.xml'
--- l10n_es_devolucion_remesas/security/setitria_mods_comptabilitat_security.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/security/setitria_mods_comptabilitat_security.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data noupdate="1"><!-- el noupdate="1" es para que no cargue los grupos cuando se hagan updates, solo al cargar al inicio -->
+	
+	    <record id="admin_fitxerretornat" model="res.groups">
+	        <field name="name">Fitxers Retornats / Administrador</field>
+	    </record>
+		<record id="usuario_fitxerretornat" model="res.groups">
+			<field name="name">Fitxers Retornats / Usuario</field>
+		</record>
+	</data>
+</openerp>
\ No newline at end of file

=== added file 'l10n_es_devolucion_remesas/setitria_mods_comptabilitat.py'
--- l10n_es_devolucion_remesas/setitria_mods_comptabilitat.py	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/setitria_mods_comptabilitat.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,623 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    7 i TRIA
+#    Copyright (C) 2011 - 2012 7 i TRIA <http://www.7itria.cat>
+#    Avanzosc - Avanced Open Source Consulting
+#    Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
+#
+#    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         #siempre se ha de poner
+from datetime import date, datetime 
+import wizard
+import base64
+import pooler
+import time
+
+import netsvc
+from compiler.ast import Raise
+
+class setitria_mods_import_dev_c19_wizard(osv.osv_memory):
+    
+    
+    def _process_record_51(self, cr, uid, st_data, line, context=None):
+       
+       
+        #
+        # Add a new group to the statement groups
+        #
+        st_group = {}
+        st_data['groups'] = st_data.get('groups', [])
+        st_data['groups'].append(st_group)
+
+
+        #
+        # Set the group values
+        #        
+        st_group .update({
+                'nif_empresa'   : line[4:13],
+                'sufijo'        : line[13:16],
+                'fecha_fich'    : time.strftime('%Y-%m-%d', time.strptime(line[16:22], '%d%m%y')),
+                'cliente'       : line[28:68].strip(),
+                'entidad'       : line[88:92],
+                'oficina'       : line[92:96],
+                'nom_entitat'   : line[108:148].strip(),
+                '_num_records'  : 1,
+                'num_records'   : 0,
+                '_num_dev'      : 0,
+                'num_dev'       : 0,
+                'import'        : 0,
+                'groups'        : []
+            })
+        
+        
+        return st_group;
+    
+    def _process_record_53(self, cr, uid, st_data, line, context=None):
+       
+        super = st_data['groups'][-1]
+        
+        #
+        # Add a new group to the statement groups
+        #
+        st_group = {}
+        super['groups'] = super.get('groups', [])
+        super['groups'].append(st_group)
+        
+        st_group.update({
+                    'nif'           : line[4:13],
+                    'sufijo'        : line[13:16],
+                    'fecha'         : time.strftime('%Y-%m-%d', time.strptime(line[22:28], '%d%m%y')),
+                    'nombrecl'      : line[28:68].strip(),
+                    'entidad'       : line[68:72],
+                    'oficina'       : line[72:76],
+                    'dc'            : line[76:78],
+                    'ncc'           : line[78:88],
+                    '_num_records'  : 1,
+                    'num_records'   : 0,
+                    '_num_dev'      : 0,
+                    'num_dev'       : 0,
+                    'import'        : 0,
+                    'lineas'         : []
+            })
+        
+        return st_group 
+   
+   
+    def _process_record_56(self, cr, uid, st_data, line, context=None):
+        super   = st_data['groups'][-1]
+        super2  = super['groups'][-1]
+        
+        
+        #
+        # Add a new line to the statement lines
+        #
+        st_line = {}
+        super2['lineas'] = super2.get('lineas', [])
+        super2['lineas'].append(st_line)
+
+        #
+        # Set the line values
+        #
+        st_line.update({
+            'nif'           : line[4:13],
+            'sufijo'        : line[13:16],
+            'codi_ref'      : line[16:28].strip(),
+            'nombre_titular': line[28:68].strip(),
+            'entidad'       : line[68:72],
+            'oficina'       : line[72:76],
+            'dc'            : line[76:78],
+            'ncc'           : line[78:88],
+            'importe'       : float(line[88:96])+(float(line[96:98])/100),
+            'codi_dev'      : line[98:104].strip(),
+            'codi_ref_int'  : line[104:114].strip(),
+            'concepto'      : line[114:154].strip(),
+            'motivo_dev'    : line[154:155].strip()
+        })
+
+        super2['_num_records']  += 1
+        super2['_num_dev']      += 1
+        super2['import']        += st_line['importe']
+        
+        return st_line
+    
+    def _process_record_58(self, cr, uid, st_data, line, context=None):
+        super   = st_data['groups'][-1]
+        super2  = super['groups'][-1]
+        
+        super2['_num_records'] += 1
+        
+        print line[104:114]
+        devolucions = float(line[104:114])
+        registres   = float(line[114:124])
+        importe     = float(line[88:96])+(float(line[96:98])/100)
+        
+        
+        
+        ################################################
+        ##   CHECKS A NIVEL DE GRUP
+        ################################################
+        if devolucions != super2['_num_dev'] :
+            raise osv.except_osv('Error in C19 file', 'El numero de devolucions no coincideix amb el definit al grup. (linea: %s)' % (super['_num_records'] + super2['_num_records']))
+        if registres != super2['_num_records']:
+            raise osv.except_osv('Error in C19 file', 'El numero de registres no coincideix amb el definit al grup. (linea: %s)' % (super['_num_records'] + super2['_num_records']))
+        if abs(importe - super2['import'] ) > 0.005:
+            raise osv.except_osv('Error in C19 file', "L'import dels registres no coincideix amb el definit al grup. (linea: %s)" % (super['_num_records'] + super2['_num_records']))
+        
+        
+        
+        super2['num_dev']       = devolucions
+        super2['import']        = importe
+        super2['num_records']   = registres
+        
+        super['_num_records']   += super2['num_records']
+        super['import']         += importe
+        super['_num_dev']       += devolucions
+        
+        return super2
+    
+    
+    def _process_record_59(self, cr, uid, st_data, line, context):
+        super   = st_data['groups'][-1]
+        
+        super['_num_records'] += 1
+        
+        devolucions = float(line[104:114])
+        registres   = float(line[114:124])
+        importe     = float(line[88:96])+(float(line[96:98])/100)
+        
+        
+        ################################################
+        ##   CHECKS A NIVEL DE CAPÇALERA SUPERIOR
+        ################################################
+        if devolucions != super['_num_dev'] :
+            raise osv.except_osv('Error in C19 file', 'El numero de devolucions no coincideix amb el definit al total. (linea: %s)' % (super['_num_records']))
+        if registres != super['_num_records']:
+            raise osv.except_osv('Error in C19 file', 'El numero de registres no coincideix amb el definit al total. (linea: %s)' % (super['_num_records']))
+        if abs(importe - super['import'] ) > 0.005:
+            raise osv.except_osv('Error in C19 file', "L'import dels registres no coincideix amb el deffecha_fichinit al total. (linea: %s)" % (super['_num_records']))
+        
+        
+        super['num_dev']       = devolucions
+        super['import']        = importe
+        super['num_records']   = registres
+        
+        
+        return super
+    
+    
+    
+    def _load_c19_file(self, cr, uid, file_contents, context=None):
+        if context is None:
+            context = {}
+        
+        st_data = {
+                'groups' : []
+            }
+        
+        #
+        # Read the C19 file
+        #
+        decoded_file_contents = base64.decodestring(file_contents)
+        try:
+            unicode(decoded_file_contents, 'utf8')
+        except Exception, ex: # Si no puede convertir a UTF-8 es que debe estar en ISO-8859-1: Lo convertimos
+            #hem quitat l'ultim
+            decoded_file_contents = unicode(decoded_file_contents, 'iso-8859-1')#.encode('utf-8')    
+        
+        #
+        # Process the file lines
+        #
+        for line in decoded_file_contents.split("\n"):
+            if len(line) == 0:
+                continue
+            if not (line[2:4] == '90'):
+                raise osv.except_osv('Error in C19 file', 'data code %s is not valid.' % line[2:4])
+            if line[0:2] == '51': # Registro cabecera de cuenta (obligatorio)
+                self._process_record_51(cr, uid, st_data, line, context)
+            elif line[0:2] == '53': # Registro cabecera de ordenante (obligatorio)
+                self._process_record_53(cr, uid, st_data, line, context)
+            elif line[0:2] == '56': # Registros individual obligatorio
+                self._process_record_56(cr, uid, st_data, line, context)
+            elif line[0:2] == '58': # Registro total de ordenante
+                self._process_record_58(cr, uid, st_data, line, context)
+            elif line[0:2] == '59': # Registro total general
+                self._process_record_59(cr, uid, st_data, line, context)
+            elif ord(line[0]) == 26: # CTRL-Z (^Z), is often used as an end-of-file marker in DOS
+                pass
+            else:
+                raise osv.except_osv('Error in C19 file', 'Record type %s is not valid.' % line[0:2])
+
+        return st_data
+    
+    def _attach_file_to_fitxer(self, cr, uid, file_contents, file_name, fitxer_id, context=None):
+        """
+        Attachs a file to the given fitxer de rebuts retornats
+        """
+        if context is None:
+            context = {}
+        pool = pooler.get_pool(cr.dbname)
+        attachment_facade = pool.get('ir.attachment')
+        
+        attachment_name = 'Fitxer Rebuts Retornat'
+
+        #
+        # Remove the previous statement file attachment (if any)
+        #
+        ids = attachment_facade.search(cr, uid, [
+                    ('res_id', '=', fitxer_id),
+                    ('res_model', '=', 'setitria.fitxerretornat'),
+                    ('name', '=', attachment_name),
+                ], context=context)
+        if ids:
+            attachment_facade.unlink(cr, uid, ids, context)
+
+        #
+        # Create the new attachment
+        #
+        res = attachment_facade.create(cr, uid, {
+                    'name': attachment_name,
+                    'datas': file_contents,
+                    'datas_fname': file_name,
+                    'res_model': 'setitria.fitxerretornat',
+                    'res_id': fitxer_id,
+                }, context=context)
+
+        return res
+    
+    def import_action(self, cr, uid, ids, context=None):
+        """
+        Imports the C19 file selected by the user on the wizard form
+        """
+        if context is None:
+            context = {}
+        
+        pool    = pooler.get_pool(cr.dbname)
+        factura = pool.get('account.invoice')
+        banc    = pool.get('res.bank')
+        apunt   = pool.get('account.move.line')
+        reconc  = pool.get('account.move.reconcile')
+        fitxer  = pool.get('setitria.fitxerretornat')
+        lineafit= pool.get('setitria.fitxerretornat.line')
+        pay_line= pool.get('payment.line')      
+        account_obj = pool.get('account.account')
+        partner_obj = pool.get('res.partner')
+        
+        for c19_wizard in self.browse(cr,uid,ids,context):
+            # Load the file data into the st_data dictionary
+            st_data = self._load_c19_file(cr, uid, c19_wizard.file, context=context)
+            
+            for grupoTotal in st_data['groups']:    # per cada grup gran (en principi un per fitxer, pero aixó no es pot control-lar)
+                
+                banc_id = False
+                banc_id = banc.search(cr, uid,[('code', '=', grupoTotal['entidad'])])
+                
+                if not banc_id:
+                    raise osv.except_osv('Error tractant el fitxer', "El codi del banc indicat al fitxer no existeix")
+                else:
+                    banc_id=banc_id[0]
+                    
+                values = {
+                            'date'      : grupoTotal['fecha_fich'],
+                            'date_imp'  : date.today().isoformat(),
+                            'name'      : c19_wizard.file_name,
+                            'banc_id'   : banc_id
+                          }
+                
+                fitxer_id = fitxer.create(cr, uid, values,context=context)
+                
+                for grupo in grupoTotal['groups']:  # per cada grup (agrupacio de rebuts per dia)
+                    for linea in grupo['lineas']:   # per cada rebut
+                        ids = factura.search(cr,uid,[('number','=',linea['codi_ref'])])
+                        if not ids:
+                            ids = factura.search(cr,uid,[('internal_number','=',linea['codi_ref'])])
+                            if not ids:
+                                ids = factura.search(cr,uid,[('name','=',linea['codi_ref'])])
+                                if not ids:
+                                    ids = factura.search(cr,uid,[('reference','=',linea['codi_ref'])])
+                        
+                        print 'Sufijo: '+ str(linea['sufijo'])
+                        print 'codi_ref: '+ str(linea['codi_ref']).lstrip('0')
+                        print 'nombre_titular: '+ str(linea['nombre_titular'])
+                        print 'entidad: '+ str(linea['entidad'])
+                        print 'oficina: '+ str(linea['oficina'])
+                        print 'dc: '+ str(linea['dc'])
+                        print 'ncc: '+ str(linea['ncc'])
+                        print 'importe: '+ str(linea['importe'])
+                        print 'codi_dev: '+ str(linea['codi_dev'])
+                        print 'codi_ref_int: '+ str(linea['codi_ref_int'])
+                        print 'concepto: '+ str(linea['concepto'])
+                        print 'motivo_dev: '+ str(linea['motivo_dev'])
+                        codi_dev = linea['codi_dev']
+                        importe = linea['importe']
+                        partner = partner_obj.search(cr, uid, [('ref', '=', linea['codi_ref'])])
+                        if partner:
+                            part = partner_obj.browse(cr, uid, partner[0])
+                            id_compte_430 = part.property_account_receivable.id
+                        else:
+                            partner = partner_obj.search(cr, uid, [('ref', '=', linea['codi_ref'][3:])])
+                            if partner:
+                                part = partner_obj.browse(cr, uid, partner[0])
+                                id_compte_430 = part.property_account_receivable.id
+                            else:
+                                partner = partner_obj.search(cr, uid, [('ref', '=', linea['codi_ref'].lstrip('0'))])
+                                if partner:
+                                    part = partner_obj.browse(cr, uid, partner[0])
+                                    id_compte_430 = part.property_account_receivable.id
+                                else:
+                                    raise osv.except_osv('Error', 'Partner not found containing %s Reference number.' % linea['codi_ref'].lstrip('0'))
+                        
+                        ids = False
+                        pline = False
+#                        pline_ids=[]
+                        if codi_dev:  
+                            pline_ids = pay_line.search(cr, uid, [('ml_inv_ref', '=', int(codi_dev))])
+                            for line in pline_ids:
+                                pline = pay_line.browse(cr,uid,line)
+                                if pline.id == int(linea['codi_ref_int']):
+                                    break
+                                else:
+                                    pline = False
+                        
+                        if pline and pline.ml_inv_ref:
+                            if pline.ml_inv_ref.id == int(codi_dev):
+                                ids = pline.ml_inv_ref.id
+                        
+                        if ids==False:
+                          inv_list = factura.search(cr,uid,[('partner_id','=',part.id), ('state', '=', 'paid'), ('amount_total', '=', importe)])  
+                          if inv_list:
+                              ids = inv_list[0] 
+                              inv = factura.browse(cr,uid,ids)
+                              pline_ids = inv.payment_ids
+                              if pline_ids:
+                                  pay_line_id = pline_ids[0] 
+                              else:
+                                  raise osv.except_osv('Error', 'Ainara!!')
+                        if ids:
+                            values = {
+                                      'fitxer_id'   : fitxer_id,
+                                      'invoice_id'  : ids,
+                                      'date'        : grupo['fecha'],
+                                      'motiu_dev'   : linea['motivo_dev']
+                                    }
+                            
+                            fact_obj = factura.browse(cr,uid,ids)
+                            id_linea = apunt.search(cr, uid,[
+                                                             ('account_id','=',id_compte_430),
+                                                             ('debit','=',fact_obj.amount_total),
+#                                                            ('date','=',grupo['fecha'])
+#                                                             ,('reconcile_id','=',False)
+                                                        ])
+                            if id_linea:
+#                                ids_mov = []
+                                
+                                
+#                                for mov_line in fact_obj.move_lines:
+#                                    ids_mov.append(mov_line.id)
+#                                    if mov_line.reconcile_id:
+#                                        id_reconcile = mov_line.reconcile_id.id
+#                                        break
+#                                    
+#                                if id_reconcile:
+#                                    apunt.write(cr,uid,id_linea,{'reconcile_id':id_reconcile},context)
+#                                else:
+#                                id_reconcile = reconc.create(cr,uid,{
+#                                                                     'name' : 'DEV FACT %s' % linea['codi_dev'],
+#                                                                     'type' : 'DEV FACT'
+#                                                                     },context)
+                                for linea in id_linea:
+                                    apunt_lines=[]
+                                    line_obj = apunt.browse(cr,uid,linea)
+                                    invoice_id = line_obj.invoice.id
+                                    if invoice_id == ids:
+                                        recon_id = False
+#                                        apunt.write(cr, uid, [line_obj.id], {'reconcile_id':False}, context)
+                                        
+#                                        ids_mov.append(linea)
+                                        inv_o = factura.browse(cr, uid, ids)
+                                        reference = 'DEV FACT %s' % inv_o.name
+                                        if pline:
+                                            cp_move = pline.payment_move_id.id
+                                        else:
+                                            cp_move = pay_line_id.move_id.id 
+                                        account_move = self.pool.get('account.move').copy(cr, uid, cp_move, {'ref':reference})
+                                        account_move_o = self.pool.get('account.move').browse(cr, uid, account_move)
+                                        lines = account_move_o.line_id
+                                        kont=0
+            
+                                        for move_line in lines:
+                                            recon =False
+                                            amount = 0.0
+                                            move_line_o = apunt.browse(cr, uid, move_line.id)
+                                            for inv_move_line in inv_o.move_id.line_id:
+                                                inv_line_o = apunt.browse(cr,uid,inv_move_line)
+                                                if inv_line_o.reconcile_id:
+                                                    recon = inv_line_o.reconcile_id.id
+                                                    break
+    
+                                            if(recon != move_line_o.reconcile_id.id):
+                                                continue                           
+                                            if move_line_o.debit==0.0:
+                                                amount = move_line_o.credit
+                                            else:
+                                                amount = move_line_o.debit
+                                            if ((lines.__len__()<3) or (kont < 2 and move_line_o.partner_id.id == part.id and amount == inv_o.amount_total and not pline) or ((kont < 2) and move_line_o.partner_id.id == part.id and amount == inv_o.amount_total and pline and inv_o.name == move_line_o.name)):
+                                                debit = 0.0
+                                                credit = 0.0
+                                                if move_line_o.debit > 0.0:
+                                                    credit = importe
+                                                if move_line_o.credit >0.0:
+                                                    debit = importe
+                                                    apunt_lines.append(move_line_o.id)
+                                                res ={'move_id':int(account_move),'credit':credit, 'debit':debit, 'state':'draft','reconcile_id':False}
+                                                apunt.write(cr, uid, [move_line_o.id], res)
+                                                if line_obj.reconcile_id:
+                                                    recon_id = line_obj.reconcile_id.id
+                                                    apunt_lines.append(line_obj.id)
+                                                kont = kont + 1
+                                            else:
+                                                apunt.unlink(cr,uid, [move_line_o.id])
+                                        for payline in fact_obj.payment_ids:
+                                            if payline.reconcile_id and payline.reconcile_id.id == recon_id:
+                                                apunt_lines.append(payline.id)
+                                                
+                                        self.pool.get('account.move').button_validate(cr, uid, [account_move])
+                                        self.pool.get('account.move.reconcile').unlink(cr, uid, recon_id, context=context)
+                                        apunt.reconcile_partial(cr, uid, apunt_lines)
+                                        wf_service = netsvc.LocalService("workflow")
+                                        wf_service.trg_validate(uid, 'account.invoice', ids, 'open_test2', cr)
+                                    
+                                values['state'] = 'valid' 
+                            else:                              
+                                values['notes'] = "No s'ha trobat el apunt de contraprestació de la factura"
+                            
+                            lineafit.create(cr,uid,values,context=context)
+                        else:
+                            
+                            
+                            
+                            raise osv.except_osv('Error tractant el fitxer', 'La factura no es troba.(%s)' % linea['codi_dev'])
+                        
+                # Attach the C43 file to the current statement
+                self._attach_file_to_fitxer(cr, uid, c19_wizard.file, c19_wizard.file_name, fitxer_id)          
+        
+        return {}
+ 
+ 
+ 
+    _name = 'setitria.mods.import.dev.c19.wizard'
+    
+    _columns = {
+        'file': fields.binary('Arxiu de retornats del Banc', required=True, filename='file_name'),
+        'file_name': fields.char('Arxiu de retornats del Banc', size=64)
+        }
+    
+setitria_mods_import_dev_c19_wizard()
+
+
+class setitria_fitxerretornat(osv.osv):
+    _name = "setitria.fitxerretornat"
+    _description = 'Fitxer Rebuts Retornats'
+    
+    
+    def _get_rebuts(self, cr, uid, ids, context=None):
+        list_fitxer = [ l.fitxer_id.id for l in  self.pool.get('setitria.fitxerretornat.line').browse(cr, uid, ids, context=context)]
+        return list_fitxer
+    
+    def _calcul_state(self, cr, uid, ids, name, arg, context=None):
+        if not ids: return {}
+        res = {}
+        for id in ids:
+            res[id] = ['incomplete']
+            
+        cr.execute('''
+            SELECT
+                a.id,
+               COALESCE(max(b.state),'incomplete')
+            FROM
+                     setitria_fitxerretornat a
+                LEFT OUTER JOIN
+                    setitria_fitxerretornat_line b
+                        ON
+                            a.id=b.fitxer_id
+            WHERE
+                a.id IN %s 
+            GROUP BY 
+                a.id
+            ''',(tuple(ids),))
+        
+        for oid,state in cr.fetchall():
+            res[oid] = state
+                        
+        return res
+        
+    _columns = {
+        'date'      : fields.date('Data del fitxer'),
+        'banc_id'   : fields.many2one('res.bank','Banc origen'),
+        'name'      : fields.char("Nom de l'arxiu", size=64, required=True),
+        'date_imp'  : fields.date("Data d'importació del fitxer"),
+        'lines_id'  : fields.one2many('setitria.fitxerretornat.line','fitxer_id'),
+        'notes'     : fields.text('Notes'),
+        'state'     : fields.function(_calcul_state, method=True, string='Estat', type='selection', selection=[
+                                            ('incomplete', 'Incomplert'),
+                                            ('valid', 'Complert')
+                                        ],
+                                        store = {
+                                                 'setitria.fitxerretornat.line': (_get_rebuts, ['state'], 10),
+                                                 }
+        ),
+    }
+    
+    _sql_constraints = [
+        ('no repetit', 'UNIQUE (date, banc_id, name)',  'Error, introduint dades previament cargades'),
+    ]
+        
+    def unlink(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+        attachment_facade = self.pool.get('ir.attachment')
+        
+        attachment_name = 'Fitxer Rebuts Retornat'
+        
+        for id in ids:
+            #
+            # Remove the previous statement file attachment (if any)
+            #
+            id_at = attachment_facade.search(cr, uid, [
+                        ('res_id', '=', id),
+                        ('res_model', '=', 'setitria.fitxerretornat'),
+                        ('name', '=', attachment_name),
+                    ], context=context)
+            if id_at:
+                attachment_facade.unlink(cr, uid, id_at, context)
+        
+        ret = super(setitria_fitxerretornat,self).unlink(cr,uid,ids,context=context)
+        return ret;
+    
+setitria_fitxerretornat()
+
+class setitria_fitxerretornat_line(osv.osv):
+    _name = "setitria.fitxerretornat.line"
+    _description = 'Lineas Fitxers Rebuts Retornats'
+    
+    _columns = {
+        'fitxer_id' : fields.many2one('setitria.fitxerretornat','Fitxer Retornat',required=True, ondelete='cascade'),
+        'motiu_dev' : fields.selection([
+                                            ('0',"Import a cero"),
+                                            ('1',"Incorriente"),
+                                            ('2',"No domiciliat o compte cancel-lat"),
+                                            ('3',"Oficina domiciliataria inexistent"),
+                                            ('4',"Aplicació R.D. 338/90, sobre el NIF"),
+                                            ('5',"Per ordre del client: error o baixa en la domiciliació"),
+                                            ('6',"Per ordre del client: disconformitat amb l'import"),
+                                            ('7',"Dec duplicat, indegut, erroni o falten dades "),
+                                            ('8',"Sense utilitzar")
+                                        ], 'Motiu de devolució'),
+        'invoice_id': fields.many2one('account.invoice','Factura associada'),
+        'date'      : fields.date('Data de retorn'),
+        'state'     : fields.selection([
+                                            ('incomplete', 'Incomplert'),
+                                            ('valid', 'Complert')
+                                        ],'Estat'),
+        'notes'     : fields.text('Notes')
+    }
+    
+    _defaults = {
+        'state'  : 'incomplete'
+    }
+    
+setitria_fitxerretornat_line()

=== added file 'l10n_es_devolucion_remesas/setitria_mods_comptabilitat.xml'
--- l10n_es_devolucion_remesas/setitria_mods_comptabilitat.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_devolucion_remesas/setitria_mods_comptabilitat.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+ <!-- Import C19 file wizard -->
+        <record model="ir.ui.view" id="c19_dev_file_import_wizard">
+            <field name="name">setitria.mods.import.dev.c19.import.form</field>
+            <field name="model">setitria.mods.import.dev.c19.wizard</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Importació de rebuts retornats d'acord a la norma C19">
+                    <group colspan="4">
+                        <label string="Arxiu de retornats del Banc:"/>
+                        <newline/>
+                        <field name="file_name" nolabel="1"/>
+                        <field name="file" filename="file_name" nolabel="1"/>
+                    </group>
+                    <button icon="gtk-cancel" special="cancel" string="Cancel·lar" type="object"/>
+                    <button icon="gtk-ok" name="import_action" string="Importar" type="object"/>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_c19_dev_file_import_wizard" model="ir.actions.act_window">
+            <field name="name">Wizard d'importació de fitxers de devolucions C19</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">setitria.mods.import.dev.c19.wizard</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="target">new</field>
+        </record>    
+        
+  <!-- fi Import C19 file wizard -->
+  
+   <!-- Vistes de les clases dels rebuts retornats -->
+          
+        <record model="ir.ui.view" id="setitria_fitxer_retornat_line_view">
+        	<field name="name">setitria.fitxerretornat.line.form</field>
+        	<field name="model">setitria.fitxerretornat.line</field>
+        	<field name="type">form</field>
+            <field name="arch" type="xml">
+            	<form string="Rebuts Retornats" >
+            		<field name="invoice_id" />
+           			<field name="date"  />
+           			<field name="motiu_dev"  />
+           			<field name="state"  />
+					<field colspan="4" name="notes" />
+            	</form>
+            </field>
+        </record>
+        
+        
+        <record model="ir.ui.view" id="setitria_fitxer_retornat_line_view_tree">
+        	<field name="name">setitria.fitxerretornat.line.tree</field>
+        	<field name="model">setitria.fitxerretornat.line</field>
+        	<field name="type">tree</field>
+            <field name="arch" type="xml">
+            	<tree string="Rebuts Retornats" colors="red:state=='incomplete'" >
+            		<field name="invoice_id" />
+           			<field name="date" />
+           			<field name="motiu_dev"  />
+           			<field name="state" />
+            	</tree>
+            </field>
+        </record>
+        
+        
+       	<record model="ir.actions.act_window" id="setitria_fitxer_retornat_line_open">
+			<field name="name">Rebuts Retornats</field>
+			<field name="res_model">setitria.fitxerretornat.line</field>
+			<field name="view_type">form</field>
+			<field name="view_mode">tree,form</field>
+		</record>
+        
+        
+        
+        <record model="ir.ui.view" id="setitria_fitxer_retornat_view">
+        	<field name="name">setitria.fitxerretornat.form</field>
+        	<field name="model">setitria.fitxerretornat</field>
+        	<field name="type">form</field>
+            <field name="arch" type="xml">
+            	<form string="Fitxers de Rebuts Retornats">
+           			<field name="banc_id" />
+           			<field name="date"  />
+           			<field name="name" />
+           			<field name="date_imp"  />
+           			<notebook colspan="4">
+           				<page string="Rebuts">
+           					<field colspan="4" name="lines_id" nolabel="1"/>
+           				</page>
+           				<page string="Notes">
+           					<field colspan="4" name="notes" nolabel="1"/>
+           				</page>
+           			</notebook>
+            	</form>
+            </field>
+        </record>
+        
+        
+        <record model="ir.ui.view" id="setitria_fitxer_retornat_view_tree">
+        	<field name="name">setitria.fitxerretornat.tree</field>
+        	<field name="model">setitria.fitxerretornat</field>
+        	<field name="type">tree</field>
+            <field name="arch" type="xml">
+            	<tree string="Fitxers de Rebuts Retornats" colors="red:state=='incomplete'">
+            		<field name="banc_id" />
+           			<field name="date"  />
+           			<field name="name"  />
+           			<field name="date_imp" />
+           			<field name="state" />
+            	</tree>
+            </field>
+        </record>
+        
+        <record model="ir.actions.act_window" id="setitria_fitxer_retornat_open">
+			<field name="name">Fitxers Rebuts Retornats</field>
+			<field name="res_model">setitria.fitxerretornat</field>
+			<field name="view_type">form</field>
+			<field name="view_mode">tree,form</field>
+		</record>
+		
+		<record id="view_purchase_order_filter" model="ir.ui.view">
+            <field name="name">setitria.fitxerretornat.select</field>
+            <field name="model">setitria.fitxerretornat</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+            	<search string="Buscar Fitxer de rebuts retornats">
+            	 	<filter icon="terp-document-new" name="incomplete" string="Incomplertas" domain="[('state','=','incomplete')]" separator="1" />
+                    <filter icon="terp-check" name="valid" string="Valides" domain="[('state','=','valid')]" separator="1" />
+                    <separator orientation="vertical"/>
+                    <field name="banc_id" select="1" />
+                    <field name="name" select="1" />
+                    <separator orientation="vertical"/>
+                    <field name="date" select="1" />
+                    <field name="date_imp" select="1" />
+            	</search>
+            </field>
+        </record>
+		
+		<menuitem id="setitria_retornat_menu" name="Remittance returns" parent="account_payment.menu_main_payment" sequence="20"/>
+		<menuitem id="setitria_fitxer_retornat_menu" name="Fitxers Rebuts Retornats" parent="setitria_retornat_menu" action="setitria_fitxer_retornat_open" sequence="20"/>
+        <menuitem id="setitria_fitxer_retornat_menu_import" name="Importar Fitxers Rebuts Retornats" parent="setitria_retornat_menu" action="action_c19_dev_file_import_wizard" sequence="25"/>
+        
+<!--
+	Fem que el wizard es pugui executar desde on volem 
+
+        <act_window id="action_c19_dev_file_import_wizard"
+    		key2="client_action_multi" name="Import Arxiu Retornats Banc"
+    		res_model="setitria.mods.import.dev.c19.wizard" src_model="account.bank.statement"
+    		view_mode="form" target="new" view_type="form" groups="account.group_account_manager"/>
+-->  
+    </data>
+</openerp>

=== added directory 'l10n_es_payment_order'
=== renamed directory 'l10n_es_payment_order' => 'l10n_es_payment_order.moved'
=== added file 'l10n_es_payment_order/__init__.py'
--- l10n_es_payment_order/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/__init__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,30 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import remesas
+import report
+import wizard
+

=== added file 'l10n_es_payment_order/__openerp__.py'
--- l10n_es_payment_order/__openerp__.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/__openerp__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,54 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    Copyright (c) 2008 Acysos SL. All Rights Reserved.
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    "name" : "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58",
+    "version" : "1.5",
+    "author" : "Acysos SL, Zikzakmedia SL, Pablo Rocandio, NaN",
+    "category" : "Localisation/Accounting",
+    "description" : """Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria.
+
+Crea un tipo de pago "Recibo domiciliado" con el código RECIBO_CSB. Este código es importante pues permite ejecutar el asistente de creación del fichero de remesas cuando se presiona el botón "Realizar pagos" en la orden de pagos o remesa.
+
+También crea los tipos de pago "Transferencia" (TRANSFERENCIA_CSB), "Pagaré" (PAGARE_CSB), "Cheque" (CHEQUE_CSB), "Pago certificado" (PAGO_CERTIFICADO_CSB).
+
+Antes de generar un fichero bancario CSB habrá que definir un modo de pago que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y nombre de compañia a incluir en el fichero.
+
+Al crear el fichero bancario CSB:
+
+  * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria
+  * El fichero creado se guarda como adjunto de la orden de pagos. Se puede volver a crear el fichero de remesas siempre que sea necesario (puede tener que renombrar el anterior fichero adjunto si tienen el mismo nombre).
+
+También se proporciona un informe para imprimir un listado de los pagos/cobros de la orden de pago/cobro (remesa).
+""",
+    "website" : "www.zikzakmedia.com",
+    "license" : "GPL-3",
+    "depends" : ["base", "account", "account_payment_extension",],
+    "init_xml" : ["remesas_data.xml"],
+    "demo_xml" : [],
+    "update_xml" : ["remesas_report.xml", "remesas_view.xml", "remesas_wizard.xml",],
+    "installable" : True,
+    "active" : False,
+}

=== added directory 'l10n_es_payment_order/i18n'
=== added file 'l10n_es_payment_order/i18n/ca.po'
--- l10n_es_payment_order/i18n/ca.po	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/i18n/ca.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,811 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* l10n_ES_remesas
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.15\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-05-24 11:11+0000\n"
+"PO-Revision-Date: 2011-11-08 16:22+0000\n"
+"Last-Translator: jmartin (Zikzakmedia) <jmartin@xxxxxxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-18 05:39+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Matur. date"
+msgstr "Data de venciment"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 19"
+msgstr "CSB 19"
+
+#. module: l10n_es_payment_order
+#: model:ir.module.module,description:l10n_es_payment_order.module_meta_information
+msgid ""
+"Módulo para la exportación de ficheros bancarios según las normas CSB 19 "
+"(recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de "
+"créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y "
+"pagos certificados) para poder ser enviados a la entidad bancaria.\n"
+"\n"
+"Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este "
+"código es importante pues permite ejecutar el asistente de creación del "
+"fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la "
+"orden de pagos o remesa.\n"
+"\n"
+"También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), "
+"\"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" "
+"(PAGO_CERTIFICADO_CSB).\n"
+"\n"
+"Antes de generar un fichero bancario CSB habrá que definir un modo de pago "
+"que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, "
+"CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y "
+"nombre de compañia a incluir en el fichero.\n"
+"\n"
+"Al crear el fichero bancario CSB:\n"
+"\n"
+"  * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n"
+"  * El fichero creado se guarda como adjunto de la orden de pagos. Se puede "
+"volver a crear el fichero de remesas siempre que sea necesario (puede tener "
+"que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n"
+"\n"
+"También se proporciona un informe para imprimir un listado de los "
+"pagos/cobros de la orden de pago/cobro (remesa).\n"
+msgstr ""
+"Mòdul per a l'exportació de fitxers bancaris segons les normes CSB 19 "
+"(rebuts domiciliats), CBS 32 (descompte comercial), CSB 58 (bestretes de "
+"crèdits) i CSB 34 (emissió de transferències, nòmines, xecs, pagarés i "
+"pagaments certificats) per a que puguin ser enviats a l'entitat bancària.\n"
+"\n"
+"Crea un tipus de pagament \"Rebut domiciliat\" amb el codi RECIBO_CSB. "
+"Aquest codi és important ja que permet executar l'assistent de creació del "
+"fitxer de remeses quan es pressiona el botó \"Realitzar pagaments\" en "
+"l'ordre de pagaments o remesa.\n"
+"\n"
+"També crea els tipus de pagament \"Transferència\" (TRANSFERENCIA_CSB), "
+"\"Pagaré\" (PAGARE_CSB), \"Xec\" (CHEQUE_CSB), \"Pagament certificat\" "
+"(PAGO_CERTIFICADO_CSB).\n"
+"\n"
+"Abans de generar un fitxer bancari CSB caldrà definir una manera de pagament "
+"que utilitzi el tipus de pagament anterior i on es defineixi la forma de "
+"pagament (CSB 19, CSB 32, CSB 34 o CSB 58), la companyia que emet el fitxer "
+"i el sufix i nom de companyia a incloure en el fitxer.\n"
+"\n"
+"En crear el fitxer bancari CSB:\n"
+"\n"
+"  * Es poden agrupar o no els pagaments d'una mateixa empresa i compte "
+"bancari\n"
+"  * El fitxer creat es guarda com a adjunt de l'ordre de pagaments. Es pot "
+"tornar a crear el fitxer de remeses sempre que sigui necessari (pot ser "
+"necessari canviar el nom l'anterior fitxer adjunt si tenen el mateix nom).\n"
+"\n"
+"També es proporciona un informe per imprimir un llistat dels "
+"pagaments/cobraments de l'ordre de pagament/cobrament (remesa).\n"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,send_type:0
+msgid "The sending type of the payment file"
+msgstr "El tipus de d'enviament de l'arxiu de pagament."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,add_date:0
+msgid "Add Date"
+msgstr "Afegeix data"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Additional data for CSB 34 type of payment file."
+msgstr "Dades addicionals per l'arxiu de tipus de remesa CSB 34."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cif:0
+msgid "VAT code"
+msgstr "CIF"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:71
+#, python-format
+msgid ""
+"Error:\n"
+"\n"
+"Can not convert float number %(number).2f to fit in %(size)d characters."
+msgstr ""
+"Error:\n"
+"\n"
+"No és possible convertir el nombre %(number).2f i encabir-lo en %(size)d "
+"caràcters."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,sufijo:0
+msgid "suffix"
+msgstr "Sufix"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,csb34_type:0
+msgid "Type of CSB 34 payment"
+msgstr "Tipus de pagament CSB 34"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,inc_domicile:0
+msgid "Add partner domicile records to the exported file (CSB 58)"
+msgstr ""
+"Afegir registres de domicili dels clients al fitxer exportat (CSB 58)"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cedente:0
+msgid "Cedente"
+msgstr "Cedent"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:151
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58"
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"El mode de pagament no és CSB 19, CSB 32, CSB 34 ni CSB 58"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Account:"
+msgstr "C.C.:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,cost_key:0
+msgid "Expense of the Recipient"
+msgstr "Despeses per compte del beneficiari"
+
+#. module: l10n_es_payment_order
+#: wizard_button:export_payment_file_spain,export,end:0
+#: wizard_button:export_payment_file_spain,init,export:0
+msgid "Ok"
+msgstr "Accepta"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:140
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of the customer %s has not 20 digits."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"El número de C.C. del client %s no té 20 dígits."
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,pay_fname:0
+msgid "File name"
+msgstr "Nom del fitxer"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,concept:0
+msgid "Concept of the Order."
+msgstr "Concepte de l'ordre."
+
+#. module: l10n_es_payment_order
+#: model:ir.actions.report.xml,name:l10n_es_payment_order.remesas_report
+msgid "Remesa"
+msgstr "Remesa"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,barred:0
+msgid "Barred"
+msgstr "Barrat"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,send_type:0
+msgid "Send Type"
+msgstr "Tipus d'enviament"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,direct_pay_order:0
+msgid "By default 'Not'."
+msgstr "Per defecte 'No'."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:137
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of the customer %s is not defined and current "
+"payment mode enforces all lines to have a bank account."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"L'empresa %s no té compte bancari definit i el mode de pagament actual força "
+"que totes les línies tinguin un compte bancari."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,inc_domicile:0
+msgid "Include domicile"
+msgstr "Incloure domicili"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:98
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of %s is not defined."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"El número de C.C. de %s no existeix."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_pagare0
+msgid "Pagaré"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Payment date:"
+msgstr "Data del càrrec:"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:87
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account of the company %s is not defined."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"No s'ha definit el C.C. de la companyia %s."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Transfer"
+msgstr "Transferència"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,ine:0
+msgid "INE code"
+msgstr "Codi INE"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 32"
+msgstr "CSB 32"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 34"
+msgstr "CSB 34"
+
+#. module: l10n_es_payment_order
+#: model:ir.model,name:l10n_es_payment_order.model_payment_mode
+msgid "Payment Mode"
+msgstr "Mode de pagament"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_recibodomiciliado0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_recibodomiciliado0
+msgid "Recibo domiciliado"
+msgstr "Rebut domiciliat"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,alt_domicile_format:0
+msgid "Alternative domicile record format"
+msgstr "Format de registre de domicili alternatiu"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Presenter data"
+msgstr "Dades del presentador"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "None"
+msgstr "Cap"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:101
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of %s does not have 20 digits."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"El número de C.C. de la companyia %s no té 20 dígits."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_pago_certificado0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_pago_certificado0
+msgid "Pago certificado"
+msgstr "Pagament certificat"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+msgid "Pension"
+msgstr "Pensió"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:55
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:80
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:110
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:140
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:167
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:195
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:221
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"The line \"%s\" is not 150 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuració:\n"
+"\n"
+"La línia \"%s\" no té 150 caràcters:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,partner_id:0
+#: report:remesas.report:0
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:154
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:355
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:370
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"The line \"%s\" is not 72 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuració:\n"
+"\n"
+"La línia \"%s\" no té 72 caràcters:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:174
+#, python-format
+msgid ""
+"Successfully Exported\n"
+"\n"
+"Summary:\n"
+" Total amount paid: %.2f\n"
+" Total Number of Payments: %d\n"
+msgstr ""
+"Exportació realitzada amb èxit\n"
+"\n"
+"Resum:\n"
+" Import total de la remesa: %.2f\n"
+" Nombre total de rebuts: %d\n"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text3:0
+msgid "Line 3"
+msgstr "Línia 3"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:74
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Fixed date of charge has not been defined."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"No s'ha definit cap data fixa de càrrec."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,nombre:0
+msgid "Company name in file"
+msgstr "Nom de la companyia pel fitxer"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:166
+#, python-format
+msgid "remesa"
+msgstr "remesa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:83
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Wizard can not generate export file, there are not payment lines."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"L'assistent no pot generar el fitxer de remeses, no hi ha cap rebut."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:80
+#, python-format
+msgid ""
+"Error:\n"
+"\n"
+"Can not convert integer number %(number)d to fit in %(size)d characters."
+msgstr ""
+"Error: \n"
+"\n"
+"No és possible convertir el número enter %(number)d i encabir-lo en %(size)d "
+"caràcters."
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,note:0
+msgid "Log"
+msgstr "Registre"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "PAYMENT ORDER Num.:"
+msgstr "REMESA Nº:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 58"
+msgstr "CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:107
+#, python-format
+msgid "Dear Sir"
+msgstr "Benvolgut Sr."
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "........."
+msgstr "........."
+
+#. module: l10n_es_payment_order
+#: model:ir.module.module,shortdesc:l10n_es_payment_order.module_meta_information
+msgid "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58"
+msgstr "Exportació de fitxers bancaris CSB 19, CSB 32, CSB 34 y CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:128
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Company %s has no invoicing or default address."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"La companyia %s no té adreça de facturació o adreça per defecte."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_cheque0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_cheque0
+msgid "Cheque"
+msgstr "Xec"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:168
+#, python-format
+msgid "Remesa "
+msgstr "Remesa "
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cost_key:0
+msgid "Cost Key"
+msgstr "Clau de despeses"
+
+#. module: l10n_es_payment_order
+#: model:ir.model,name:l10n_es_payment_order.model_payment_order
+msgid "Payment Order"
+msgstr "Ordre de pagament"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,concept:0
+msgid "Concept of the Order"
+msgstr "Concepte de l'ordre."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_transferencia0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_transferencia0
+msgid "Transferencia"
+msgstr "Transferència"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,note:l10n_es_payment_order.payment_type_pagare0
+msgid "Pagare"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 34 Options"
+msgstr "Opcions CSB 34"
+
+#. module: l10n_es_payment_order
+#: wizard_view:export_payment_file_spain,export:0
+#: wizard_view:export_payment_file_spain,init:0
+msgid "Payment order export"
+msgstr "Exporta l'ordre de pagament"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Total payment order:"
+msgstr "Total Remesa:"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,payroll_check:0
+msgid "Payroll Check"
+msgstr "Xec nòmina"
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,init,join:0
+msgid "Join payment lines of the same partner and bank account"
+msgstr "Fusiona rebuts de la mateixa empresa i compte bancari"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,alt_domicile_format:0
+msgid "Alt. domicile format"
+msgstr "Format domicili alt."
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,payroll_check:0
+msgid ""
+"Check it if you want to add the 018 data type in the file (the vat of the "
+"recipient is added in the 018 data type)."
+msgstr ""
+"Activeu-lo si voleu afegir el tipus de dada 018 al fitxer (s'afegeix el CIF "
+"del receptor al tipus de dada 018)."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,direct_pay_order:0
+msgid "Direct Pay Order"
+msgstr "Ordre d'abonament directe"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:94
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The company VAT number related to the bank account of the payment mode is "
+"not defined."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"No s'ha definit el CIF de la companyia associada al C.C. del mode de "
+"pagament."
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Additional data for promissory notes, checks, and certified payments."
+msgstr "Dades addicionals per a pagarés, xecs i pagaments certificats."
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text1:0
+msgid "Line 1"
+msgstr "Línia 1"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text2:0
+msgid "Line 2"
+msgstr "Línia 2"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,not_to_the_order:0
+msgid "Not to the Order"
+msgstr "No a l'ordre"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 32 Options"
+msgstr "Opcions CSB 32"
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,pay:0
+msgid "Payment order file"
+msgstr "Fitxer remesa"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Created date:"
+msgstr "Data de confecció:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,cost_key:0
+msgid "Expense of the Payer"
+msgstr "Despeses per compte de l'ordenant"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:143
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:340
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"A line in \"%s\" is not 72 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuració:\n"
+"\n"
+"Una línia del \"%s\" no té 72 caràcters:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 58 Options"
+msgstr "Opcions CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:54
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:86
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:110
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:123
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:138
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:165
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:53
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:71
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:100
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:111
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:231
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:247
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:264
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"The line \"%s\" is not 162 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuració:\n"
+"\n"
+"La línia \"%s\" no té 162 caràcters:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Bank:"
+msgstr "Banc:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Promissory Note"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+#: selection:payment.mode,send_type:0
+msgid "Other"
+msgstr "Altres"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,add_date:0
+msgid ""
+"Check it if you want to add the 910 data type in the file to include the "
+"payment date."
+msgstr ""
+"Activeu-lo si voleu afegir el tipus de dada 910 amb la data de pagament al "
+"fitxer."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Certified Payments"
+msgstr "Pagaments certificats"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:109
+#, python-format
+msgid "Total:"
+msgstr "Total:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Cheques"
+msgstr "Xecs"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid ""
+"Optional Text for the Letter (adds 101, 102, 103, data tipes in the file)"
+msgstr ""
+"Text opcional per a cartes (afegeix els tipus de dades 101, 102, 103 al "
+"fitxer)"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+msgid "Payroll"
+msgstr "Nòmina"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:90
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of the company %s has not 20 digits."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"El número de C.C. de la companyia %s no té 20 dígits."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,tipo:0
+msgid "Type of payment file"
+msgstr "Tipus de remesa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:166
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Partner %s has no invoicing or default address."
+msgstr ""
+"Error d'usuari:\n"
+"\n"
+"La companyia %s no té adreça de facturació o adreça per defecte."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:108
+#, python-format
+msgid "Payment ref."
+msgstr "Ref. de pagament"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,send_type:0
+msgid "Ordinary Mail"
+msgstr "Correu ordinari"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,text1:0
+#: help:payment.mode,text2:0
+#: help:payment.mode,text3:0
+msgid ""
+"Enter text and/or select a field of the invoice to include as a description "
+"in the letter. The possible values ​​are: ${amount}, ${communication}, "
+"{communication2}, {date}, {ml_maturity_date}, {create_date}, "
+"{ml_date_created}"
+msgstr ""
+"Introduïu text i/o seleccioneu un camp de la factura per incloure'l a la "
+"descripció de la carta. Són possibles els següents valors: ${amount}, "
+"${communication}, {communication2}, {date}, {ml_maturity_date}, "
+"{create_date}, {ml_date_created}"
+
+#. module: l10n_es_payment_order
+#: model:ir.actions.wizard,name:l10n_es_payment_order.wizard_create_payment_file_spain
+msgid "Create payment file"
+msgstr "Crear fitxer de la remesa"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Amount"
+msgstr "Import"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Company:"
+msgstr "Companyia:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,send_type:0
+msgid "Certified Mail"
+msgstr "Correu certificat"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Type:"
+msgstr "Tipus:"

=== added file 'l10n_es_payment_order/i18n/es.po'
--- l10n_es_payment_order/i18n/es.po	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/i18n/es.po	2011-11-28 16:53:26 +0000
@@ -0,0 +1,809 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# 	* l10n_ES_remesas
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.15\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-05-24 11:11+0000\n"
+"PO-Revision-Date: 2011-11-08 16:22+0000\n"
+"Last-Translator: jmartin (Zikzakmedia) <jmartin@xxxxxxxxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2011-11-18 05:39+0000\n"
+"X-Generator: Launchpad (build 14299)\n"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Matur. date"
+msgstr "Fecha de vencimiento"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 19"
+msgstr "CSB 19"
+
+#. module: l10n_es_payment_order
+#: model:ir.module.module,description:l10n_es_payment_order.module_meta_information
+msgid ""
+"Módulo para la exportación de ficheros bancarios según las normas CSB 19 "
+"(recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de "
+"créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y "
+"pagos certificados) para poder ser enviados a la entidad bancaria.\n"
+"\n"
+"Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este "
+"código es importante pues permite ejecutar el asistente de creación del "
+"fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la "
+"orden de pagos o remesa.\n"
+"\n"
+"También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), "
+"\"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" "
+"(PAGO_CERTIFICADO_CSB).\n"
+"\n"
+"Antes de generar un fichero bancario CSB habrá que definir un modo de pago "
+"que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, "
+"CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y "
+"nombre de compañia a incluir en el fichero.\n"
+"\n"
+"Al crear el fichero bancario CSB:\n"
+"\n"
+"  * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n"
+"  * El fichero creado se guarda como adjunto de la orden de pagos. Se puede "
+"volver a crear el fichero de remesas siempre que sea necesario (puede tener "
+"que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n"
+"\n"
+"También se proporciona un informe para imprimir un listado de los "
+"pagos/cobros de la orden de pago/cobro (remesa).\n"
+msgstr ""
+"Módulo para la exportación de ficheros bancarios según las normas CSB 19 "
+"(recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de "
+"créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y "
+"pagos certificados) para poder ser enviados a la entidad bancaria.\n"
+"\n"
+"Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este "
+"código es importante pues permite ejecutar el asistente de creación del "
+"fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la "
+"orden de pagos o remesa.\n"
+"\n"
+"También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), "
+"\"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" "
+"(PAGO_CERTIFICADO_CSB).\n"
+"\n"
+"Antes de generar un fichero bancario CSB habrá que definir un modo de pago "
+"que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, "
+"CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y "
+"nombre de compañia a incluir en el fichero.\n"
+"\n"
+"Al crear el fichero bancario CSB:\n"
+"\n"
+"  * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n"
+"  * El fichero creado se guarda como adjunto de la orden de pagos. Se puede "
+"volver a crear el fichero de remesas siempre que sea necesario (puede tener "
+"que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n"
+"\n"
+"También se proporciona un informe para imprimir un listado de los "
+"pagos/cobros de la orden de pago/cobro (remesa).\n"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,send_type:0
+msgid "The sending type of the payment file"
+msgstr "El tipos de envío del archivo de pago"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,add_date:0
+msgid "Add Date"
+msgstr "Añadir fecha"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Additional data for CSB 34 type of payment file."
+msgstr "Datos adicionales para el archivo de tipo de remesa CSB 34."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cif:0
+msgid "VAT code"
+msgstr "CIF"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:71
+#, python-format
+msgid ""
+"Error:\n"
+"\n"
+"Can not convert float number %(number).2f to fit in %(size)d characters."
+msgstr ""
+"Error:\n"
+"\n"
+"No se puede convertir el número %(number).2f para que quepa en %(size)d "
+"caracteres."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,sufijo:0
+msgid "suffix"
+msgstr "Sufijo"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,csb34_type:0
+msgid "Type of CSB 34 payment"
+msgstr "Tipos de pago CSB 34"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,inc_domicile:0
+msgid "Add partner domicile records to the exported file (CSB 58)"
+msgstr ""
+"Añadir registros de domicilio de los clientes al archivo exportado (CSB 58)"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cedente:0
+msgid "Cedente"
+msgstr "Cedente"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:151
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58"
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"El modo de pago no es CSB 19, CSB 32, CSB 34 ni CSB 58"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Account:"
+msgstr "C.C.:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,cost_key:0
+msgid "Expense of the Recipient"
+msgstr "Gastos por cuenta del beneficiario"
+
+#. module: l10n_es_payment_order
+#: wizard_button:export_payment_file_spain,export,end:0
+#: wizard_button:export_payment_file_spain,init,export:0
+msgid "Ok"
+msgstr "Aceptar"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:140
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of the customer %s has not 20 digits."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"El número de C.C. del cliente %s no tiene 20 dígitos."
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,pay_fname:0
+msgid "File name"
+msgstr "Nombre del fichero"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,concept:0
+msgid "Concept of the Order."
+msgstr "Concepto de la orden."
+
+#. module: l10n_es_payment_order
+#: model:ir.actions.report.xml,name:l10n_es_payment_order.remesas_report
+msgid "Remesa"
+msgstr "Remesa"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,barred:0
+msgid "Barred"
+msgstr "Barrado"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,send_type:0
+msgid "Send Type"
+msgstr "Tipo de envío"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,direct_pay_order:0
+msgid "By default 'Not'."
+msgstr "Por defecto 'No'."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:137
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of the customer %s is not defined and current "
+"payment mode enforces all lines to have a bank account."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"La empresa %s no tiene definida ninguna cuenta bancaria y la forma de pago "
+"actual fuerza que todas las líneas tengan asignada una cuenta bancaria."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,inc_domicile:0
+msgid "Include domicile"
+msgstr "Incluir domicilio"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:98
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of %s is not defined."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"El número de C.C. del cliente %s no existe."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_pagare0
+msgid "Pagaré"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Payment date:"
+msgstr "Fecha cargo:"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:87
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account of the company %s is not defined."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"No se ha definido el C.C. de la compañía %s."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Transfer"
+msgstr "Transferencia"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,ine:0
+msgid "INE code"
+msgstr "Código INE"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 32"
+msgstr "CSB 32"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 34"
+msgstr "CSB 34"
+
+#. module: l10n_es_payment_order
+#: model:ir.model,name:l10n_es_payment_order.model_payment_mode
+msgid "Payment Mode"
+msgstr "Modo de pago"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_recibodomiciliado0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_recibodomiciliado0
+msgid "Recibo domiciliado"
+msgstr "Recibo domiciliado"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,alt_domicile_format:0
+msgid "Alternative domicile record format"
+msgstr "Formato de registro de domicilio alternativo"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Presenter data"
+msgstr "Datos del presentador"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "None"
+msgstr "Ninguno"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:101
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of %s does not have 20 digits."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"El número de C.C. de %s no tiene 20 dígitos."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_pago_certificado0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_pago_certificado0
+msgid "Pago certificado"
+msgstr "Pago certificado"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+msgid "Pension"
+msgstr "Pensión"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:55
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:80
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:110
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:140
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:167
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:195
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:221
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"The line \"%s\" is not 150 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuración:\n"
+"\n"
+"La línea \"%s\" no tiene 150 caracteres:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,partner_id:0
+#: report:remesas.report:0
+msgid "Partner"
+msgstr "Empresa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:154
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:355
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:370
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"The line \"%s\" is not 72 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuración:\n"
+"\n"
+"La línea \"%s\" no tiene 72 caracteres:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:174
+#, python-format
+msgid ""
+"Successfully Exported\n"
+"\n"
+"Summary:\n"
+" Total amount paid: %.2f\n"
+" Total Number of Payments: %d\n"
+msgstr ""
+"Exportación realizada con éxito\n"
+"\n"
+"Resumen:\n"
+" Total importe remesa: %.2f\n"
+" Total número de recibos: %d\n"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text3:0
+msgid "Line 3"
+msgstr "Línea 3"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:74
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Fixed date of charge has not been defined."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"No se ha definido una fecha fija de cargo."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,nombre:0
+msgid "Company name in file"
+msgstr "Nombre compañía para archivo"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:166
+#, python-format
+msgid "remesa"
+msgstr "remesa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:83
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Wizard can not generate export file, there are not payment lines."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"El asistente no puede generar el archivo de remesas, no existen recibos."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:80
+#, python-format
+msgid ""
+"Error:\n"
+"\n"
+"Can not convert integer number %(number)d to fit in %(size)d characters."
+msgstr ""
+"Error:\n"
+"\n"
+"No se puede convertir el número entero %(number)d para que quepa en %(size)d "
+"caracteres."
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,note:0
+msgid "Log"
+msgstr "Registro"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "PAYMENT ORDER Num.:"
+msgstr "REMESA Nº:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 58"
+msgstr "CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:107
+#, python-format
+msgid "Dear Sir"
+msgstr "Estimado Sr."
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "........."
+msgstr "........."
+
+#. module: l10n_es_payment_order
+#: model:ir.module.module,shortdesc:l10n_es_payment_order.module_meta_information
+msgid "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58"
+msgstr "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:128
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Company %s has no invoicing or default address."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"La compañía %s no tiene dirección por defecto o de facturación."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_cheque0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_cheque0
+msgid "Cheque"
+msgstr "Cheque"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:168
+#, python-format
+msgid "Remesa "
+msgstr "Remesa "
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cost_key:0
+msgid "Cost Key"
+msgstr "Clave de gastos"
+
+#. module: l10n_es_payment_order
+#: model:ir.model,name:l10n_es_payment_order.model_payment_order
+msgid "Payment Order"
+msgstr "Orden de pago"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,concept:0
+msgid "Concept of the Order"
+msgstr "Concepto de la orden."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_transferencia0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_transferencia0
+msgid "Transferencia"
+msgstr "Transferencia"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,note:l10n_es_payment_order.payment_type_pagare0
+msgid "Pagare"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 34 Options"
+msgstr "Opciones CSB 34"
+
+#. module: l10n_es_payment_order
+#: wizard_view:export_payment_file_spain,export:0
+#: wizard_view:export_payment_file_spain,init:0
+msgid "Payment order export"
+msgstr "Exportar orden de pago"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Total payment order:"
+msgstr "Total Remesa:"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,payroll_check:0
+msgid "Payroll Check"
+msgstr "Cheque nómina"
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,init,join:0
+msgid "Join payment lines of the same partner and bank account"
+msgstr "Fusionar recibos de la misma empresa y cuenta bancaria"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,alt_domicile_format:0
+msgid "Alt. domicile format"
+msgstr "Formato domicilio alt."
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,payroll_check:0
+msgid ""
+"Check it if you want to add the 018 data type in the file (the vat of the "
+"recipient is added in the 018 data type)."
+msgstr ""
+"Actívelo si desea añadir el tipo de dato 018 en el archivo (añade el CIF del "
+"receptor al tipo de dato 018)."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,direct_pay_order:0
+msgid "Direct Pay Order"
+msgstr "Orden de abono directo"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:94
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The company VAT number related to the bank account of the payment mode is "
+"not defined."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"No se ha definido el CIF de la compañía asociada al C.C. del modo de pago."
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Additional data for promissory notes, checks, and certified payments."
+msgstr "Datos adicionales para pagarés, cheques y pagos certificados."
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text1:0
+msgid "Line 1"
+msgstr "Línea 1"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text2:0
+msgid "Line 2"
+msgstr "Línea 2"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,not_to_the_order:0
+msgid "Not to the Order"
+msgstr "No a la orden"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 32 Options"
+msgstr "Opciones CSB 32"
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,pay:0
+msgid "Payment order file"
+msgstr "Archivo remesa"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Created date:"
+msgstr "Fecha confección:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,cost_key:0
+msgid "Expense of the Payer"
+msgstr "Gastos por cuenta del ordenante"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:143
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:340
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"A line in \"%s\" is not 72 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuración:\n"
+"\n"
+"Una línea del \"%s\" no tiene 72 caracteres:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 58 Options"
+msgstr "Opciones CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:54
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:86
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:110
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:123
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:138
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:165
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:53
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:71
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:100
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:111
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:231
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:247
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:264
+#, python-format
+msgid ""
+"Configuration error:\n"
+"\n"
+"The line \"%s\" is not 162 characters long:\n"
+"%s"
+msgstr ""
+"Error de configuración:\n"
+"\n"
+"La línea \"%s\" no tiene 162 caracteres:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Bank:"
+msgstr "Banco:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Promissory Note"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+#: selection:payment.mode,send_type:0
+msgid "Other"
+msgstr "Otros"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,add_date:0
+msgid ""
+"Check it if you want to add the 910 data type in the file to include the "
+"payment date."
+msgstr ""
+"Actívelo si desea añadir el tipo de dato 910 con la fecha de pago en el "
+"archivo."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Certified Payments"
+msgstr "Pagos certificados"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:109
+#, python-format
+msgid "Total:"
+msgstr "Total:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Cheques"
+msgstr "Cheques"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid ""
+"Optional Text for the Letter (adds 101, 102, 103, data tipes in the file)"
+msgstr ""
+"Texto opcional para cartas (añade los tipos de dato 101, 102, 103 en el "
+"archivo)"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+msgid "Payroll"
+msgstr "Nómina"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:90
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"The bank account number of the company %s has not 20 digits."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"El número de C.C. de la compañía %s no tiene 20 dígitos."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,tipo:0
+msgid "Type of payment file"
+msgstr "Tipo de remesa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:166
+#, python-format
+msgid ""
+"User error:\n"
+"\n"
+"Partner %s has no invoicing or default address."
+msgstr ""
+"Error del usuario:\n"
+"\n"
+"La compañía %s no tiene dirección por defecto o de facturación."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:108
+#, python-format
+msgid "Payment ref."
+msgstr "Ref. de pago"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,send_type:0
+msgid "Ordinary Mail"
+msgstr "Correo ordinario"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,text1:0
+#: help:payment.mode,text2:0
+#: help:payment.mode,text3:0
+msgid ""
+"Enter text and/or select a field of the invoice to include as a description "
+"in the letter. The possible values ​​are: ${amount}, ${communication}, "
+"{communication2}, {date}, {ml_maturity_date}, {create_date}, "
+"{ml_date_created}"
+msgstr ""
+"Introduzca un texto y/o seleccione un campo de la factura para incluirlo "
+"como descripción en la carta. Los posibles valores son: ${amount}, "
+"${communication}, {communication2}, {date}, {ml_maturity_date}, "
+"{create_date}, {ml_date_created}"
+
+#. module: l10n_es_payment_order
+#: model:ir.actions.wizard,name:l10n_es_payment_order.wizard_create_payment_file_spain
+msgid "Create payment file"
+msgstr "Crear fichero de pagos"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Amount"
+msgstr "Importe"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Company:"
+msgstr "Compañía:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,send_type:0
+msgid "Certified Mail"
+msgstr "Correo certificado"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Type:"
+msgstr "Tipo:"

=== added file 'l10n_es_payment_order/i18n/l10n_es_remesas.pot'
--- l10n_es_payment_order/i18n/l10n_es_remesas.pot	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/i18n/l10n_es_remesas.pot	2011-11-28 16:53:26 +0000
@@ -0,0 +1,720 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* l10n_es_payment_order
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.1\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-05-24 11:11+0000\n"
+"PO-Revision-Date: 2011-05-24 11:11+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: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Matur. date"
+msgstr "Matur. date"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 19"
+msgstr "CSB 19"
+
+#. module: l10n_es_payment_order
+#: model:ir.module.module,description:l10n_es_payment_order.module_meta_information
+msgid "Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria.\n"
+"\n"
+"Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este código es importante pues permite ejecutar el asistente de creación del fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la orden de pagos o remesa.\n"
+"\n"
+"También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), \"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" (PAGO_CERTIFICADO_CSB).\n"
+"\n"
+"Antes de generar un fichero bancario CSB habrá que definir un modo de pago que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y nombre de compañia a incluir en el fichero.\n"
+"\n"
+"Al crear el fichero bancario CSB:\n"
+"\n"
+"  * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n"
+"  * El fichero creado se guarda como adjunto de la orden de pagos. Se puede volver a crear el fichero de remesas siempre que sea necesario (puede tener que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n"
+"\n"
+"También se proporciona un informe para imprimir un listado de los pagos/cobros de la orden de pago/cobro (remesa).\n"
+""
+msgstr "Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria.\n"
+"\n"
+"Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este código es importante pues permite ejecutar el asistente de creación del fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la orden de pagos o remesa.\n"
+"\n"
+"También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), \"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" (PAGO_CERTIFICADO_CSB).\n"
+"\n"
+"Antes de generar un fichero bancario CSB habrá que definir un modo de pago que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y nombre de compañia a incluir en el fichero.\n"
+"\n"
+"Al crear el fichero bancario CSB:\n"
+"\n"
+"  * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n"
+"  * El fichero creado se guarda como adjunto de la orden de pagos. Se puede volver a crear el fichero de remesas siempre que sea necesario (puede tener que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n"
+"\n"
+"También se proporciona un informe para imprimir un listado de los pagos/cobros de la orden de pago/cobro (remesa).\n"
+""
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,send_type:0
+msgid "The sending type of the payment file"
+msgstr "The sending type of the payment file"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,add_date:0
+msgid "Add Date"
+msgstr "Add Date"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Additional data for CSB 34 type of payment file."
+msgstr "Additional data for CSB 34 type of payment file."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cif:0
+msgid "VAT code"
+msgstr "VAT code"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:71
+#, python-format
+msgid "Error:\n"
+"\n"
+"Can not convert float number %(number).2f to fit in %(size)d characters."
+msgstr "Error:\n"
+"\n"
+"Can not convert float number %(number).2f to fit in %(size)d characters."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,sufijo:0
+msgid "suffix"
+msgstr "suffix"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,csb34_type:0
+msgid "Type of CSB 34 payment"
+msgstr "Type of CSB 34 payment"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,inc_domicile:0
+msgid "Add partner domicile records to the exported file (CSB 58)"
+msgstr "Add partner domicile records to the exported file (CSB 58)"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cedente:0
+msgid "Cedente"
+msgstr "Cedente"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:151
+#, python-format
+msgid "User error:\n"
+"\n"
+"The payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58"
+msgstr "User error:\n"
+"\n"
+"The payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Account:"
+msgstr "Account:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,cost_key:0
+msgid "Expense of the Recipient"
+msgstr "Expense of the Recipient"
+
+#. module: l10n_es_payment_order
+#: wizard_button:export_payment_file_spain,export,end:0
+#: wizard_button:export_payment_file_spain,init,export:0
+msgid "Ok"
+msgstr "Ok"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:140
+#, python-format
+msgid "User error:\n"
+"\n"
+"The bank account number of the customer %s has not 20 digits."
+msgstr "User error:\n"
+"\n"
+"The bank account number of the customer %s has not 20 digits."
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,pay_fname:0
+msgid "File name"
+msgstr "File name"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,concept:0
+msgid "Concept of the Order."
+msgstr "Concept of the Order."
+
+#. module: l10n_es_payment_order
+#: model:ir.actions.report.xml,name:l10n_es_payment_order.remesas_report
+msgid "Remesa"
+msgstr "Remesa"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,barred:0
+msgid "Barred"
+msgstr "Barred"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,send_type:0
+msgid "Send Type"
+msgstr "Send Type"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,direct_pay_order:0
+msgid "By default 'Not'."
+msgstr "By default 'Not'."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:137
+#, python-format
+msgid "User error:\n"
+"\n"
+"The bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account."
+msgstr "User error:\n"
+"\n"
+"The bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,inc_domicile:0
+msgid "Include domicile"
+msgstr "Include domicile"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:98
+#, python-format
+msgid "User error:\n"
+"\n"
+"The bank account number of %s is not defined."
+msgstr "User error:\n"
+"\n"
+"The bank account number of %s is not defined."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_pagare0
+msgid "Pagaré"
+msgstr "Pagaré"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Payment date:"
+msgstr "Payment date:"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:87
+#, python-format
+msgid "User error:\n"
+"\n"
+"The bank account of the company %s is not defined."
+msgstr "User error:\n"
+"\n"
+"The bank account of the company %s is not defined."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Transfer"
+msgstr "Transfer"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,ine:0
+msgid "INE code"
+msgstr "INE code"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 32"
+msgstr "CSB 32"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 34"
+msgstr "CSB 34"
+
+#. module: l10n_es_payment_order
+#: model:ir.model,name:l10n_es_payment_order.model_payment_mode
+msgid "Payment Mode"
+msgstr "Payment Mode"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_recibodomiciliado0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_recibodomiciliado0
+msgid "Recibo domiciliado"
+msgstr "Recibo domiciliado"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,alt_domicile_format:0
+msgid "Alternative domicile record format"
+msgstr "Alternative domicile record format"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Presenter data"
+msgstr "Presenter data"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "None"
+msgstr "None"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:101
+#, python-format
+msgid "User error:\n"
+"\n"
+"The bank account number of %s does not have 20 digits."
+msgstr "User error:\n"
+"\n"
+"The bank account number of %s does not have 20 digits."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_pago_certificado0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_pago_certificado0
+msgid "Pago certificado"
+msgstr "Pago certificado"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+msgid "Pension"
+msgstr "Pension"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:55
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:80
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:110
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:140
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:167
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:195
+#: code:addons/l10n_es_payment_order/wizard/csb_32.py:221
+#, python-format
+msgid "Configuration error:\n"
+"\n"
+"The line \"%s\" is not 150 characters long:\n"
+"%s"
+msgstr "Configuration error:\n"
+"\n"
+"The line \"%s\" is not 150 characters long:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,partner_id:0
+#: report:remesas.report:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:154
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:355
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:370
+#, python-format
+msgid "Configuration error:\n"
+"\n"
+"The line \"%s\" is not 72 characters long:\n"
+"%s"
+msgstr "Configuration error:\n"
+"\n"
+"The line \"%s\" is not 72 characters long:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:174
+#, python-format
+msgid "Successfully Exported\n"
+"\n"
+"Summary:\n"
+" Total amount paid: %.2f\n"
+" Total Number of Payments: %d\n"
+""
+msgstr "Successfully Exported\n"
+"\n"
+"Summary:\n"
+" Total amount paid: %.2f\n"
+" Total Number of Payments: %d\n"
+""
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text3:0
+msgid "Line 3"
+msgstr "Line 3"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:74
+#, python-format
+msgid "User error:\n"
+"\n"
+"Fixed date of charge has not been defined."
+msgstr "User error:\n"
+"\n"
+"Fixed date of charge has not been defined."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,nombre:0
+msgid "Company name in file"
+msgstr "Company name in file"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:166
+#, python-format
+msgid "remesa"
+msgstr "remesa"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:83
+#, python-format
+msgid "User error:\n"
+"\n"
+"Wizard can not generate export file, there are not payment lines."
+msgstr "User error:\n"
+"\n"
+"Wizard can not generate export file, there are not payment lines."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/converter.py:80
+#, python-format
+msgid "Error:\n"
+"\n"
+"Can not convert integer number %(number)d to fit in %(size)d characters."
+msgstr "Error:\n"
+"\n"
+"Can not convert integer number %(number)d to fit in %(size)d characters."
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,note:0
+msgid "Log"
+msgstr "Log"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "PAYMENT ORDER Num.:"
+msgstr "PAYMENT ORDER Num.:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,tipo:0
+msgid "CSB 58"
+msgstr "CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:107
+#, python-format
+msgid "Dear Sir"
+msgstr "Dear Sir"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "........."
+msgstr "........."
+
+#. module: l10n_es_payment_order
+#: model:ir.module.module,shortdesc:l10n_es_payment_order.module_meta_information
+msgid "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58"
+msgstr "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:128
+#, python-format
+msgid "User error:\n"
+"\n"
+"Company %s has no invoicing or default address."
+msgstr "User error:\n"
+"\n"
+"Company %s has no invoicing or default address."
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_cheque0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_cheque0
+msgid "Cheque"
+msgstr "Cheque"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:168
+#, python-format
+msgid "Remesa "
+msgstr "Remesa "
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,cost_key:0
+msgid "Cost Key"
+msgstr "Cost Key"
+
+#. module: l10n_es_payment_order
+#: model:ir.model,name:l10n_es_payment_order.model_payment_order
+msgid "Payment Order"
+msgstr "Payment Order"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,concept:0
+msgid "Concept of the Order"
+msgstr "Concept of the Order"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,name:l10n_es_payment_order.payment_type_transferencia0
+#: model:payment.type,note:l10n_es_payment_order.payment_type_transferencia0
+msgid "Transferencia"
+msgstr "Transferencia"
+
+#. module: l10n_es_payment_order
+#: model:payment.type,note:l10n_es_payment_order.payment_type_pagare0
+msgid "Pagare"
+msgstr "Pagare"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 34 Options"
+msgstr "CSB 34 Options"
+
+#. module: l10n_es_payment_order
+#: wizard_view:export_payment_file_spain,export:0
+#: wizard_view:export_payment_file_spain,init:0
+msgid "Payment order export"
+msgstr "Payment order export"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Total payment order:"
+msgstr "Total payment order:"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,payroll_check:0
+msgid "Payroll Check"
+msgstr "Payroll Check"
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,init,join:0
+msgid "Join payment lines of the same partner and bank account"
+msgstr "Join payment lines of the same partner and bank account"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,alt_domicile_format:0
+msgid "Alt. domicile format"
+msgstr "Alt. domicile format"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,payroll_check:0
+msgid "Check it if you want to add the 018 data type in the file (the vat of the recipient is added in the 018 data type)."
+msgstr "Check it if you want to add the 018 data type in the file (the vat of the recipient is added in the 018 data type)."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,direct_pay_order:0
+msgid "Direct Pay Order"
+msgstr "Direct Pay Order"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:94
+#, python-format
+msgid "User error:\n"
+"\n"
+"The company VAT number related to the bank account of the payment mode is not defined."
+msgstr "User error:\n"
+"\n"
+"The company VAT number related to the bank account of the payment mode is not defined."
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Additional data for promissory notes, checks, and certified payments."
+msgstr "Additional data for promissory notes, checks, and certified payments."
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Invoice"
+msgstr "Invoice"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text1:0
+msgid "Line 1"
+msgstr "Line 1"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,text2:0
+msgid "Line 2"
+msgstr "Line 2"
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,not_to_the_order:0
+msgid "Not to the Order"
+msgstr "Not to the Order"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 32 Options"
+msgstr "CSB 32 Options"
+
+#. module: l10n_es_payment_order
+#: wizard_field:export_payment_file_spain,export,pay:0
+msgid "Payment order file"
+msgstr "Payment order file"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Created date:"
+msgstr "Created date:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,cost_key:0
+msgid "Expense of the Payer"
+msgstr "Expense of the Payer"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:143
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:340
+#, python-format
+msgid "Configuration error:\n"
+"\n"
+"A line in \"%s\" is not 72 characters long:\n"
+"%s"
+msgstr "Configuration error:\n"
+"\n"
+"A line in \"%s\" is not 72 characters long:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "CSB 58 Options"
+msgstr "CSB 58 Options"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:54
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:86
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:110
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:123
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:138
+#: code:addons/l10n_es_payment_order/wizard/csb_19.py:165
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:53
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:71
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:100
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:111
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:231
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:247
+#: code:addons/l10n_es_payment_order/wizard/csb_58.py:264
+#, python-format
+msgid "Configuration error:\n"
+"\n"
+"The line \"%s\" is not 162 characters long:\n"
+"%s"
+msgstr "Configuration error:\n"
+"\n"
+"The line \"%s\" is not 162 characters long:\n"
+"%s"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Bank:"
+msgstr "Bank:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Promissory Note"
+msgstr "Promissory Note"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+#: selection:payment.mode,send_type:0
+msgid "Other"
+msgstr "Other"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,add_date:0
+msgid "Check it if you want to add the 910 data type in the file to include the payment date."
+msgstr "Check it if you want to add the 910 data type in the file to include the payment date."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Certified Payments"
+msgstr "Certified Payments"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:109
+#, python-format
+msgid "Total:"
+msgstr "Total:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,csb34_type:0
+msgid "Cheques"
+msgstr "Cheques"
+
+#. module: l10n_es_payment_order
+#: view:payment.mode:0
+msgid "Optional Text for the Letter (adds 101, 102, 103, data tipes in the file)"
+msgstr "Optional Text for the Letter (adds 101, 102, 103, data tipes in the file)"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,concept:0
+msgid "Payroll"
+msgstr "Payroll"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/export_remesas.py:90
+#, python-format
+msgid "User error:\n"
+"\n"
+"The bank account number of the company %s has not 20 digits."
+msgstr "User error:\n"
+"\n"
+"The bank account number of the company %s has not 20 digits."
+
+#. module: l10n_es_payment_order
+#: field:payment.mode,tipo:0
+msgid "Type of payment file"
+msgstr "Type of payment file"
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/wizard/csb_34.py:166
+#, python-format
+msgid "User error:\n"
+"\n"
+"Partner %s has no invoicing or default address."
+msgstr "User error:\n"
+"\n"
+"Partner %s has no invoicing or default address."
+
+#. module: l10n_es_payment_order
+#: code:addons/l10n_es_payment_order/remesas.py:108
+#, python-format
+msgid "Payment ref."
+msgstr "Payment ref."
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,send_type:0
+msgid "Ordinary Mail"
+msgstr "Ordinary Mail"
+
+#. module: l10n_es_payment_order
+#: help:payment.mode,text1:0
+#: help:payment.mode,text2:0
+#: help:payment.mode,text3:0
+msgid "Enter text and/or select a field of the invoice to include as a description in the letter. The possible values ​​are: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}"
+msgstr "Enter text and/or select a field of the invoice to include as a description in the letter. The possible values ​​are: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}"
+
+#. module: l10n_es_payment_order
+#: model:ir.actions.wizard,name:l10n_es_payment_order.wizard_create_payment_file_spain
+msgid "Create payment file"
+msgstr "Create payment file"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Amount"
+msgstr "Amount"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Company:"
+msgstr "Company:"
+
+#. module: l10n_es_payment_order
+#: selection:payment.mode,send_type:0
+msgid "Certified Mail"
+msgstr "Certified Mail"
+
+#. module: l10n_es_payment_order
+#: report:remesas.report:0
+msgid "Type:"
+msgstr "Type:"
+

=== added file 'l10n_es_payment_order/remesas.py'
--- l10n_es_payment_order/remesas.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/remesas.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,120 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#
+# Copyright (c) 2006 ACYSOS S.L.. (http://acysos.com) All Rights Reserved.
+#    Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#
+# Corregido para instalación TinyERP estándar 4.2.0: Zikzakmedia S.L. 2008
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Añadidas cuentas de remesas y tipos de pago. 2008
+#    Pablo Rocandio <salbet@xxxxxxxxx>
+#
+# Corregido para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Adaptación para instalación OpenERP 6.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2010
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv, fields
+import pooler
+from tools.translate import _
+
+
+
+class payment_mode(osv.osv):
+    _name= 'payment.mode'
+    _inherit = 'payment.mode'
+
+    def onchange_partner(self, cr, uid, ids, partner_id):
+        if partner_id:
+            pool = pooler.get_pool(cr.dbname)
+            obj = pool.get('res.partner')
+            field = ['name']
+            ids = [partner_id]
+            filas = obj.read(cr, uid, ids, field) 
+            return {'value':{'nombre': filas[0]["name"][:40]}}
+        return {'value':{'nombre': ""}}
+
+    _columns = {
+        'tipo': fields.selection([('none','None'),('csb_19','CSB 19'),('csb_32','CSB 32'),('csb_34','CSB 34'),('csb_58','CSB 58')], 'Type of payment file', size=6, select=True, required=True),
+        'sufijo': fields.char('suffix',size=3, select=True),
+        'partner_id': fields.many2one('res.partner', 'Partner', select=True),
+        'nombre': fields.char('Company name in file', size=40),
+        'cif': fields.related('partner_id','vat', type='char', string='VAT code', select=True),
+        # Código INE (9 dígitos)
+        'ine': fields.char('INE code',size=9),
+        'cedente': fields.char('Cedente', size=15),
+        # Incluir registro obligatorio de domicilio (para no domiciliados)
+        'inc_domicile': fields.boolean('Include domicile', help='Add partner domicile records to the exported file (CSB 58)'),
+        # Usar formato alternativo para el registro de domicilio
+        'alt_domicile_format': fields.boolean('Alt. domicile format', help='Alternative domicile record format'),
+        # Require bank account?
+        'require_bank_account': fields.boolean('Require bank account', help='If your bank allows you to send orders without the bank account info, you may disable this option'),
+        'csb34_type': fields.selection([('transfer', 'Transfer'),('promissory_note', 'Promissory Note'),('cheques', 'Cheques'),('certified_payments', 'Certified Payments')], 'Type of CSB 34 payment'),
+        'text1': fields.char('Line 1', size=36, help='Enter text and/or select a field of the invoice to include as a description in the letter. The possible values ​​are: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}'),
+        'text2': fields.char('Line 2', size=36, help='Enter text and/or select a field of the invoice to include as a description in the letter. The possible values ​​are: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}'),
+        'text3': fields.char('Line 3', size=36, help='Enter text and/or select a field of the invoice to include as a description in the letter. The possible values ​​are: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}'),
+        'payroll_check': fields.boolean('Payroll Check', help='Check it if you want to add the 018 data type in the file (the vat of the recipient is added in the 018 data type).'),
+        'add_date': fields.boolean('Add Date', help='Check it if you want to add the 910 data type in the file to include the payment date.'),
+        'send_type':fields.selection([
+            ('mail','Ordinary Mail'),
+            ('certified_mail','Certified Mail'),
+            ('other','Other'),
+        ],'Send Type', help="The sending type of the payment file"),
+        'not_to_the_order':fields.boolean('Not to the Order'),
+        'barred':fields.boolean('Barred'),
+        'cost_key':fields.selection([
+            ('payer','Expense of the Payer'),
+            ('recipient','Expense of the Recipient'),
+        ],'Cost Key'),
+        'concept':fields.selection([
+            ('payroll','Payroll'),
+            ('pension','Pension'),
+            ('other','Other'),
+        ],'Concept of the Order', help="Concept of the Order."),
+        'direct_pay_order':fields.boolean('Direct Pay Order', help="By default 'Not'."),
+    }
+
+    _defaults = {
+        'tipo': lambda *a: 'none',
+        'sufijo': lambda *a: '000',
+        'inc_domicile': lambda *a: False,
+        'alt_domicile_format': lambda *a: False,
+
+        # Override default: We want to be safe so we require bank account by default
+        'require_bank_account': lambda *a: True, 
+        'csb34_type': lambda *a: 'transfer',
+        'text1': lambda self,cr,uid,context: _('Dear Sir'),
+        'text2': lambda self,cr,uid,context: _('Payment ref.')+' ${communication}',
+        'text3': lambda self,cr,uid,context: _('Total:')+' ${amount}',
+        'send_type': lambda *a: 'mail',
+        'not_to_the_order': lambda *a: True,
+        'barred': lambda *a: True,
+        'cost_key': lambda *a: 'payer',
+        'concept': lambda *a: 'other',
+        'direct_pay_order': lambda *a: False,
+    }
+
+payment_mode()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'l10n_es_payment_order/remesas_data.xml'
--- l10n_es_payment_order/remesas_data.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/remesas_data.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+		<record id="payment_type_recibodomiciliado0" model="payment.type">
+			<field eval="&quot;&quot;&quot;RECIBO_CSB&quot;&quot;&quot;" name="code"/>
+			<field eval="&quot;&quot;&quot;Recibo domiciliado&quot;&quot;&quot;" name="name"/>
+			<field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/>
+			<field eval="&quot;&quot;&quot;Recibo domiciliado&quot;&quot;&quot;" name="note"/>
+			<field eval="1" name="active"/>
+		</record>
+		<record id="payment_type_transferencia0" model="payment.type">
+			<field name="code">TRANSFERENCIA_CSB</field>
+			<field name="name">Transferencia</field>
+			<field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/>
+			<field name="note">Transferencia</field>
+			<field eval="1" name="active"/>
+		</record>
+		<record id="payment_type_cheque0" model="payment.type">
+			<field name="code">CHEQUE_CSB</field>
+			<field name="name">Cheque</field>
+			<field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/>
+			<field name="note">Cheque</field>
+			<field eval="1" name="active"/>
+		</record>
+		<record id="payment_type_pagare0" model="payment.type">
+			<field name="code">PAGARE_CSB</field>
+			<field name="name">Pagaré</field>
+			<field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/>
+			<field name="note">Pagare</field>
+			<field eval="1" name="active"/>
+		</record>
+		<record id="payment_type_pago_certificado0" model="payment.type">
+			<field name="code">PAGO_CERTIFICADO_CSB</field>
+			<field name="name">Pago certificado</field>
+			<field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/>
+			<field name="note">Pago certificado</field>
+			<field eval="1" name="active"/>
+		</record>
+	</data>
+</openerp>

=== added file 'l10n_es_payment_order/remesas_report.xml'
--- l10n_es_payment_order/remesas_report.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/remesas_report.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <report
+            id="remesas_report"
+            string="Remesa"
+            model="payment.order"
+            name="remesas.report"
+            rml="l10n_es_payment_order/report/remesas_report.rml"
+            auto="False"/>
+    </data>
+</openerp>

=== added file 'l10n_es_payment_order/remesas_view.xml'
--- l10n_es_payment_order/remesas_view.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/remesas_view.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <record id="view_payment_mode_tree_remesas" model="ir.ui.view">
+            <field name="name">payment.mode.tree</field>
+            <field name="model">payment.mode</field>
+            <field name="type">tree</field>
+            <field name="inherit_id" ref="account_payment.view_payment_mode_tree"/>
+            <field name="arch" type="xml">
+                <field name="journal" position="after">
+                    <field name="tipo"/>
+                    <field name="sufijo"/>
+                    <field name="partner_id"/>
+                    <field name="bank_id"/>
+                </field>
+            </field>
+        </record>
+        <record id="view_payment_mode_form_remesas" model="ir.ui.view">
+            <field name="name">payment.mode.form</field>
+            <field name="model">payment.mode</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="account_payment.view_payment_mode_form"/>
+            <field name="arch" type="xml">
+                <field name="bank_id" position="replace"/>
+                <field name="company_id" position="after">
+                    <field name="tipo"/>
+                    <newline/>
+                    <separator string="Presenter data" colspan="4"/>
+                    <field name="partner_id" attrs="{'required':[('tipo','!=','none')]}" on_change="onchange_partner(partner_id)"/>
+                    <field name="bank_id" domain="[('partner_id','=',partner_id)]"/>
+                    <field name="cif"/>
+                    <field name="nombre" attrs="{'required':[('tipo','!=','none')]}"/>
+                    <field name="sufijo" attrs="{'required':[('tipo','!=','none')]}"/>
+                    <field name="ine"/>
+                    <newline/>
+                    <group colspan="4" attrs="{'invisible': [('tipo', '=', 'none')]}">
+                        <group colspan="2" col="2" attrs="{'invisible': [('tipo', '!=', 'csb_58')]}">
+                            <separator string="CSB 58 Options" colspan="2"/>
+                            <field name="inc_domicile"/>
+                            <field name="alt_domicile_format"/>
+                        </group>
+                        <group colspan="2" col="2" attrs="{'invisible': [('tipo', '!=', 'csb_32')]}">
+                            <separator string="CSB 32 Options" colspan="2"/>
+                            <field name="cedente"/>
+                        </group>
+                        <group colspan="2" col="4" attrs="{'invisible': [('tipo', '!=', 'csb_34')]}">
+                            <separator string="CSB 34 Options" colspan="4"/>
+                            <field name="csb34_type" colspan="1"/>
+                            <group colspan="4" col="6">
+                                <separator string="Additional data for CSB 34 type of payment file." colspan="6"/>
+                                <field name="cost_key"/>
+                                <field name="concept"/>
+                                <field name="direct_pay_order"/>
+                            </group>
+                            <group  colspan="4" col="6" attrs="{'invisible': [('csb34_type', '=', 'transfer')]}">
+                                <separator string="Additional data for promissory notes, checks, and certified payments." colspan="6"/>
+                                <field name="send_type" attrs="{'required':[('csb34_type','!=','transfer')]}"/>
+                                <field name="not_to_the_order"/>
+                                <field name="barred"/>
+                                <group colspan="4" col="4" attrs="{'invisible': [('send_type', '=', 'other')]}">
+                                    <separator string="Optional Text for the Letter (adds 101, 102, 103, data tipes in the file)" colspan="4"/>
+                                    <field name="text1" colspan="4"/>
+                                    <field name="text2" colspan="4"/>
+                                    <field name="text3" colspan="4"/>
+                                    <field name="payroll_check"/>
+                                    <field name="add_date"/>
+                                </group>
+                            </group>
+                        </group>
+                    </group>
+                    <newline/>
+                </field>
+            </field>
+        </record>
+
+    </data>
+</openerp>

=== added file 'l10n_es_payment_order/remesas_wizard.xml'
--- l10n_es_payment_order/remesas_wizard.xml	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/remesas_wizard.xml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+
+		<wizard
+			string="Create payment file"
+			model="payment.order"
+			name="export_payment_file_spain"
+			id="wizard_create_payment_file_spain"/>
+	</data>
+</openerp>

=== added directory 'l10n_es_payment_order/report'
=== added file 'l10n_es_payment_order/report/__init__.py'
--- l10n_es_payment_order/report/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/report/__init__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import remesas_report

=== added file 'l10n_es_payment_order/report/remesas_report.py'
--- l10n_es_payment_order/report/remesas_report.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/report/remesas_report.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from report import report_sxw
+
+class remesas_report(report_sxw.rml_parse):
+
+    def __init__(self, cr, uid, name, context):
+        super(remesas_report, self).__init__(cr, uid, name, context)
+        self.localcontext.update({
+            'time': time,
+        })
+
+
+report_sxw.report_sxw('report.remesas.report', 'payment.order',
+        'addons/l10n_es_payment_order/report/remesas_report.rml',
+        parser=remesas_report)

=== added file 'l10n_es_payment_order/report/remesas_report.rml'
--- l10n_es_payment_order/report/remesas_report.rml	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/report/remesas_report.rml	2011-11-28 16:53:26 +0000
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+  <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+    <pageTemplate id="first">
+      <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
+    </pageTemplate>
+  </template>
+  <stylesheet>
+    <blockTableStyle id="Standard_Outline">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <blockTableStyle id="Taula2">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <blockTableStyle id="Taula3">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <blockBackground colorName="#cccccc" start="0,0" stop="0,-1"/>
+      <blockBackground colorName="#cccccc" start="1,0" stop="1,-1"/>
+      <blockBackground colorName="#cccccc" start="2,0" stop="2,-1"/>
+      <blockBackground colorName="#cccccc" start="3,0" stop="3,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Taula1">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <initialize>
+      <paraStyle name="all" alignment="justify"/>
+    </initialize>
+    <paraStyle name="P1" fontName="Helvetica"/>
+    <paraStyle name="P2" fontName="Helvetica"/>
+    <paraStyle name="P3" fontName="Helvetica" alignment="CENTER"/>
+    <paraStyle name="P4" fontName="Helvetica" alignment="LEFT"/>
+    <paraStyle name="P5" fontName="Helvetica" fontSize="6.0" leading="8"/>
+    <paraStyle name="P6" fontName="Helvetica" fontSize="6.0" leading="8"/>
+    <paraStyle name="P7" fontName="Helvetica-Bold" alignment="LEFT"/>
+    <paraStyle name="P8" fontName="Helvetica" alignment="CENTER"/>
+    <paraStyle name="P9" fontName="Helvetica"/>
+    <paraStyle name="P10" fontName="Helvetica"/>
+    <paraStyle name="Standard" fontName="Helvetica"/>
+    <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+    <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="1.0"/>
+    <paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="Index" fontName="Times-Roman"/>
+    <paraStyle name="Table Contents" fontName="Helvetica"/>
+    <paraStyle name="Table Heading" fontName="Helvetica-BoldOblique" alignment="CENTER"/>
+    <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+  </stylesheet>
+  <images/>
+  <story>
+    <para style="Standard">
+      <font color="white"> </font>
+    </para>
+    <para style="Standard">[[repeatIn(objects, 'o')]]</para>
+    <blockTable colWidths="270.0,212.0" style="Taula2">
+      <tr>
+        <td>
+          <para style="P1">Company: [[o.mode.partner_id.name]]</para>
+          <para style="P1">Bank: [[o.mode.bank_id.bank.name]]</para>
+          <para style="P1">Account: [[o.mode.bank_id.acc_number]]</para>
+          <para style="P1">Created date: [[time.strftime('%d-%m-%Y', time.strptime(o.date_created, '%Y-%m-%d'))]]</para>
+          <para style="P1">Payment date: [[o.date_planned and time.strftime('%d-%m-%Y', time.strptime(o.date_planned, '%Y-%m-%d')) or '']]</para>
+        </td>
+        <td>
+          <para style="P2">PAYMENT ORDER Num.: [[o.reference]]</para>
+          <para style="P2">
+            <font color="white"> </font>
+          </para>
+          <para style="P2">Type: [[o.mode.tipo]]</para>
+          <para style="P2">
+            <font color="white"> </font>
+          </para>
+          <para style="P2">Total payment order: [[o.total]]</para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="P2">
+      <font color="white"> </font>
+    </para>
+    <para style="P7"><font color="white"> .........</font>PAYMENT LINES</para>
+    <para style="P4">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="176.0,153.0,71.0,83.0" repeatRows="1" style="Taula3">
+      <tr>
+        <td>
+          <para style="Table Heading">Partner</para>
+        </td>
+        <td>
+          <para style="Table Heading">Invoice</para>
+        </td>
+        <td>
+          <para style="Table Heading">Amount</para>
+        </td>
+        <td>
+          <para style="Table Heading">Matur. date</para>
+        </td>
+      </tr>
+    </blockTable>
+    <section>
+      <para style="P5">[[o.line_ids.sort(lambda x, y: cmp(x.name, y.name))]][[repeatIn(o.line_ids,'r')]]</para>
+      <blockTable colWidths="175.0,153.0,71.0,83.0" repeatRows="1" style="Taula1">
+        <tr>
+          <td>
+            <para style="P3">[[r.partner_id.name]]</para>
+          </td>
+          <td>
+            <para style="P8">[[r.communication]]</para>
+          </td>
+          <td>
+            <para style="P8">[[r.amount]]</para>
+          </td>
+          <td>
+            <para style="P8">[[r.ml_maturity_date and time.strftime('%d-%m-%Y', time.strptime(r.ml_maturity_date, '%Y-%m-%d')) or '']]</para>
+          </td>
+        </tr>
+      </blockTable>
+    </section>
+    <para style="P6">
+      <font color="white"> </font>
+    </para>
+  </story>
+</document>
+

=== added file 'l10n_es_payment_order/report/remesas_report.sxw'
Binary files l10n_es_payment_order/report/remesas_report.sxw	1970-01-01 00:00:00 +0000 and l10n_es_payment_order/report/remesas_report.sxw	2011-11-28 16:53:26 +0000 differ
=== added directory 'l10n_es_payment_order/wizard'
=== added file 'l10n_es_payment_order/wizard/__init__.py'
--- l10n_es_payment_order/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/__init__.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import export_remesas

=== added file 'l10n_es_payment_order/wizard/converter.py'
--- l10n_es_payment_order/wizard/converter.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/converter.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,106 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    Copyright (c) 2009 NaN (http://www.nan-tic.com) All Rights Reserved.
+#                       Albert Cervera i Areny <albert@xxxxxxxxxxx>
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from tools.translate import _
+
+def digits_only(cc_in):
+    """Discards non-numeric chars"""
+
+    cc = ""
+    for i in cc_in or '':
+        try:
+            int(i)
+            cc += i
+        except ValueError:
+            pass
+    return cc
+
+def to_ascii(text):
+    """Converts special characters such as those with accents to their ASCII equivalents"""
+    old_chars = ['á','é','í','ó','ú','à','è','ì','ò','ù','ä','ë','ï','ö','ü','â','ê','î','ô','û','Á','É','Í','Ú','Ó','À','È','Ì','Ò','Ù','Ä','Ë','Ï','Ö','Ü','Â','Ê','Î','Ô','Û','ñ','Ñ','ç','Ç','ª','º']
+    new_chars = ['a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','A','E','I','O','U','A','E','I','O','U','A','E','I','O','U','A','E','I','O','U','n','N','c','C','a','o']
+    for old, new in zip(old_chars, new_chars):
+        if text:
+            text = text.replace(unicode(old,'UTF-8'), new)
+    return text
+
+
+class Log(Exception):
+    def __init__(self, content = '', error = False):
+        self.content = content
+        self.error = error
+    def add(self, s, error=True):
+        self.content = self.content + s
+        if error:
+            self.error = error
+    def __call__(self):
+        return self.content
+    def __str__(self):
+        return self.content
+
+def convert_text(text, size):
+    return to_ascii(text)[:size].ljust(size)
+
+def convert_float(cr, number, size, context):
+    text = str( int( round( number * 100, 0 ) ) )
+    if len(text) > size:
+        raise Log(_('Error:\n\nCan not convert float number %(number).2f to fit in %(size)d characters.') % {
+            'number': number, 
+            'size': size
+        })
+    return text.zfill(size)
+
+def convert_int(cr, number, size, context):
+    text = str( number )
+    if len(text) > size:
+        raise Log( _('Error:\n\nCan not convert integer number %(number)d to fit in %(size)d characters.') % {
+            'number': number, 
+            'size': size
+        })
+    return text.zfill(size)
+
+def convert(cr, value, size, context):
+    if value == False:
+        return convert_text('', size)
+    elif isinstance(value, float):
+        return convert_float(cr, value, size, context)
+    elif isinstance(value, int):
+        return convert_int(cr, value, size, context)
+    else:
+        return convert_text(value, size)
+
+def convert_bank_account(cr, value, partner_name, context):
+    if not isinstance(value, basestring):
+        raise Log( _('User error:\n\nThe bank account number of %s is not defined.') % partner_name )
+    ccc = digits_only(value)
+    if len(ccc) != 20:
+        raise Log( _('User error:\n\nThe bank account number of %s does not have 20 digits.') % partner_name )
+    return ccc
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+

=== added file 'l10n_es_payment_order/wizard/csb_19.py'
--- l10n_es_payment_order/wizard/csb_19.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/csb_19.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,338 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+# Corregido para instalación TinyERP estándar 4.2.0: Zikzakmedia S.L. 2008
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Añadidas cuentas de remesas y tipos de pago. 2008
+#    Pablo Rocandio <salbet@xxxxxxxxx>
+#
+# Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from datetime import datetime
+from tools.translate import _
+from converter import *
+
+
+class csb_19:
+    def _cabecera_presentador_19(self):
+        texto = '5180'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += datetime.today().strftime('%d%m%y')
+        texto += 6*' '
+        texto += to_ascii(self.order.mode.nombre).ljust(40)
+        texto += 20*' '
+        cc = digits_only(self.order.mode.bank_id.acc_number)
+        texto += cc[0:8]
+        texto += 66*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera presentador 19', texto), True)
+        return texto
+
+    def _cabecera_ordenante_19(self, recibo=None):
+        texto = '5380'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += datetime.today().strftime('%d%m%y')
+
+        if self.order.date_prefered == 'due':
+            assert recibo
+            if recibo.get('date'):
+                date_cargo = datetime.strptime(recibo['date'],'%Y-%m-%d')
+            elif recibo.get('ml_maturity_date'):
+                date_cargo = datetime.strptime(recibo['ml_maturity_date'],'%Y-%m-%d')
+            else:
+                date_cargo = datetime.today()
+        elif self.order.date_prefered == 'now':
+            date_cargo = datetime.today()
+        else: # self.order.date_prefered == 'fixed'
+            if not self.order.date_scheduled:
+                raise Log(_('User error:\n\nFixed date of charge has not been defined.'), True)
+            date_cargo = datetime.strptime(self.order.date_scheduled,'%Y-%m-%d')
+
+        texto += date_cargo.strftime('%d%m%y')
+        texto += to_ascii(self.order.mode.nombre).ljust(40)
+        cc = digits_only(self.order.mode.bank_id.acc_number)
+        texto += cc[0:20]
+        texto += 8*' '
+        texto += '01'
+        texto += 64*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera ordenante 19', texto), True)
+        return texto
+
+    def _individual_obligatorio_19(self, recibo, join):
+        texto = '5680'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        if join:
+            texto += str(recibo['name'])[-12:].zfill(12)
+        else:
+            texto += str(recibo['name'])[-12:].zfill(12)
+#            texto += str(recibo['partner_id'].id)[-12:].zfill(12)
+        nombre = to_ascii(recibo['partner_id'].name)
+        texto += nombre[0:40].ljust(40)
+        ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or ''
+        ccc = digits_only(ccc)
+        texto += str(ccc)[0:20].zfill(20)
+        importe = int(round(abs(recibo['amount'])*100,0))
+        texto += str(importe).zfill(10)
+        if join:
+            #texto += 16*' '
+            texto += str(recibo['invoice'].id)[-6:].zfill(6)
+            texto += str(recibo['id'])[-10:].zfill(10)
+        else:
+            texto += str(recibo['invoice'].id)[-6:].zfill(6)
+            texto += str(recibo['id'])[-10:].zfill(10)
+        concepto = ''
+        if join:
+            if recibo['communication']:
+                concepto = recibo['communication']
+        else:
+            concepto = recibo['communication_']
+        texto += to_ascii(concepto)[0:40].ljust(40)
+        texto += 8*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual obligatorio 19', texto), True)
+        return texto
+    
+    def _individual_primer_opcional_19(self, recibo):
+        """Para poner el primer texto opcional de comunicación"""
+        texto = '5681'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['partner_id'].id)[-12:].zfill(12)
+        texto += to_ascii(recibo['communication2'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication3'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication4'])[0:40].ljust(40)
+        texto += 14*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True)
+        return texto
+    
+    def _individual_segundo_opcional_19(self, recibo):
+        """Para poner el segundo texto opcional de comunicación"""
+        texto = '5682'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['partner_id'].id)[-12:].zfill(12)
+        texto += to_ascii(recibo['communication5'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication6'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication7'])[0:40].ljust(40)
+        texto += 14*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True)
+        return texto
+
+    def _individual_tercero_opcional_19(self, recibo):
+        """Para poner el tercer texto opcional de comunicación"""
+        texto = '5683'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['partner_id'].id)[-12:].zfill(12)
+        texto += to_ascii(recibo['communication8'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication9'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication10'])[0:40].ljust(40)
+        texto += 14*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True)
+        return texto
+    
+    def _individual_cuarto_opcional_19(self, recibo):
+        """Para poner el cuarto texto opcional de comunicación"""
+        texto = '5684'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['partner_id'].id)[-12:].zfill(12)
+        texto += to_ascii(recibo['communication11'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication12'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication13'])[0:40].ljust(40)
+        texto += 14*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True)
+        return texto
+
+    def _individual_quinto_opcional_19(self, recibo):
+        """Para poner el quinto texto opcional de comunicación"""
+        texto = '5685'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['partner_id'].id)[-12:].zfill(12)
+        texto += to_ascii(recibo['communication14'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication15'])[0:40].ljust(40)
+        texto += to_ascii(recibo['communication16'])[0:40].ljust(40)
+        texto += 14*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True)
+        return texto
+
+    def _individual_opcional_19(self, recibo):
+        """Para poner el segundo texto de comunicación (en lugar de nombre, domicilio y localidad opcional)"""
+        texto = '5686'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['name'])[-12:].zfill(12)
+        texto += to_ascii(recibo['communication2'])[0:115].ljust(115)
+        texto += '00000' # Campo de código postal ficticio
+        texto += 14*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True)
+        return texto
+
+    def _total_ordenante_19(self):
+        texto = '5880'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += 72*' '
+        totalordenante = int(round(abs(self.group_amount) * 100,0))
+        texto += str(totalordenante).zfill(10)
+        texto += 6*' '
+        texto += str(self.group_payments).zfill(10)
+        texto += str(self.group_payments + self.group_optional_lines + 2).zfill(10)
+        texto += 38*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total ordenante 19', texto), True)
+        return texto
+
+    def _total_general_19(self):
+        texto = '5980'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += 52*' '
+        if self.order.date_prefered == 'due':
+            # Tantos ordenantes como pagos
+            texto += str(self.total_payments).zfill(4)
+        else:
+            # Sólo un ordenante
+            texto += '0001'
+        texto += 16*' '
+        totalremesa = int(round(abs(self.order.total) * 100,0))
+        texto += str(totalremesa).zfill(10)
+        texto += 6*' '
+        texto += str(self.total_payments).zfill(10)
+        if self.order.date_prefered == 'due':
+            # Tantos ordenantes como pagos
+            texto += str(self.total_payments*3 + self.total_optional_lines + 2).zfill(10)
+        else:
+            # Sólo un ordenante
+            texto += str(self.total_payments + self.total_optional_lines + 4).zfill(10)
+        texto += 38*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total general 19', texto), True)
+        return texto
+
+
+    def create_file(self, pool, cr, uid, order, lines, context):
+        self.order = order
+
+        join = context['join']
+        txt_remesa = ''
+        self.total_payments = 0
+        self.total_optional_lines = 0
+        self.group_payments = 0
+        self.group_optional_lines = 0
+        self.group_amount = 0.0
+
+        txt_remesa += self._cabecera_presentador_19()
+
+        if order.date_prefered == 'due':
+            # Tantos ordenantes como pagos
+            for recibo in lines:
+                self.group_payments = 0
+                self.group_optional_lines = 0
+                self.group_amount = 0.0
+
+                txt_remesa += self._cabecera_ordenante_19(recibo)
+                txt_remesa += self._individual_obligatorio_19(recibo,join)
+                self.total_payments += 1
+                self.group_payments += 1
+                self.group_amount += abs( recibo['amount'] )
+#                if join:
+#                    if recibo['communication2']:
+#                        txt_remesa += self._individual_opcional_19(recibo)
+#                        #self.num_lineas_opc = self.num_lineas_opc + 1
+#                        self.total_optional_lines += 1
+#                        self.group_optional_lines += 1
+#                else:
+#                    txt_remesa += self._individual_primer_opcional_19(recibo)
+#                    self.total_optional_lines += 1
+#                    self.group_optional_lines += 1
+#                    txt_remesa += self._individual_segundo_opcional_19(recibo)
+#                    self.total_optional_lines += 1
+#                    self.group_optional_lines += 1
+#                    txt_remesa += self._individual_tercero_opcional_19(recibo)
+#                    self.total_optional_lines += 1
+#                    self.group_optional_lines += 1
+#                    txt_remesa += self._individual_cuarto_opcional_19(recibo)
+#                    self.total_optional_lines += 1
+#                    self.group_optional_lines += 1
+#                    txt_remesa += self._individual_quinto_opcional_19(recibo)
+#                    self.total_optional_lines += 1
+#                    self.group_optional_lines += 1
+                txt_remesa += self._total_ordenante_19()
+        else:
+            # Sólo un ordenante
+            txt_remesa += self._cabecera_ordenante_19()
+            self.group_payments = 0
+            self.group_optional_lines = 0
+            self.group_amount = 0.0
+
+            for recibo in lines:
+                txt_remesa += self._individual_obligatorio_19(recibo,join)
+                self.total_payments += 1
+                self.group_payments += 1
+                self.group_amount += abs( recibo['amount'] )
+                if join:
+                    if recibo['communication2']:
+                        txt_remesa += self._individual_opcional_19(recibo)
+                        #self.num_lineas_opc = self.num_lineas_opc + 1
+                        self.total_optional_lines += 1
+                        self.group_optional_lines += 1
+                else:
+                    txt_remesa += self._individual_primer_opcional_19(recibo)
+                    self.total_optional_lines += 1
+                    self.group_optional_lines += 1
+                    txt_remesa += self._individual_segundo_opcional_19(recibo)
+                    self.total_optional_lines += 1
+                    self.group_optional_lines += 1
+                    txt_remesa += self._individual_tercero_opcional_19(recibo)
+                    self.total_optional_lines += 1
+                    self.group_optional_lines += 1
+                    txt_remesa += self._individual_cuarto_opcional_19(recibo)
+                    self.total_optional_lines += 1
+                    self.group_optional_lines += 1
+                    txt_remesa += self._individual_quinto_opcional_19(recibo)
+                    self.total_optional_lines += 1
+                    self.group_optional_lines += 1
+
+            txt_remesa += self._total_ordenante_19()
+
+        txt_remesa += self._total_general_19()
+        return txt_remesa
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'l10n_es_payment_order/wizard/csb_32.py'
--- l10n_es_payment_order/wizard/csb_32.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/csb_32.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,247 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+# Corregido para instalación TinyERP estándar 4.2.0: Zikzakmedia S.L. 2008
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Añadidas cuentas de remesas y tipos de pago. 2008
+#    Pablo Rocandio <salbet@xxxxxxxxx>
+#
+# Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from datetime import datetime
+from tools.translate import _
+from converter import *
+
+
+class csb_32:
+
+    def _cabecera_fichero_32(self):
+        texto = '0265'
+        texto += '  '
+        texto += datetime.today().strftime('%d%m%y')
+        texto += digits_only( self.order.reference )[-4:]
+        texto += ' '*35
+        texto += digits_only( self.order.mode.bank_id.acc_number )[:8]
+        texto += ' '*6
+        texto += ' '*61
+        texto += ' '*24
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Cabecera fichero 32', texto), True)
+        return texto
+
+    def _cabecera_remesa_32(self, cr, context):
+        # A: 
+        texto = '1165'
+        texto += '  '
+
+        # B
+        texto += datetime.today().strftime('%d%m%y')
+        texto += '0001'
+        texto += ' '*12
+
+        # C
+        texto += convert(cr, self.order.mode.cedente, 15, context) # TODO: Identificador del cedente. Qué es?
+        texto += '1' # Identificativo de efectos truncados
+        texto += ' '*21
+
+        # D
+        texto += digits_only( self.order.mode.bank_id.acc_number )
+        texto += digits_only( self.order.mode.bank_id.acc_number )
+        texto += digits_only( self.order.mode.bank_id.acc_number )
+        texto += ' ' + ' '*24
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Cabecera remesa 32', texto), True)
+        return texto
+
+    def _registro_individual_i_32(self, cr, recibo, context):
+        # A
+        texto = '2565'
+        texto += '  '
+        # B
+        texto += convert(cr, self.num_recibos+1, 15, context)
+        texto += datetime.today().strftime('%d%m%y')
+        texto += '0001'
+ 
+        # C
+        state = self.order.mode.bank_id.state_id and self.order.mode.bank_id.state_id.code or False
+        texto += convert(cr, state, 2, context)
+        texto += ' '*7
+        texto += '  '
+
+        # D
+        texto += convert(cr, self.order.mode.bank_id.city, 20, context)
+        texto += ' '
+
+        # E
+        texto += ' '*24
+        texto += convert(cr, abs(recibo['amount']), 9, context)
+        texto += ' '*15
+        texto += datetime.strptime( recibo['ml_maturity_date'], '%Y-%m-%d').strftime('%d%m%y') 
+        texto += ' '*(6+6+1+4+16)
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual I 32', texto), True)
+        return texto
+
+    def _registro_individual_ii_32(self, cr, recibo, context):
+        # A: Identificacion de la operacion
+        texto = '2665'
+        texto += '  '
+
+        # B: Datos del efecto
+        texto += convert(cr, self.num_recibos+1, 15, context)
+        texto += '  '
+        texto += '2' # Recibo
+        texto += '000000'
+        texto += '1' 
+        # 0= Sin gastos, 1=Con gastos, 9=Orden expresa de protesto notarial
+        texto += '0' 
+
+        # C: Datos del efecto
+        ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or ''
+        if ccc:
+            texto += ccc[:20].zfill(20)
+        else:
+            texto += ' '*20
+
+        # D: Datos del efecto
+        texto += convert(cr, self.order.mode.partner_id.name, 34, context)
+        texto += convert(cr, recibo['partner_id'].name, 34, context)
+        texto += ' '*30
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual II 32', texto), True)
+        return texto
+
+    def _registro_individual_iii_32(self, cr, recibo, context):
+        # A: Identificacion de la operacion
+        texto = '2765'
+        texto += '  '
+        
+        # B: Datos del efecto
+        texto += convert(cr, self.num_recibos+1, 15, context)
+        texto += '  '
+        addresses = self.pool.get('res.partner').address_get(self.cr, self.uid, [recibo['partner_id'].id] )
+        #if not addresses:
+        #    print "NO ADDRESSES"
+        address = self.pool.get('res.partner.address').browse(self.cr, self.uid, addresses['default'], self.context)
+        texto += convert( cr, address.street, 34, context )
+        texto += convert( cr, address.zip, 5, context )
+        texto += convert( cr, address.city, 20, context )
+        texto += convert( cr, address.state_id and address.state_id.code or False, 2, context )
+        texto += '0'*7
+
+        # C: Datos del efecto
+        vat = recibo['partner_id'].vat and recibo['partner_id'].vat[2:] or False
+        texto += convert(cr, vat, 9, context)
+        texto += ' '*50
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual III 32', texto), True)
+        return texto
+
+    def _registro_fin_remesa_32(self, cr, context):
+        # A: Identificación de la operación
+        texto = '7165'
+        texto += '  '
+
+        # B: Control de duplicidades
+        texto += datetime.today().strftime('%d%m%y')
+        texto += '0001'
+        texto += ' '*(6+6)
+
+        # C: Libre
+        texto += ' '*37
+
+        # D: Acumuladores de importe
+        texto += ' '*10
+        texto += convert( cr, abs(self.order.total), 10, context )
+        texto += ' '*(10+6+7+6+6+6)
+
+        # E: Controles de lectura de fichero
+        texto += ' '*5
+        texto += convert(cr, (self.num_recibos*3) + 2, 7, context)
+        texto += convert(cr, self.num_recibos, 6, context)
+        texto += ' '*6
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Fin remesa 32', texto), True)
+        return texto
+
+    def _registro_fin_fichero_32(self, cr, context):
+        # A: Identificación de la operación
+        texto = '9865'
+        texto += '  '
+    
+        # B: Libre
+        texto += ' '*22
+
+        # C: Libre
+        texto += ' '*37
+
+        # D: Acumuladores de importes
+        texto += ' '*10
+        texto += convert( cr, abs(self.order.total), 10, context )
+        texto += ' '*(10+6+7+6+6+6)
+
+        # E: Controles de lectura del fichero
+        texto += '00001'
+        texto += convert(cr, (self.num_recibos*3) + 3, 7, context)
+        texto += convert(cr, self.num_recibos, 6, context)
+        texto += ' '*6
+        texto += '\r\n'
+        if len(texto) != 152:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Fin fichero 32', texto), True)
+        return texto
+ 
+    def create_file(self, pool, cr, uid, order, lines, context):
+        self.pool = pool
+        self.cr = cr
+        self.uid = uid
+        self.order = order
+        self.context = context
+
+        txt_remesa = ''
+        self.num_recibos = 0
+        self.num_lineas_opc = 0
+
+        txt_remesa += self._cabecera_fichero_32()
+        txt_remesa += self._cabecera_remesa_32(cr, context)
+        for recibo in lines:
+            txt_remesa += self._registro_individual_i_32(cr, recibo, context)
+            txt_remesa += self._registro_individual_ii_32(cr, recibo, context)
+            txt_remesa += self._registro_individual_iii_32(cr, recibo, context)
+            self.num_recibos = self.num_recibos + 1
+        txt_remesa += self._registro_fin_remesa_32(cr, context)
+        txt_remesa += self._registro_fin_fichero_32(cr, context)
+        return txt_remesa
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'l10n_es_payment_order/wizard/csb_34.py'
--- l10n_es_payment_order/wizard/csb_34.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/csb_34.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,395 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    Copyright (c) 2009 NaN (http://www.nan-tic.com) All Rights Reserved.
+#                       Albert Cervera i Areny <albert@xxxxxxxxxxx>
+#    $Id$
+#
+# Corregido para instalación TinyERP estándar 4.2.0: Zikzakmedia S.L. 2008
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Añadidas cuentas de remesas y tipos de pago. 2008
+#    Pablo Rocandio <salbet@xxxxxxxxx>
+#
+# Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from datetime import datetime
+from tools.translate import _
+from converter import *
+import time
+
+csb34_code = {
+    'transfer': '56',
+    'cheques': '57',
+    'promissory_note': '58',
+    'certified_payments': '59',
+}
+
+class csb_34:
+
+    def get_message(self, recibo, message=None):
+        """
+        Evaluates an expression and returns its value
+        @param recibo: Order line data
+        @param message: The expression to be evaluated
+        @return: Computed message (string)
+        """
+        fields = [
+            'name',
+            'amount',
+            'communication',
+            'communication2',
+            'date',
+            'ml_maturity_date',
+            'create_date',
+            'ml_date_created'
+        ]
+        if message is None or not message:
+            message = ''
+        for field in fields:
+            if type(recibo[field]) == str:
+                value = unicode(recibo[field],'UTF-8')
+            elif type(recibo[field]) == unicode:
+                value = recibo[field]
+            else:
+                value = str(recibo[field])
+            message = message.replace('${' + field + '}', value)
+        return message
+
+    def _start_34(self, cr, context):
+        return convert(cr, self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo, 12, context)
+
+    def _cabecera_ordenante_34(self, cr, uid, context):
+        today = datetime.today().strftime('%d%m%y')
+
+        text = ''
+
+        # Primer tipo
+        text += '0362'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += '001'
+        text += today
+        if self.order.date_scheduled:
+            planned = datetime.strptime(self.order.date_scheduled, '%Y-%m-%d')
+            text += planned.strftime('%d%m%y')
+        else:
+            text += today
+        #text += self.convert(self.order.mode.nombre, 40)
+        text += convert_bank_account(cr, self.order.mode.bank_id.acc_number, self.order.mode.partner_id.name, context)
+        text += '0'
+        text += 8*' '
+        text += '\r\n'
+
+        # Segundo Tipo
+        text += '0362'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += '002'
+        text += convert(cr, self.order.mode.bank_id.partner_id.name, 36, context)
+        text += 5*' '
+        text += '\r\n'
+
+        # Tercer Tipo 
+        text += '0362'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += '003'
+        # Direccion
+        address = None
+        address_ids = self.pool.get('res.partner').address_get(cr, uid, [self.order.mode.bank_id.partner_id.id], ['invoice', 'default'])
+        if address_ids.get('invoice'):
+            address = self.pool.get('res.partner.address').read(cr, uid, [address_ids.get('invoice')], ['street','zip','city'], context)[0]
+        elif address_ids.get('default'):
+            address = self.pool.get('res.partner.address').read(cr, uid, [address_ids.get('default')], ['street','zip','city'], context)[0]
+        else:
+            raise Log( _('User error:\n\nCompany %s has no invoicing or default address.') % self.order.mode.bank_id.partner_id.name )
+        text += convert(cr, address['street'], 36, context)
+        text += 5*' '
+        text += '\r\n'
+
+        # Cuarto Tipo 
+        text += '0362'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += '004'
+        text += convert(cr, address['zip'], 6, context)
+        text += convert(cr, address['city'], 30, context)
+        text += 5*' '
+        text += '\r\n'
+        if len(text)%74 != 0:
+            raise Log(_('Configuration error:\n\nA line in "%s" is not 72 characters long:\n%s') % ('Cabecera ordenante 34', text), True)  
+        return text
+
+    def _cabecera_nacionales_34(self, cr, uid, context):
+        text = '0456'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += 3*' '
+        text += 41*' '
+        text += '\r\n'
+        if len(text) != 74:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 72 characters long:\n%s') % ('Cabecera nacionales 34', text), True)
+        return text
+
+    def _detalle_nacionales_34(self, cr, uid, recibo, csb34_type, context):
+    
+        address = None
+        address_ids = self.pool.get('res.partner').address_get(cr, uid, [recibo['partner_id'].id], ['invoice', 'default'])
+        if address_ids.get('invoice'):
+            address = self.pool.get('res.partner.address').browse(cr, uid, address_ids.get('invoice'), context)
+        elif address_ids.get('default'):
+            address = self.pool.get('res.partner.address').browse(cr, uid, address_ids.get('default'), context)
+        else:
+            raise Log( _('User error:\n\nPartner %s has no invoicing or default address.') % recibo['partner_id'].name )
+
+        # Primer Registro
+        text = ''
+        text += '06'
+        text += csb34_code[csb34_type]
+        text += self._start_34(cr, context)
+        text += convert(cr, recibo['partner_id'].vat, 12, context)
+        text += '010'
+        text += convert(cr, abs(recibo['amount']), 12, context)
+        #text += convert_bank_account(cr, recibo['bank_id'].acc_number, recibo['partner_id'].name, context)
+
+        # Si la orden se emite para transferencia
+        csb34_type = self.order.mode.csb34_type
+        if csb34_type == 'transfer':
+            ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or ''
+            ccc = digits_only(ccc)
+            text += ccc[:20].zfill(20)
+        # Si la orden se emite para pagaré, cheque o pago certificado
+        else:
+            text += 17*'0'
+            send_type = self.order.mode.send_type
+            if send_type == 'mail':
+                text += '1'
+            elif send_type == 'certified_mail':
+                text += '2'
+            else:
+                text += '3'
+            if self.order.mode.not_to_the_order:
+                text += '1'
+            else:
+                text += '0'
+            if self.order.mode.barred:
+                text += '9'
+            else:
+                text += '0'
+        if self.order.mode.cost_key == 'payer':
+            text += '1'
+        else:
+            text += '2'
+        concept = self.order.mode.concept
+        if concept == 'payroll':
+            text += '1'
+        elif concept == 'pension':
+            text += '8'
+        else:
+            text += '9'
+        if self.order.mode.direct_pay_order:
+            text += '1'
+        else:
+            text += '2'
+        text += 6*' '
+        text += '\r\n'
+
+        # Segundo Registro
+        text += '06'
+        text += csb34_code[csb34_type] 
+        text += self._start_34(cr, context)
+        text += convert(cr, recibo['partner_id'].vat, 12, context)
+        text += '011'
+        text += convert(cr, recibo['partner_id'].name, 36, context)
+        text += 5*' '
+        text += '\r\n'
+
+        # Tercer y Cuarto Registro
+        lines = []
+        if address.street:
+            lines.append(("012", address.street))
+        if address.street2:
+            lines.append(("013", address.street2))
+        for (code, street) in lines:
+            text += '06'
+            text += csb34_code[csb34_type] 
+            text += self._start_34(cr, context)
+            text += convert(cr, recibo['partner_id'].vat, 12, context)
+            text += code
+            text += convert(cr, street, 36, context)
+            text += 5*' '
+            text += '\r\n'
+
+        # Quinto Registro
+        if address.zip or address.city:
+            text += '06'
+            text += csb34_code[csb34_type] 
+            text += self._start_34(cr, context)
+            text += convert(cr, recibo['partner_id'].vat, 12, context)
+            text += '014'
+            text += convert(cr, address.zip, 6, context)
+            text += convert(cr, address.city, 30, context)
+            text += 5*' '
+            text += '\r\n'
+
+        # Si la orden se emite por carta (sólo tiene sentido si no son transferencias)
+        send_type = self.order.mode.send_type
+        if csb34_type != 'transfer' and (send_type == 'mail' or send_type == 'certified_mail'):
+
+            # Sexto Registro
+            text += '06'
+            text += csb34_code[csb34_type] 
+            text += self._start_34(cr, context)
+            text += convert(cr, recibo['partner_id'].vat, 12, context)
+            text += '015'
+            country_code = address.country_id and address.country_id.code or ''
+            state = address.state_id and address.state_id.name or ''
+            text += convert(cr, country_code, 2, context)
+            text += convert(cr, state, 34, context)
+            text += 5*' '
+            text += '\r\n'
+
+            # Séptimo Registro
+            if self.order.mode.payroll_check:
+                text += '06'
+                text += csb34_code[csb34_type] 
+                text += self._start_34(cr, context)
+                text += convert(cr, recibo['partner_id'].vat, 12, context)
+                text += '018'
+                text += convert(cr, recibo['partner_id'].vat, 36, context)
+                text += 5*' '
+                text += '\r\n'
+
+            # Registro ciento uno (registro usados por algunos bancos como texto de la carta)
+            text += '06'
+            text += csb34_code[csb34_type] 
+            text += self._start_34(cr, context)
+            text += convert(cr, recibo['partner_id'].vat, 12, context)
+            text += '101'
+            message = self.get_message(recibo, self.order.mode.text1)
+            text += convert(cr, message, 36, context)
+            text += 5*' '
+            text += '\r\n'
+
+            # Registro ciento dos (registro usados por algunos bancos como texto de la carta)
+            text += '06'
+            text += csb34_code[csb34_type] 
+            text += self._start_34(cr, context)
+            text += convert(cr, recibo['partner_id'].vat, 12, context)
+            text += '102'
+            message = self.get_message(recibo, self.order.mode.text2)
+            text += convert(cr, message, 36, context)
+            text += 5*' '
+            text += '\r\n'
+
+            # Registro ciento tres (registro usados por algunos bancos como texto de la carta)
+            text += '06'
+            text += csb34_code[csb34_type] 
+            text += self._start_34(cr, context)
+            text += convert(cr, recibo['partner_id'].vat, 12, context)
+            text += '103'
+            message = self.get_message(recibo, self.order.mode.text3)
+            text += convert(cr, message, 36, context)
+            text += 5*' '
+            text += '\r\n'
+
+            # Registro novecientos diez (registro usados por algunos bancos como fecha de la carta)
+            if self.order.mode.add_date:
+                if recibo['date']:
+                    date = recibo['date']
+                elif self.order.date_scheduled:
+                    date = self.order.date_scheduled
+                else:
+                    date = time.strftime('%Y-%m-%d')
+                [year,month,day] = date.split('-')
+                message = day+month+year
+                text += '06'
+                text += csb34_code[csb34_type] 
+                text += self._start_34(cr, context)
+                text += convert(cr, recibo['partner_id'].vat, 12, context)
+                text += '910'
+                text += convert(cr, message, 36, context)
+                text += 5*' '
+                text += '\r\n'
+
+        if len(text)%74 != 0:
+            raise Log(_('Configuration error:\n\nA line in "%s" is not 72 characters long:\n%s') % ('Detalle nacionales 34', text), True)  
+        return text
+
+    def _totales_nacionales_34(self, cr, uid, values, context):
+        text = '0856'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += 3*' '
+        text += convert(cr, self.order.total, 12, context)
+        text += convert(cr, values[0], 8, context)
+        text += convert(cr, values[1], 10, context)
+        text += 6*' '
+        text += 5*' '
+        text += '\r\n'
+        if len(text) != 74:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 72 characters long:\n%s') % ('Totales nacionales 34', text), True)
+        return text
+
+    def _total_general_34(self, cr, uid, values, context):
+        text = '0962'
+        text += self._start_34(cr, context)
+        text += 12*' '
+        text += 3*' '
+        text += convert(cr, self.order.total, 12, context)
+        text += convert(cr, values[0], 8, context)
+        text += convert(cr, values[1], 10, context)
+        text += 6*' '
+        text += 5*' '
+        text += '\r\n'
+        if len(text) != 74:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 72 characters long:\n%s') % ('Total general 34', text), True)
+        return text
+
+    def create_file(self, pool, cr, uid, order, lines, context):
+        self.pool = pool
+        self.order = order
+        self.context = context
+
+        payment_line_count = 0
+        record_count = 0
+
+        file = ''
+        file += self._cabecera_ordenante_34(cr, uid, context)
+        file += self._cabecera_nacionales_34(cr, uid, context)
+        for recibo in lines:
+            text = self._detalle_nacionales_34(cr, uid, recibo, order.mode.csb34_type, context)
+            file += text
+            record_count += len(text.split('\r\n'))-1
+            payment_line_count += 1
+        values = (payment_line_count, record_count + 2)
+        file += self._totales_nacionales_34(cr, uid, values, context)
+        record_count =  len(file.split('\r\n'))
+        values = (payment_line_count, record_count)
+        file += self._total_general_34(cr, uid, values, context)
+        return file
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'l10n_es_payment_order/wizard/csb_58.py'
--- l10n_es_payment_order/wizard/csb_58.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/csb_58.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,302 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+# Corregido para instalación TinyERP estándar 4.2.0: Zikzakmedia S.L. 2008
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Añadidas cuentas de remesas y tipos de pago. 2008
+#    Pablo Rocandio <salbet@xxxxxxxxx>
+#
+# Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from datetime import datetime
+from tools.translate import _
+from converter import *
+
+class csb_58:
+    def _cabecera_presentador_58(self):
+        texto = '5170'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += datetime.today().strftime('%d%m%y')
+        texto += 6*' '
+        texto += to_ascii(self.order.mode.nombre).ljust(40)
+        texto += 20*' '
+        cc = digits_only(self.order.mode.bank_id.acc_number)
+        texto += cc[0:8]
+        texto += 66*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera presentador 58', texto), True)
+        return texto
+
+    def _cabecera_ordenante_58(self):
+        texto = '5370'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += datetime.today().strftime('%d%m%y')
+        texto += 6*' '
+        texto += to_ascii(self.order.mode.nombre).ljust(40)
+        cc = digits_only(self.order.mode.bank_id.acc_number)
+        texto += cc[0:20]
+        texto += 8*' '
+        texto += '06'
+        texto += 52*' '
+        texto += self.order.mode.ine and to_ascii(self.order.mode.ine)[:9].zfill(9) or 9*' '
+        texto += 3*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera ordenante 58', texto), True)
+        return texto
+
+    def _individual_obligatorio_58(self, recibo):
+        texto = '5670'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['name'])[-12:].zfill(12)
+        nombre = to_ascii(recibo['partner_id'].name)
+        texto += nombre[0:40].ljust(40)
+        ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or ''
+        ccc = digits_only(ccc)
+        texto += str(ccc)[0:20].zfill(20)
+        importe = int(round(abs(recibo['amount'])*100,0))
+        texto += str(importe).zfill(10)
+        texto += 16*' '
+        concepto = ''
+        if recibo['communication']:
+            concepto = recibo['communication']
+        texto += to_ascii(concepto)[0:40].ljust(40)
+        if recibo.get('date'):
+            date_cargo = datetime.strptime(recibo['date'],'%Y-%m-%d')
+        elif recibo.get('ml_maturity_date'):
+            date_cargo = datetime.strptime(recibo['ml_maturity_date'],'%Y-%m-%d')
+        else:
+            date_cargo = datetime.today()
+        texto += date_cargo.strftime('%d%m%y')
+        texto += 2*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual obligatorio 58', texto), True)
+        return texto
+
+    def _individual_opcional_58(self, recibo):
+        """Para poner el segundo texto de comunicación"""
+        texto = '5671'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['name'])[-12:].zfill(12)
+        texto += to_ascii(recibo['communication2'])[0:134].ljust(134)
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 58', texto), True)
+        return texto
+
+
+    def _registro_obligatorio_domicilio_58(self, recibo):
+        """
+        Registro obligatorio domicilio 58 para no domiciliados.
+        
+        Formato:
+         ZONA  DESCRIPCION                                   POS     LONGITUD TIPO
+                                                             INICIAL          REGISTRO
+         A: A1 Código de Registro: 56                        1       2        Numérico
+         A2    Código de Dato: 76                            3       2        Numérico
+         B: B1 Código del Cliente Ordenante (NIF 9POS Y SUF  5       12       Alfanumérico
+               3POS)
+         B2    Código de Referencia                          17      12       Alfanumérico
+         C:    Domicilio del Deudor                          29      40       Alfanumérico
+         D: D1 Plaza del Domicilio del Deudor                69      35       Alfanumérico
+         D2    Código Postal del Domicilio del Deudor        104     5        Numérico
+         E: E1 Localidad del Ordenante al que se anticipó el 109     38       Alfanumérico
+               Crédito
+         E2    Código de la Provincia de esta Localidad      147     2        Numérico
+         F: F1 Fecha de origen en que se formalizó el Cto.   149     6        Numérico
+               (DDMMAA)
+         F2    Libre                                         155     8        Alfanumérico
+        """
+
+        alt_format = self.order.mode.alt_domicile_format
+
+        #
+        # Obtenemos la dirección (por defecto) del partner, a imagen
+        # y semejanza de lo que hace info_partner
+        # del objeto payment.line (account_payment/payment.py),
+        # Pero si no encontramos ninguna dirección por defecto,
+        # tomamos la primera del partner.
+        #
+        st = ''
+        zip = ''
+        city = ''
+        if recibo['partner_id'].address:
+            ads = None
+            for item in recibo['partner_id'].address:
+                if item.type=='default':
+                    ads = item
+                    break
+            if not ads and len(recibo['partner_id'].address) > 0:
+                ads = recibo['partner_id'].address[0]
+
+            st=ads.street and ads.street or ''
+            if 'zip_id' in ads:
+                obj_zip_city= ads.zip_id and self.pool.get('res.partner.zip').browse(self.cr,self.uid,ads.zip_id.id, self.context) or ''
+                zip=obj_zip_city and obj_zip_city.name or ''
+                city=obj_zip_city and obj_zip_city.city or  ''
+            else:
+                zip=ads.zip and ads.zip or ''
+                city= ads.city and ads.city or  ''
+            #
+            # Comprobamos el código postal:
+            #   "Cuando no se conozca el código
+            #    completo, se cumplimentara, al menos, las dos primeras posiciones
+            #    que identifican la provincia, dejando el resto de posiciones a cero."
+            #
+            if len(zip) < 2:
+                zip = ads.state_id and ads.state_id.code or ''
+
+        #
+        # Obtenemos la localidad y código de provincia del ordenante
+        #
+        ord_city = ''
+        ord_state_code = ''
+        if self.order.mode.partner_id.address:
+            ads = None
+            for item in self.order.mode.partner_id.address:
+                if item.type=='default':
+                    ads = item
+                    break
+            if not ads and len(self.order.mode.partner_id.address) > 0:
+                ads =  self.order.mode.partner_id.address[0]
+
+            ord_city = ads.state_id and ads.state_id.name or ''
+            ord_state_code = ads.state_id and ads.state_id.code or ''
+
+        #
+        # Calculamos la 'Fecha de origen en que se formalizo el crédito anticipado'
+        # esto es, la fecha de creación del recibo.
+        #
+        if recibo.get('create_date'):
+            date_ct = datetime.strptime(recibo['create_date'],'%Y-%m-%d %H:%M:%S') # Cuidado, que es un datetime
+        elif recibo.get('ml_date_created'):
+            date_ct = datetime.strptime(recibo['ml_date_created'],'%Y-%m-%d')
+        else:
+            date_ct = datetime.today()
+
+        #
+        # Componemos la línea formateada
+        #
+        texto = '5676'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += str(recibo['name'])[-12:].zfill(12)
+        texto += to_ascii(st)[:40].ljust(40)          # Domicilio
+        texto += to_ascii(city)[:35].ljust(35)        # Plaza (ciudad)
+        texto += to_ascii(zip)[:5].zfill(5)           # CP
+        texto += to_ascii(ord_city)[:38].ljust(38)    # Localidad del ordenante (ciudad)
+        if alt_format:
+            #
+            # Si usamos el formato alternativo (basado en FacturaPlus)
+            # escribimos la fecha en la posición 147 y dejamos dos carácteres
+            # en blanco tras ella.
+            # Lo correcto, según la norma, es que en la posición 147 aparezca
+            # el código de provincia (2 dígitos) y la fecha empiece en
+            # la posición 149.
+            #
+            texto += date_ct.strftime('%d%m%y')                 # Fecha crédito
+            texto += 2*' '
+        else:
+            texto += to_ascii(ord_state_code)[:2].zfill(2)    # Cod prov del ordenante
+            texto += date_ct.strftime('%d%m%y')                 # Fecha crédito
+        texto += 8*' '                                  # Libre
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Obligatorio domicilio 58', texto), True)
+        return texto
+
+
+    def _total_ordenante_58(self):
+        texto = '5870'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += 72*' '
+        totalordenante = int(round(abs(self.order.total) * 100,0))
+        texto += str(totalordenante).zfill(10)
+        texto += 6*' '
+        texto += str(self.num_recibos).zfill(10)
+        texto += str(self.num_recibos + self.num_lineas_opc + 2).zfill(10)
+        texto += 38*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total ordenante 58', texto), True)
+        return texto
+
+    def _total_general_58(self):
+        texto = '5970'
+        texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12)
+        texto += 52*' '
+        texto += '0001'
+        texto += 16*' '
+        totalremesa = int(round(abs(self.order.total) * 100,0))
+        texto += str(totalremesa).zfill(10)
+        texto += 6*' '
+        texto += str(self.num_recibos).zfill(10)
+        texto += str(self.num_recibos + self.num_lineas_opc + 4).zfill(10)
+        texto += 38*' '
+        texto += '\r\n'
+        if len(texto) != 164:
+            raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total general 58', texto), True)
+        return texto
+
+    def create_file(self, pool, cr, uid, order, lines, context):
+        self.pool = pool
+        self.cr = cr
+        self.uid = uid
+        self.order = order
+        self.context = context
+
+        txt_remesa = ''
+        self.num_recibos = 0
+        self.num_lineas_opc = 0
+
+        txt_remesa += self._cabecera_presentador_58()
+        txt_remesa += self._cabecera_ordenante_58()
+
+        for recibo in lines:
+            txt_remesa += self._individual_obligatorio_58(recibo)
+            self.num_recibos = self.num_recibos + 1
+            
+            # Sólo emitimos el registro individual si communication2 contiene texto
+            if recibo['communication2'] and len(recibo['communication2'].strip()) > 0:
+                txt_remesa += self._individual_opcional_58(recibo)
+                self.num_lineas_opc = self.num_lineas_opc + 1
+
+            # Para recibos no domiciliados, añadimos el registro obligatorio
+            # de domicilio (necesario con algunos bancos/cajas).
+            if self.order.mode.inc_domicile:
+                txt_remesa += self._registro_obligatorio_domicilio_58(recibo)
+                self.num_lineas_opc = self.num_lineas_opc + 1
+
+        txt_remesa += self._total_ordenante_58()
+        txt_remesa += self._total_general_58()
+
+        return txt_remesa
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'l10n_es_payment_order/wizard/export_remesas.py'
--- l10n_es_payment_order/wizard/export_remesas.py	1970-01-01 00:00:00 +0000
+++ l10n_es_payment_order/wizard/export_remesas.py	2011-11-28 16:53:26 +0000
@@ -0,0 +1,229 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
+#                       Pedro Tarrafeta <pedro@xxxxxxxxxx>
+#    Copyright (c) 2008 Pablo Rocandio. All Rights Reserved.
+#    Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
+#                       Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#    $Id$
+#
+# Corregido para instalación TinyERP estándar 4.2.0: Zikzakmedia S.L. 2008
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+# Añadidas cuentas de remesas y tipos de pago. 2008
+#    Pablo Rocandio <salbet@xxxxxxxxx>
+#
+# Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009
+#   Jordi Esteve <jesteve@xxxxxxxxxxxxxxx>
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU 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 General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import pooler
+import wizard
+import base64
+from tools.translate import _
+from converter import *
+import csb_19
+import csb_32
+import csb_34
+import csb_58
+
+join_form = """<?xml version="1.0"?>
+<form string="Payment order export">
+    <field name="join"/>
+</form>"""
+
+join_fields = {
+    'join' : {'string':'Join payment lines of the same partner and bank account', 'type':'boolean'},
+}
+
+export_form = """<?xml version="1.0"?>
+<form string="Payment order export">
+    <field name="pay" filename="pay_fname"/>
+    <field name="pay_fname" invisible="1"/>
+    <field name="note" colspan="4" nolabel="1"/>
+</form>"""
+
+export_fields = {
+    'pay' : {
+        'string':'Payment order file',
+        'type':'binary',
+        'required': False,
+        'readonly':True,
+    },
+    'pay_fname': {'string':'File name', 'type':'char', 'size':64},
+    'note' : {'string':'Log', 'type':'text'},
+}
+
+
+def _create_payment_file(self, cr, uid, data, context):
+
+    txt_remesa = ''
+    num_lineas_opc = 0
+
+    try:
+        pool = pooler.get_pool(cr.dbname)
+        orden = pool.get('payment.order').browse(cr, uid, data['id'], context)
+        if not orden.line_ids:
+            raise Log( _('User error:\n\nWizard can not generate export file, there are not payment lines.'), True )
+
+        # Comprobamos que exista número de C.C. y que tenga 20 dígitos
+        if not orden.mode.bank_id:
+            raise Log( _('User error:\n\nThe bank account of the company %s is not defined.') % (orden.mode.partner_id.name), True )
+        cc = digits_only(orden.mode.bank_id.acc_number)
+        if len(cc) != 20:
+            raise Log( _('User error:\n\nThe bank account number of the company %s has not 20 digits.') % (orden.mode.partner_id.name), True)
+
+        # Comprobamos que exista el CIF de la compañía asociada al C.C. del modo de pago
+        if not orden.mode.bank_id.partner_id.vat:
+            raise Log(_('User error:\n\nThe company VAT number related to the bank account of the payment mode is not defined.'), True)
+
+        recibos = []
+        if data['form']['join']:
+            # Lista con todos los partners+bancos diferentes de la remesa
+            partner_bank_l = reduce(lambda l, x: x not in l and l.append(x) or l,
+                                     [(recibo.partner_id,recibo.bank_id) for recibo in orden.line_ids], [])
+            # Cómputo de la lista de recibos agrupados por mismo partner+banco.
+            # Los importes se suman, los textos se concatenan con un espacio en blanco y las fechas se escoge el máximo
+            for partner,bank in partner_bank_l:
+                lineas = [recibo for recibo in orden.line_ids if recibo.partner_id==partner and recibo.bank_id==bank]
+                recibos.append({
+                    'partner_id': partner,
+                    'bank_id': bank,
+                    'name': partner.ref or '-',
+                    'amount': reduce(lambda x, y: x+y, [l.amount for l in lineas], 0),
+                    'communication': reduce(lambda x, y: x+' '+(y or ''), [l.name+' '+l.communication for l in lineas], ''),
+                    'communication2': reduce(lambda x, y: x+' '+(y or ''), [l.communication2 for l in lineas], ''),
+                    'date': max([l.date for l in lineas]),
+                    'ml_maturity_date': max([l.ml_maturity_date for l in lineas]),
+                    'create_date': max([l.create_date for l in lineas]),
+                    'ml_date_created': max([l.ml_date_created for l in lineas]),
+                })
+        else:
+            # Cada línea de pago es un recibo
+            kont = 0
+            for l in orden.line_ids:
+                kont = kont +1
+                print kont
+                recibos.append({
+                    'partner_id': l.partner_id,
+                    'bank_id': l.bank_id,
+                    'name': l.partner_id.ref or '-',
+                    'name_': l.name,
+                    'amount': l.amount,
+                    'communication': l.name+' '+l.communication,
+                    'communication_': l.communication or '',
+                    'communication2': l.communication2 or '',
+                    'communication3': l.communication3 or '',
+                    'communication4': l.communication4 or '',
+                    'communication5': l.communication5 or '',
+                    'communication6': l.communication6 or '',
+                    'communication7': l.communication7 or '',
+                    'communication8': l.communication8 or '',
+                    'communication9': l.communication9 or '',
+                    'communication10': l.communication10 or '',
+                    'communication11': l.communication11 or '',
+                    'communication12': l.communication12 or '',
+                    'communication13': l.communication13 or '',
+                    'communication14': l.communication14 or '',
+                    'communication15': l.communication15 or '',
+                    'communication16': l.communication16 or '',
+                    'date': l.date,
+                    'ml_maturity_date': l.ml_maturity_date,
+                    'create_date': l.create_date,
+                    'ml_date_created': l.ml_date_created,
+                    'invoice': l.ml_inv_ref,
+                    'id': l.id,
+                })
+        
+        if orden.mode.require_bank_account:
+            for line in recibos:
+                ccc = line['bank_id'] and line['bank_id'].acc_number or False
+                if not ccc:
+                    raise Log(_('User error:\n\nThe bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account.') % (line['partner_id'].name), True)
+                ccc = digits_only(ccc)
+                if len(ccc) != 20:
+                    raise Log(_('User error:\n\nThe bank account number of the customer %s has not 20 digits.') % (line['partner_id'].name), True)
+
+        if orden.mode.tipo == 'csb_19':
+            csb = csb_19.csb_19()
+            context['join'] = data['form']['join']
+        elif orden.mode.tipo == 'csb_32':
+            csb = csb_32.csb_32()
+        elif orden.mode.tipo == 'csb_34':
+            csb = csb_34.csb_34()
+        elif orden.mode.tipo == 'csb_58':
+            csb = csb_58.csb_58()
+        else:
+            raise Log(_('User error:\n\nThe payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58'), True)
+        txt_remesa = csb.create_file(pool, cr, uid, orden, recibos, context)
+
+    except Log, log:
+        return {
+            'note': log(), 
+            'reference': orden.id, 
+            'pay': False, 
+            'state':'failed'
+        }
+    else:
+        # Ensure line breaks use MS-DOS (CRLF) format as standards require.
+        txt_remesa = txt_remesa.replace('\r\n','\n').replace('\n','\r\n')
+#        file = unicode(txt_remesa, "utf-8")
+#        file = file.encode("utf-8")
+        file = base64.encodestring(txt_remesa)
+        fname = (_('remesa') + '_' + orden.mode.tipo + '_' + orden.reference + '.txt').replace('/','-')
+        pool.get('ir.attachment').create(cr, uid, {
+            'name': _('Remesa ') + orden.mode.tipo + ' ' + orden.reference,
+            'datas': file,
+            'datas_fname': fname,
+            'res_model': 'payment.order',
+            'res_id': orden.id,
+            }, context=context)
+        log = _("Successfully Exported\n\nSummary:\n Total amount paid: %.2f\n Total Number of Payments: %d\n") % (orden.total, len(recibos))
+        pool.get('payment.order').set_done(cr, uid, [orden.id], context)
+        return {
+            'note': log, 
+            'reference': orden.id, 
+            'pay': file, 
+            'pay_fname': fname, 
+            'state': 'succeeded',
+        }
+
+
+class wizard_payment_file_spain(wizard.interface):
+    states = {
+        'init' : {
+            'actions' : [],
+            'result' : {'type' : 'form',
+                        'arch' : join_form,
+                        'fields' : join_fields,
+                        'state' : [('export', 'Ok','gtk-ok') ]}
+        },
+        'export': {
+            'actions' : [_create_payment_file],
+            'result' : {'type' : 'form',
+                        'arch' : export_form,
+                        'fields' : export_fields,
+                        'state' : [('end', 'Ok','gtk-ok') ]}
+        }
+
+    }
+wizard_payment_file_spain('export_payment_file_spain')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+


Follow ups