← Back to team overview

openobject-italia-core-devs team mailing list archive

[Merge] lp:~lopez.eliumara/openobject-italia/riba into lp:openobject-italia

 

Eliumara Lopez has proposed merging lp:~lopez.eliumara/openobject-italia/riba into lp:openobject-italia.

Requested reviews:
  OpenERP Italia core devs (openobject-italia-core-devs)

For more details, see:
https://code.launchpad.net/~lopez.eliumara/openobject-italia/riba/+merge/77180
-- 
https://code.launchpad.net/~lopez.eliumara/openobject-italia/riba/+merge/77180
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~lopez.eliumara/openobject-italia/riba into lp:openobject-italia.
=== added directory 'riba_issue'
=== added file 'riba_issue/.account_move_line.py.kate-swp'
Binary files riba_issue/.account_move_line.py.kate-swp	1970-01-01 00:00:00 +0000 and riba_issue/.account_move_line.py.kate-swp	2011-09-27 15:07:36 +0000 differ
=== added file 'riba_issue/__init__.py'
--- riba_issue/__init__.py	1970-01-01 00:00:00 +0000
+++ riba_issue/__init__.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+#----------------------------------------------------------
+# Init Sales
+#----------------------------------------------------------
+
+import riba_issue
+import wizard
+import account_move_line
+import account_invoice
+#import report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/__openerp__.py'
--- riba_issue/__openerp__.py	1970-01-01 00:00:00 +0000
+++ riba_issue/__openerp__.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    "name": "RiBa Issue",
+    "version": "0.1",
+    "author": "OpenERP Italian Community",
+    "category": "Localisation/Italy",
+    "website": "http://www.openerp-italia.org";,
+    "description": """Module to manage RiBa issue.
+=================================
+
+This module provides :
+----------------------
+* a more efficient way to manage RiBa issue.
+* a basic mechanism to easily plug various automated issue.
+    """,
+    'images': ['images/riba_mode.jpeg','images/riba_issue.jpeg'],
+    'depends': ['account','account_voucher'],
+    'init_xml': [],
+    'update_xml': ['wizard/riba_issue_pay_view.xml',
+                   'wizard/riba_issue_populate_statement_view.xml',
+                   'wizard/riba_issue_order_view.xml',
+                   'account_invoice_view.xml',
+                   'riba_issue_view.xml',
+                   'account_riba_report.xml',
+                   ],
+    'demo_xml': [],
+    'test': [],
+    'installable': True,
+    'active': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/account_invoice.py'
--- riba_issue/account_invoice.py	1970-01-01 00:00:00 +0000
+++ riba_issue/account_invoice.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,53 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from datetime import datetime
+
+from osv import fields, osv
+
+class Invoice(osv.osv):
+    _inherit = 'account.invoice'
+
+    def _amount_to_pay(self, cursor, user, ids, name, args, context=None):
+        '''Return the amount still to pay regarding all the Riba orders'''
+        if not ids:
+            return {}
+        res = {}
+        for invoice in self.browse(cursor, user, ids, context=context):
+            res[invoice.id] = 0.0
+            if invoice.move_id:
+                for line in invoice.move_id.line_id:
+                    if not line.date_maturity or \
+                            datetime.strptime(line.date_maturity, '%Y-%m-%d') \
+                            < datetime.today():
+                        res[invoice.id] += line.amount_to_pay
+        return res
+
+    _columns = {
+        'amount_to_pay': fields.function(_amount_to_pay, method=True,
+            type='float', string='Amount to be paid',
+            help='The amount which should be paid at the current date\n' \
+                    'minus the amount which is already in riba order'),
+    }
+
+Invoice()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/account_invoice_view.xml'
--- riba_issue/account_invoice_view.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/account_invoice_view.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="invoice_form" model="ir.ui.view">
+            <field name="name">account.invoice.form.inherit</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="before">
+                    <field name="amount_to_pay"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

=== added file 'riba_issue/account_move_line.py'
--- riba_issue/account_move_line.py	1970-01-01 00:00:00 +0000
+++ riba_issue/account_move_line.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,118 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#
+#    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 operator import itemgetter
+from osv import fields, osv
+from tools.translate import _
+
+class account_move_line(osv.osv):
+    _inherit = "account.move.line"
+
+    def amount_to_pay(self, cr, uid, ids, name, arg={}, context=None):
+        """ Return the amount still to pay regarding all the riba orders
+        (excepting cancelled orders)"""
+        if not ids:
+            return {}
+        cr.execute("""SELECT ml.id,
+                    CASE WHEN ml.amount_currency < 0
+                        THEN - ml.amount_currency
+                        ELSE ml.debit
+                    END -
+                    (SELECT coalesce(sum(amount_currency),0)
+                        FROM riba_line rl
+                            INNER JOIN riba_order ro
+                                ON (rl.order_id = ro.id)
+                        WHERE move_line_id = ml.id
+                        AND ro.state != 'cancel') AS amount
+                    FROM account_move_line ml
+                    WHERE id IN %s""", (tuple(ids),))
+        r = dict(cr.fetchall())
+        return r
+
+    def _to_pay_search(self, cr, uid, obj, name, args, context=None):
+        if not args:
+            return []
+        line_obj = self.pool.get('account.move.line')
+        query = line_obj._query_get(cr, uid, context={})
+        where = ' and '.join(map(lambda x: '''(SELECT
+        CASE WHEN l.amount_currency < 0
+            THEN - l.amount_currency
+            ELSE l.debit
+        END - coalesce(sum(rl.amount_currency), 0)
+        FROM riba_line rl
+        INNER JOIN riba_order ro ON (rl.order_id = ro.id)
+        WHERE move_line_id = l.id
+        AND ro.state != 'cancel'
+        ) %(operator)s %%s ''' % {'operator': x[1]}, args))
+        sql_args = tuple(map(itemgetter(2), args))
+
+        cr.execute(('''SELECT id
+            FROM account_move_line l
+            WHERE account_id IN (select id
+                FROM account_account
+                WHERE type=%s AND active)
+            AND reconcile_id IS null
+            AND debit > 0
+            AND ''' + where + ' and ' + query), ('liquidity',)+sql_args )
+        res = cr.fetchall()
+        if not res:
+            return [('id', '=', '0')]
+        return [('id', 'in', map(lambda x:x[0], res))]
+
+    def line2bank(self, cr, uid, ids, payment_type=None, context=None):
+        """
+        Try to return for each Ledger Posting line a corresponding bank
+        account according to the payment type.  This work using one of
+        the bank of the partner defined on the invoice eventually
+        associated to the line.
+        Return the first suitable bank for the corresponding partner.
+        """
+        riba_mode_obj = self.pool.get('riba.mode')
+        line2bank = {}
+        if not ids:
+            return {}
+        bank_type = riba_mode_obj.suitable_bank_types(cr, uid, payment_type,
+                context=context)
+        for line in self.browse(cr, uid, ids, context=context):
+            line2bank[line.id] = False
+            if line.invoice and line.invoice.partner_bank_id:
+                line2bank[line.id] = line.invoice.partner_bank_id.id
+            elif line.partner_id:
+                if not line.partner_id.bank_ids:
+                    line2bank[line.id] = False
+                else:
+                    for bank in line.partner_id.bank_ids:
+                        if bank.state in bank_type:
+                            line2bank[line.id] = bank.id
+                            break
+                if line.id not in line2bank and line.partner_id.bank_ids:
+                    line2bank[line.id] = line.partner_id.bank_ids[0].id
+            else:
+                raise osv.except_osv(_('Error !'), _('No partner defined on entry line'))
+        return line2bank
+
+    _columns = {
+        'amount_to_pay': fields.function(amount_to_pay, method=True,
+            type='float', string='Amount to pay', fnct_search=_to_pay_search),
+    }
+
+account_move_line()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/account_payment_sequence.xml'
--- riba_issue/account_payment_sequence.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/account_payment_sequence.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+        <record forcecreate="1" id="seq_type_payment_order" model="ir.sequence.type">
+            <field name="name">RiBa order</field>
+            <field name="code">riba.order</field>
+        </record>
+        
+        <record forcecreate="1" id="seq_payment_order" model="ir.sequence">
+            <field name="name">RiBa order</field>
+            <field name="code">riba.order</field>
+            <field eval="3" name="padding"/>
+            <field name="prefix">%(year)s/</field>
+        </record>
+        
+        <record forcecreate="1" id="seq_type_payment_line" model="ir.sequence.type">
+            <field name="name">RiBa Line</field>
+            <field name="code">riba.line</field>
+        </record>
+        
+        <record forcecreate="1" id="seq_payment_line" model="ir.sequence">
+            <field name="name">RiBa Line</field>
+            <field name="code">riba.line</field>
+            <field name="prefix"/>
+            <field name="padding">3</field>
+        </record>
+        
+    </data>
+</openerp>

=== added file 'riba_issue/account_riba_report.xml'
--- riba_issue/account_riba_report.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/account_riba_report.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <report auto="True" id="riba_order1" model="riba.order" name="riba.order" rml="riba_issue/report/order.rml" string="RiBa Order"/>
+    </data>
+</openerp>

=== added file 'riba_issue/account_riba_workflow.xml'
--- riba_issue/account_riba_workflow.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/account_riba_workflow.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="wkf_riba_order" model="workflow">
+            <field name="name">RiBa Order Workflow</field>
+            <field name="osv">riba.order</field>
+            <field name="on_create">True</field>
+        </record>
+        <!--Activity -->
+        <record id="act_draft" model="workflow.activity">
+            <field name="name">draft</field>
+            <field name="wkf_id" ref="wkf_riba_order"/>
+            <field name="flow_start">True</field>
+            <field name="action">write({'state':'draft'})</field>
+            <field name="kind">function</field>
+        </record>
+        <record id="act_open" model="workflow.activity">
+            <field name="name">open</field>
+            <field name="wkf_id" ref="wkf_riba_order"/>
+            <field name="action">action_open()
+write({'state':'open'})</field>
+            <field name="kind">function</field>
+        </record>
+        <record id="act_done" model="workflow.activity">
+            <field name="name">done</field>
+            <field name="wkf_id" ref="wkf_riba_order"/>
+            <field name="action">write({'state':'done'})</field>
+            <field name="kind">function</field>
+            <field name="flow_stop">True</field>
+        </record>
+        <record id="act_cancel" model="workflow.activity">
+            <field name="name">cancel</field>
+            <field name="wkf_id" ref="wkf_riba_order"/>
+            <field name="action">write({'state':'cancel'})</field>
+            <field name="kind">function</field>
+            <field name="flow_stop">True</field>
+        </record>
+
+        <!-- Transition -->
+        <record id="trans_draft_open" model="workflow.transition">
+            <field name="act_from" ref="act_draft"/>
+            <field name="act_to" ref="act_open"/>
+            <field name="signal">open</field>
+        </record>
+
+        <record id="trans_open_done" model="workflow.transition">
+            <field name="act_from" ref="act_open"/>
+            <field name="act_to" ref="act_done"/>
+            <field name="signal">done</field>
+        </record>
+        <record id="trans_draft_cancel" model="workflow.transition">
+            <field name="act_from" ref="act_draft"/>
+            <field name="act_to" ref="act_cancel"/>
+            <field name="signal">cancel</field>
+        </record>
+        <record id="trans_open_cancel" model="workflow.transition">
+            <field name="act_from" ref="act_open"/>
+            <field name="act_to" ref="act_cancel"/>
+            <field name="signal">cancel</field>
+        </record>
+
+    </data>
+</openerp>

=== added directory 'riba_issue/i18n'
=== added file 'riba_issue/i18n/it.po'
--- riba_issue/i18n/it.po	1970-01-01 00:00:00 +0000
+++ riba_issue/i18n/it.po	2011-09-27 15:07:36 +0000
@@ -0,0 +1,790 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0dev\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-01-11 11:14+0000\n"
+"PO-Revision-Date: 2011-01-13 01:14+0000\n"
+"Last-Translator: Nicola Riolini - Micronaet <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-01-15 05:33+0000\n"
+"X-Generator: Launchpad (build 12177)\n"
+
+#. module: account_payment
+#: field:payment.order,date_scheduled:0
+msgid "Scheduled date if fixed"
+msgstr "Data prevista se fissata"
+
+#. module: account_payment
+#: field:payment.line,currency:0
+msgid "Partner Currency"
+msgstr "Valuta del Partner"
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Set to draft"
+msgstr "Imposta a Bozza"
+
+#. module: account_payment
+#: help:payment.order,mode:0
+msgid "Select the Payment Mode to be applied."
+msgstr "Selezionare la modalità di pagamento da applicare"
+
+#. module: account_payment
+#: view:payment.mode:0
+#: view:payment.order:0
+msgid "Group By..."
+msgstr "Raggruppa per..."
+
+#. module: account_payment
+#: model:ir.module.module,description:account_payment.module_meta_information
+msgid ""
+"\n"
+"This module provides :\n"
+"* a more efficient way to manage invoice payment.\n"
+"* a basic mechanism to easily plug various automated payment.\n"
+"    "
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,line_ids:0
+msgid "Payment lines"
+msgstr "Riga pagamento"
+
+#. module: account_payment
+#: view:payment.line:0
+#: field:payment.line,info_owner:0
+#: view:payment.order:0
+msgid "Owner Account"
+msgstr "Titolare del conto"
+
+#. module: account_payment
+#: help:payment.order,state:0
+msgid ""
+"When an order is placed the state is 'Draft'.\n"
+" Once the bank is confirmed the state is set to 'Confirmed'.\n"
+" Then the order is paid the state is 'Done'."
+msgstr ""
+
+#. module: account_payment
+#: help:account.invoice,amount_to_pay:0
+msgid ""
+"The amount which should be paid at the current date\n"
+"minus the amount which is already in payment order"
+msgstr ""
+"Differenza tra l'importo da pagare\n"
+"e l'importo dell'ordine di pagamento"
+
+#. module: account_payment
+#: field:payment.mode,company_id:0
+msgid "Company"
+msgstr "Azienda"
+
+#. module: account_payment
+#: field:payment.order,date_prefered:0
+msgid "Preferred date"
+msgstr "Data preferita"
+
+#. module: account_payment
+#: selection:payment.line,state:0
+msgid "Free"
+msgstr "Libero"
+
+#. module: account_payment
+#: field:payment.order.create,entries:0
+msgid "Entries"
+msgstr "Movimenti"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Used Account"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,ml_maturity_date:0
+#: field:payment.order.create,duedate:0
+msgid "Due Date"
+msgstr "Data di scadenza"
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "You can not create move line on closed account."
+msgstr ""
+
+#. module: account_payment
+#: view:account.move.line:0
+msgid "Account Entry Line"
+msgstr "Registrazione contabile"
+
+#. module: account_payment
+#: view:payment.order.create:0
+msgid "_Add to payment order"
+msgstr "_Aggiungi all'ordine di pagamento"
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_account_payment_populate_statement
+#: model:ir.actions.act_window,name:account_payment.action_account_populate_statement_confirm
+msgid "Payment Populate statement"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+#: view:payment.order:0
+msgid "Amount"
+msgstr "Importo"
+
+#. module: account_payment
+#: sql_constraint:account.move.line:0
+msgid "Wrong credit or debit value in accounting entry !"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Total in Company Currency"
+msgstr "Totale nella valuta dell'azienda"
+
+#. module: account_payment
+#: selection:payment.order,state:0
+msgid "Cancelled"
+msgstr "Annullato"
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
+msgid "New Payment Order"
+msgstr "Nuovo ordine di pagamento"
+
+#. module: account_payment
+#: report:payment.order:0
+#: field:payment.order,reference:0
+msgid "Reference"
+msgstr "Riferimento"
+
+#. module: account_payment
+#: sql_constraint:payment.line:0
+msgid "The payment line name must be unique!"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
+#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_form
+msgid "Payment Orders"
+msgstr "Ordini di pagamento"
+
+#. module: account_payment
+#: selection:payment.order,date_prefered:0
+msgid "Directly"
+msgstr "Direttamente"
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
+#: model:ir.model,name:account_payment.model_payment_line
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Payment Line"
+msgstr "Riga pagamento"
+
+#. module: account_payment
+#: view:payment.line:0
+msgid "Amount Total"
+msgstr "Importo totale"
+
+#. module: account_payment
+#: view:payment.order:0
+#: selection:payment.order,state:0
+msgid "Confirmed"
+msgstr "Confermato"
+
+#. module: account_payment
+#: help:payment.line,ml_date_created:0
+msgid "Invoice Effective Date"
+msgstr "Data fattura"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Execution Type"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.line,state:0
+msgid "Structured"
+msgstr "Strutturato"
+
+#. module: account_payment
+#: view:payment.order:0
+#: field:payment.order,state:0
+msgid "State"
+msgstr "Stato"
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Transaction Information"
+msgstr "Informazione di transazione"
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_mode_form
+#: model:ir.model,name:account_payment.model_payment_mode
+#: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form
+#: view:payment.mode:0
+#: view:payment.order:0
+msgid "Payment Mode"
+msgstr "Modalità Pagamento"
+
+#. module: account_payment
+#: field:payment.line,ml_date_created:0
+msgid "Effective Date"
+msgstr "Data effettiva"
+
+#. module: account_payment
+#: field:payment.line,ml_inv_ref:0
+msgid "Invoice Ref."
+msgstr "Rif. Fattura"
+
+#. module: account_payment
+#: help:payment.order,date_prefered:0
+msgid ""
+"Choose an option for the Payment Order:'Fixed' stands for a date specified "
+"by you.'Directly' stands for the direct execution.'Due date' stands for the "
+"scheduled date of execution."
+msgstr ""
+
+#. module: account_payment
+#: code:addons/account_payment/account_move_line.py:110
+#, python-format
+msgid "Error !"
+msgstr "Errore !"
+
+#. module: account_payment
+#: view:account.move.line:0
+msgid "Total debit"
+msgstr "Totale debiti"
+
+#. module: account_payment
+#: field:payment.order,date_done:0
+msgid "Execution date"
+msgstr "Data di esecuzione"
+
+#. module: account_payment
+#: help:payment.mode,journal:0
+msgid "Bank or Cash Journal for the Payment Mode"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.order,date_prefered:0
+msgid "Fixed date"
+msgstr "Data fissata"
+
+#. module: account_payment
+#: field:payment.line,info_partner:0
+#: view:payment.order:0
+msgid "Destination Account"
+msgstr "Conto destinazione"
+
+#. module: account_payment
+#: view:payment.line:0
+msgid "Desitination Account"
+msgstr "Conto destinazione"
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Search Payment Orders"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid ""
+"You can not create move line on receivable/payable account without partner"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,create_date:0
+msgid "Created"
+msgstr "Creato"
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Select Invoices to Pay"
+msgstr "Seleziona le fatture da pagare"
+
+#. module: account_payment
+#: view:payment.line:0
+msgid "Currency Amount Total"
+msgstr "Totale corrente"
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Make Payments"
+msgstr "Effettua i pagamenti"
+
+#. module: account_payment
+#: field:payment.line,state:0
+msgid "Communication Type"
+msgstr "Tipo di comunicazione"
+
+#. module: account_payment
+#: model:ir.module.module,shortdesc:account_payment.module_meta_information
+msgid "Payment Management"
+msgstr "Gestione pagamenti"
+
+#. module: account_payment
+#: field:payment.line,bank_statement_line_id:0
+msgid "Bank statement line"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.order,date_prefered:0
+msgid "Due date"
+msgstr "Data di scadenza"
+
+#. module: account_payment
+#: field:account.invoice,amount_to_pay:0
+msgid "Amount to be paid"
+msgstr "Totale da pagare"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Currency"
+msgstr "Valuta"
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+msgid "Yes"
+msgstr "Si"
+
+#. module: account_payment
+#: help:payment.line,info_owner:0
+msgid "Address of the Main Partner"
+msgstr "Indirizzo del partner principale"
+
+#. module: account_payment
+#: help:payment.line,date:0
+msgid ""
+"If no payment date is specified, the bank will treat this payment line "
+"directly"
+msgstr ""
+"Se la data di pagamento non è specificata, la banca tratterà questo "
+"pagamento direttamente"
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_payment_populate_statement
+msgid "Account Payment Populate Statement"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.mode,name:0
+msgid "Mode of Payment"
+msgstr "Modalità di pagamento"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Value Date"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Payment Type"
+msgstr "Tipo di Pagamento"
+
+#. module: account_payment
+#: help:payment.line,amount_currency:0
+msgid "Payment amount in the partner currency"
+msgstr "Importo del pagamento nella valuta del Partner"
+
+#. module: account_payment
+#: view:payment.order:0
+#: selection:payment.order,state:0
+msgid "Draft"
+msgstr "Bozza"
+
+#. module: account_payment
+#: help:payment.line,communication2:0
+msgid "The successor message of Communication."
+msgstr ""
+
+#. module: account_payment
+#: code:addons/account_payment/account_move_line.py:110
+#, python-format
+msgid "No partner defined on entry line"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,info_partner:0
+msgid "Address of the Ordering Customer."
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.populate.statement:0
+msgid "Populate Statement:"
+msgstr ""
+
+#. module: account_payment
+#: view:account.move.line:0
+msgid "Total credit"
+msgstr "Totale crediti"
+
+#. module: account_payment
+#: help:payment.order,date_scheduled:0
+msgid "Select a date if you have chosen Preferred Date to be fixed."
+msgstr ""
+"Seleziona una data se hai scelto che la data preferita deve essere fissata."
+
+#. module: account_payment
+#: field:payment.order,user_id:0
+msgid "User"
+msgstr "Utente"
+
+#. module: account_payment
+#: field:account.payment.populate.statement,lines:0
+#: model:ir.actions.act_window,name:account_payment.act_account_invoice_2_payment_line
+msgid "Payment Lines"
+msgstr "Righe pagamento"
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "Company must be same for its related account and period."
+msgstr ""
+"L'azienda deve essere la stessa per il periodo ed il conto ad essa correlato."
+
+#. module: account_payment
+#: help:payment.line,move_line_id:0
+msgid ""
+"This Entry Line will be referred for the information of the ordering "
+"customer."
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order.create:0
+msgid "Search"
+msgstr "Cerca"
+
+#. module: account_payment
+#: model:ir.actions.report.xml,name:account_payment.payment_order1
+#: model:ir.model,name:account_payment.model_payment_order
+msgid "Payment Order"
+msgstr "Ordine di pagamento"
+
+#. module: account_payment
+#: field:payment.line,date:0
+msgid "Payment Date"
+msgstr "Data di pagamento"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Total:"
+msgstr "Totale:"
+
+#. module: account_payment
+#: field:payment.order,date_created:0
+msgid "Creation date"
+msgstr "Data di creazione"
+
+#. module: account_payment
+#: view:account.payment.populate.statement:0
+msgid "ADD"
+msgstr "Aggiungi"
+
+#. module: account_payment
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr ""
+
+#. module: account_payment
+#: field:account.move.line,amount_to_pay:0
+msgid "Amount to pay"
+msgstr "Totale da pagare"
+
+#. module: account_payment
+#: field:payment.line,amount:0
+msgid "Amount in Company Currency"
+msgstr "Totale in valuta dell'azienda"
+
+#. module: account_payment
+#: help:payment.line,partner_id:0
+msgid "The Ordering Customer"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_payment_make_payment
+msgid "Account make payment"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Invoice Ref"
+msgstr "Rif. fattura"
+
+#. module: account_payment
+#: field:payment.line,name:0
+msgid "Your Reference"
+msgstr "Vostro riferimento"
+
+#. module: account_payment
+#: field:payment.order,mode:0
+msgid "Payment mode"
+msgstr "Modalità di pagamento"
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Payment order"
+msgstr "Ordine di pagamento"
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "General Information"
+msgstr "Informazioni generali"
+
+#. module: account_payment
+#: view:payment.order:0
+#: selection:payment.order,state:0
+msgid "Done"
+msgstr "Fatto"
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_invoice
+msgid "Invoice"
+msgstr "Fattura"
+
+#. module: account_payment
+#: field:payment.line,communication:0
+msgid "Communication"
+msgstr "Comunicazione"
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+#: view:account.payment.populate.statement:0
+#: view:payment.order:0
+#: view:payment.order.create:0
+msgid "Cancel"
+msgstr "Annulla"
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Information"
+msgstr "Informazione"
+
+#. module: account_payment
+#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
+msgid ""
+"A payment order is a payment request from your company to pay a supplier "
+"invoice or a customer credit note. Here you can register all payment orders "
+"that should be done, keep track of all payment orders and mention the "
+"invoice reference and the partner the payment should be done for."
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,amount:0
+msgid "Payment amount in the company currency"
+msgstr "Totale da pagare in valuta dell'azienda"
+
+#. module: account_payment
+#: view:payment.order.create:0
+msgid "Search Payment lines"
+msgstr "Ricerca righe di pagamento"
+
+#. module: account_payment
+#: field:payment.line,amount_currency:0
+msgid "Amount in Partner Currency"
+msgstr "Totale in valuta del Partner"
+
+#. module: account_payment
+#: field:payment.line,communication2:0
+msgid "Communication 2"
+msgstr "Comunicazione 2"
+
+#. module: account_payment
+#: field:payment.line,bank_id:0
+msgid "Destination Bank account"
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+msgid "Are you sure you want to make payment?"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.mode:0
+#: field:payment.mode,journal:0
+msgid "Journal"
+msgstr "Libro Giornale"
+
+#. module: account_payment
+#: field:payment.mode,bank_id:0
+msgid "Bank account"
+msgstr "Conto bancario"
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Confirm Payments"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,company_currency:0
+#: report:payment.order:0
+msgid "Company Currency"
+msgstr "Valuta azienda"
+
+#. module: account_payment
+#: model:ir.ui.menu,name:account_payment.menu_main_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Payment"
+msgstr "Pagamento"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Payment Order / Payment"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,move_line_id:0
+msgid "Entry line"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,communication:0
+msgid ""
+"Used as the message between ordering customer and current company. Depicts "
+"'What do you want to say to the recipient about this order ?'"
+msgstr ""
+"Usato come messaggio tra cliente dell'ordine e azienda corrente. Significa "
+"'Cosa vuoi dire al destinatario in merito a questo ordine?'"
+
+#. module: account_payment
+#: field:payment.mode,name:0
+msgid "Name"
+msgstr "Nome"
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Bank Account"
+msgstr "Conto bancario"
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Entry Information"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_payment_order_create
+msgid "payment.order.create"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,order_id:0
+msgid "Order"
+msgstr "Ordine"
+
+#. module: account_payment
+#: field:payment.order,total:0
+msgid "Total"
+msgstr "Totale"
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+#: model:ir.actions.act_window,name:account_payment.action_account_payment_make_payment
+msgid "Make Payment"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,partner_id:0
+#: report:payment.order:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_create_payment_order
+msgid "Populate Payment"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.mode,bank_id:0
+msgid "Bank Account for the Payment Mode"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "You can not create move line on view account."
+msgstr ""
+
+#~ msgid "Execution date:"
+#~ msgstr "Data esecuzione:"
+
+#~ msgid "Invalid XML for View Architecture!"
+#~ msgstr "XML non valido per Visualizzazione Architettura!"
+
+#~ msgid "_Cancel"
+#~ msgstr "_Annulla"
+
+#~ msgid "Date"
+#~ msgstr "Data"
+
+#~ msgid "Reference:"
+#~ msgstr "Riferimento:"
+
+#~ msgid "Code"
+#~ msgstr "Codice"
+
+#~ msgid ""
+#~ "The Object name must start with x_ and not contain any special character !"
+#~ msgstr ""
+#~ "Il nome dell'oggetto deve iniziare per x_ e non deve contenere caratteri "
+#~ "speciali!"
+
+#~ msgid "Pay"
+#~ msgstr "Paga"
+
+#~ msgid "_Search"
+#~ msgstr "_Cerca"
+
+#~ msgid "Payment type"
+#~ msgstr "Tipo di pagamento"
+
+#~ msgid "_Add"
+#~ msgstr "_Aggiungi"
+
+#~ msgid "Maturity Date"
+#~ msgstr "Data di scadenza"
+
+#~ msgid "Specify the Code for Payment Type"
+#~ msgstr "Specifica il codice per il tipo di pagamento"
+
+#~ msgid "Invalid model name in the action definition."
+#~ msgstr "Nome modello non valido nella definizione dell'azione."
+
+#~ msgid "Payment Orders to Validate"
+#~ msgstr "Ordini di pagamento da convalidare"
+
+#~ msgid "The name of the module must be unique !"
+#~ msgstr "Il nome del modulo deve essere univoco!"
+
+#~ msgid "The certificate ID of the module must be unique !"
+#~ msgstr "L'ID del certificato del modulo deve essere unico !"
+
+#~ msgid "Error ! You can not create recursive Menu."
+#~ msgstr "Errore! Non è possibile creare menu ricorsivi."
+
+#~ msgid "The name of the group must be unique !"
+#~ msgstr "Il nome del gruppo deve essere univoco !"
+
+#~ msgid "Size of the field can never be less than 1 !"
+#~ msgstr "La dimensione del campo non può mai essere minore di 1 !"
+
+#~ msgid "Rules are not supported for osv_memory objects !"
+#~ msgstr "Le regole non sono supportate dagli oggetti osv_memory !"
+
+#~ msgid "Rule must have at least one checked access right !"
+#~ msgstr "La regola deve avere almento un diritto di accesso spuntato!"

=== added file 'riba_issue/i18n/riba_issue.pot'
--- riba_issue/i18n/riba_issue.pot	1970-01-01 00:00:00 +0000
+++ riba_issue/i18n/riba_issue.pot	2011-09-27 15:07:36 +0000
@@ -0,0 +1,696 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* account_payment
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.0.0-rc2\n"
+"Report-Msgid-Bugs-To: support@xxxxxxxxxxx\n"
+"POT-Creation-Date: 2011-01-11 11:14:33+0000\n"
+"PO-Revision-Date: 2011-01-11 11:14:33+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
+#: field:payment.order,date_scheduled:0
+msgid "Scheduled date if fixed"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,currency:0
+msgid "Partner Currency"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Set to draft"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.order,mode:0
+msgid "Select the Payment Mode to be applied."
+msgstr ""
+
+#. module: account_payment
+#: view:payment.mode:0
+#: view:payment.order:0
+msgid "Group By..."
+msgstr ""
+
+#. module: account_payment
+#: model:ir.module.module,description:account_payment.module_meta_information
+msgid "\n"
+"This module provides :\n"
+"* a more efficient way to manage invoice payment.\n"
+"* a basic mechanism to easily plug various automated payment.\n"
+"    "
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,line_ids:0
+msgid "Payment lines"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+#: field:payment.line,info_owner:0
+#: view:payment.order:0
+msgid "Owner Account"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.order,state:0
+msgid "When an order is placed the state is 'Draft'.\n"
+" Once the bank is confirmed the state is set to 'Confirmed'.\n"
+" Then the order is paid the state is 'Done'."
+msgstr ""
+
+#. module: account_payment
+#: help:account.invoice,amount_to_pay:0
+msgid "The amount which should be paid at the current date\n"
+"minus the amount which is already in payment order"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.mode,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,date_prefered:0
+msgid "Preferred date"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.line,state:0
+msgid "Free"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order.create,entries:0
+msgid "Entries"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Used Account"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,ml_maturity_date:0
+#: field:payment.order.create,duedate:0
+msgid "Due Date"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "You can not create move line on closed account."
+msgstr ""
+
+#. module: account_payment
+#: view:account.move.line:0
+msgid "Account Entry Line"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order.create:0
+msgid "_Add to payment order"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_account_payment_populate_statement
+#: model:ir.actions.act_window,name:account_payment.action_account_populate_statement_confirm
+msgid "Payment Populate statement"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+#: view:payment.order:0
+msgid "Amount"
+msgstr ""
+
+#. module: account_payment
+#: sql_constraint:account.move.line:0
+msgid "Wrong credit or debit value in accounting entry !"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Total in Company Currency"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.order,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
+msgid "New Payment Order"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+#: field:payment.order,reference:0
+msgid "Reference"
+msgstr ""
+
+#. module: account_payment
+#: sql_constraint:payment.line:0
+msgid "The payment line name must be unique!"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
+#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_form
+msgid "Payment Orders"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.order,date_prefered:0
+msgid "Directly"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
+#: model:ir.model,name:account_payment.model_payment_line
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Payment Line"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+msgid "Amount Total"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+#: selection:payment.order,state:0
+msgid "Confirmed"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,ml_date_created:0
+msgid "Invoice Effective Date"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Execution Type"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.line,state:0
+msgid "Structured"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+#: field:payment.order,state:0
+msgid "State"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Transaction Information"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_payment_mode_form
+#: model:ir.model,name:account_payment.model_payment_mode
+#: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form
+#: view:payment.mode:0
+#: view:payment.order:0
+msgid "Payment Mode"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,ml_date_created:0
+msgid "Effective Date"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,ml_inv_ref:0
+msgid "Invoice Ref."
+msgstr ""
+
+#. module: account_payment
+#: help:payment.order,date_prefered:0
+msgid "Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."
+msgstr ""
+
+#. module: account_payment
+#: code:addons/account_payment/account_move_line.py:110
+#, python-format
+msgid "Error !"
+msgstr ""
+
+#. module: account_payment
+#: view:account.move.line:0
+msgid "Total debit"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,date_done:0
+msgid "Execution date"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.mode,journal:0
+msgid "Bank or Cash Journal for the Payment Mode"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.order,date_prefered:0
+msgid "Fixed date"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,info_partner:0
+#: view:payment.order:0
+msgid "Destination Account"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+msgid "Desitination Account"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Search Payment Orders"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "You can not create move line on receivable/payable account without partner"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,create_date:0
+msgid "Created"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Select Invoices to Pay"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+msgid "Currency Amount Total"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Make Payments"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,state:0
+msgid "Communication Type"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.module.module,shortdesc:account_payment.module_meta_information
+msgid "Payment Management"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,bank_statement_line_id:0
+msgid "Bank statement line"
+msgstr ""
+
+#. module: account_payment
+#: selection:payment.order,date_prefered:0
+msgid "Due date"
+msgstr ""
+
+#. module: account_payment
+#: field:account.invoice,amount_to_pay:0
+msgid "Amount to be paid"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Currency"
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+msgid "Yes"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,info_owner:0
+msgid "Address of the Main Partner"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,date:0
+msgid "If no payment date is specified, the bank will treat this payment line directly"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_payment_populate_statement
+msgid "Account Payment Populate Statement"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.mode,name:0
+msgid "Mode of Payment"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Value Date"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Payment Type"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,amount_currency:0
+msgid "Payment amount in the partner currency"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+#: selection:payment.order,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,communication2:0
+msgid "The successor message of Communication."
+msgstr ""
+
+#. module: account_payment
+#: code:addons/account_payment/account_move_line.py:110
+#, python-format
+msgid "No partner defined on entry line"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,info_partner:0
+msgid "Address of the Ordering Customer."
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.populate.statement:0
+msgid "Populate Statement:"
+msgstr ""
+
+#. module: account_payment
+#: view:account.move.line:0
+msgid "Total credit"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.order,date_scheduled:0
+msgid "Select a date if you have chosen Preferred Date to be fixed."
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: account_payment
+#: field:account.payment.populate.statement,lines:0
+#: model:ir.actions.act_window,name:account_payment.act_account_invoice_2_payment_line
+msgid "Payment Lines"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "Company must be same for its related account and period."
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,move_line_id:0
+msgid "This Entry Line will be referred for the information of the ordering customer."
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order.create:0
+msgid "Search"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.report.xml,name:account_payment.payment_order1
+#: model:ir.model,name:account_payment.model_payment_order
+msgid "Payment Order"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,date:0
+msgid "Payment Date"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Total:"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,date_created:0
+msgid "Creation date"
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.populate.statement:0
+msgid "ADD"
+msgstr ""
+
+#. module: account_payment
+#: view:account.bank.statement:0
+msgid "Import payment lines"
+msgstr ""
+
+#. module: account_payment
+#: field:account.move.line,amount_to_pay:0
+msgid "Amount to pay"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,amount:0
+msgid "Amount in Company Currency"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,partner_id:0
+msgid "The Ordering Customer"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_payment_make_payment
+msgid "Account make payment"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Invoice Ref"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,name:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,mode:0
+msgid "Payment mode"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Payment order"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "General Information"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+#: selection:payment.order,state:0
+msgid "Done"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,communication:0
+msgid "Communication"
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+#: view:account.payment.populate.statement:0
+#: view:payment.order:0
+#: view:payment.order.create:0
+msgid "Cancel"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Information"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
+msgid "A payment order is a payment request from your company to pay a supplier invoice or a customer credit note. Here you can register all payment orders that should be done, keep track of all payment orders and mention the invoice reference and the partner the payment should be done for."
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,amount:0
+msgid "Payment amount in the company currency"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order.create:0
+msgid "Search Payment lines"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,amount_currency:0
+msgid "Amount in Partner Currency"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,communication2:0
+msgid "Communication 2"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,bank_id:0
+msgid "Destination Bank account"
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+msgid "Are you sure you want to make payment?"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.mode:0
+#: field:payment.mode,journal:0
+msgid "Journal"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.mode,bank_id:0
+msgid "Bank account"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.order:0
+msgid "Confirm Payments"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,company_currency:0
+#: report:payment.order:0
+msgid "Company Currency"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.ui.menu,name:account_payment.menu_main_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Payment"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Payment Order / Payment"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,move_line_id:0
+msgid "Entry line"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.line,communication:0
+msgid "Used as the message between ordering customer and current company. Depicts 'What do you want to say to the recipient about this order ?'"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.mode,name:0
+msgid "Name"
+msgstr ""
+
+#. module: account_payment
+#: report:payment.order:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: account_payment
+#: view:payment.line:0
+#: view:payment.order:0
+msgid "Entry Information"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.model,name:account_payment.model_payment_order_create
+msgid "payment.order.create"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,order_id:0
+msgid "Order"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.order,total:0
+msgid "Total"
+msgstr ""
+
+#. module: account_payment
+#: view:account.payment.make.payment:0
+#: model:ir.actions.act_window,name:account_payment.action_account_payment_make_payment
+msgid "Make Payment"
+msgstr ""
+
+#. module: account_payment
+#: field:payment.line,partner_id:0
+#: report:payment.order:0
+msgid "Partner"
+msgstr ""
+
+#. module: account_payment
+#: model:ir.actions.act_window,name:account_payment.action_create_payment_order
+msgid "Populate Payment"
+msgstr ""
+
+#. module: account_payment
+#: help:payment.mode,bank_id:0
+msgid "Bank Account for the Payment Mode"
+msgstr ""
+
+#. module: account_payment
+#: constraint:account.move.line:0
+msgid "You can not create move line on view account."
+msgstr ""
+

=== added directory 'riba_issue/images'
=== added file 'riba_issue/images/payment_mode.jpeg'
Binary files riba_issue/images/payment_mode.jpeg	1970-01-01 00:00:00 +0000 and riba_issue/images/payment_mode.jpeg	2011-09-27 15:07:36 +0000 differ
=== added directory 'riba_issue/images/report'
=== added file 'riba_issue/images/report/__init__.py'
--- riba_issue/images/report/__init__.py	1970-01-01 00:00:00 +0000
+++ riba_issue/images/report/__init__.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import riba_issue
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/images/report/riba.rml'
--- riba_issue/images/report/riba.rml	1970-01-01 00:00:00 +0000
+++ riba_issue/images/report/riba.rml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,264 @@
+<?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="34.0" y1="34.0" width="527" height="774"/>
+    </pageTemplate>
+  </template>
+  <stylesheet>
+    <blockTableStyle id="Standard_Outline">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table1">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table6">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table7">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table3">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table4">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table5">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+      <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+    </blockTableStyle>
+    <initialize>
+      <paraStyle name="all" alignment="justify"/>
+    </initialize>
+    <paraStyle name="Standard" fontName="Helvetica"/>
+    <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+    <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+    <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="Index" fontName="Helvetica"/>
+    <paraStyle name="Table Contents" fontName="Helvetica"/>
+    <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
+    <paraStyle name="Footer" fontName="Helvetica"/>
+    <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+    <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_space_0.2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <images/>
+  </stylesheet>
+  <story>
+    <para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="318.0,210.0" style="Table1">
+      <tr>
+        <td>
+          <para style="terp_default_9">
+            <font color="white"> </font>
+          </para>
+        </td>
+        <td>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or removeParentNode('para')]]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or removeParentNode('para') ]]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']]</para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+    <para style="terp_header">RiBa Issue / Issue</para>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="106.0,106.0,106.0,106.0,106.0" style="Table6">
+      <tr>
+        <td>
+          <para style="terp_tblheader_General_Centre">Payment Type</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Reference</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Used Account</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Execution Type</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Company Currency</para>
+        </td>
+      </tr>
+    </blockTable>
+    <blockTable colWidths="106.0,106.0,106.0,106.0,106.0" style="Table7">
+      <tr>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.mode and o.mode.name or '-' ]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.reference or '-' ]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[get_account_name(o.mode.bank_id.id)]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.date_prefered == 'now' and 'Now' or removeParentNode('para') ]]</para>
+          <para style="terp_default_Centre_8">[[ o.date_prefered == 'due' and 'Due date' or removeParentNode('para') ]]</para>
+          <para style="terp_default_Centre_8">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[ get_company_currency() ]]</para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="terp_default_9">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="112.0,86.0,102.0,70.0,82.0,75.0" style="Table3">
+      <tr>
+        <td>
+          <para style="terp_tblheader_Details">Partner</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Bank Account</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Invoice Ref</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Value Date</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Right">Amount</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Right">Currency</para>
+        </td>
+      </tr>
+    </blockTable>
+    <section>
+      <para style="terp_default_2">[[repeatIn(o.line_ids, 'line') ]]</para>
+      <blockTable colWidths="112.0,86.0,102.0,70.0,82.0,75.0" style="Table4">
+        <tr>
+          <td>
+            <para style="terp_default_9">[[line.partner_id and line.partner_id.name or '-' ]]</para>
+          </td>
+          <td>
+            <para style="terp_default_Centre_9">[[get_account_name(line.bank_id.id) or '-']]</para>
+          </td>
+          <td>
+            <para style="terp_default_Centre_9">[[ get_invoice_name(line.ml_inv_ref.id) or '-' ]]</para>
+          </td>
+          <td>
+            <para style="terp_default_Centre_9">[[line.date=='False' and '-' or formatLang(line.date,date=True) ]]</para>
+          </td>
+          <td>
+            <para style="terp_default_Right_9">[[formatLang(line.amount) or '-' ]] [[get_company_currency_symbol()]] </para>
+          </td>
+          <td>
+            <para style="terp_default_Right_9">[[ formatLang(line.amount_currency) ]] [[ line.currency.symbol]] </para>
+          </td>
+        </tr>
+      </blockTable>
+    </section>
+    <blockTable colWidths="335.0,32.0,85.0,75.0" style="Table5">
+      <tr>
+        <td>
+          <para style="terp_default_9">
+            <font color="white"> </font>
+          </para>
+        </td>
+        <td>
+          <para style="terp_default_Bold_9">Total:</para>
+        </td>
+        <td>
+          <para style="terp_default_Right_9">[[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] </para>
+        </td>
+        <td>
+          <para style="terp_default_Right_9">[[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[get_company_currency_symbol()]] </para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+  </story>
+</document>

=== added file 'riba_issue/images/report/riba.sxw'
Binary files riba_issue/images/report/riba.sxw	1970-01-01 00:00:00 +0000 and riba_issue/images/report/riba.sxw	2011-09-27 15:07:36 +0000 differ
=== added file 'riba_issue/images/report/riba_issue.py'
--- riba_issue/images/report/riba_issue.py	1970-01-01 00:00:00 +0000
+++ riba_issue/images/report/riba_issue.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,90 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+
+import pooler
+from report import report_sxw
+
+class riba_issue(report_sxw.rml_parse):
+
+    def __init__(self, cr, uid, name, context=None):
+        super(riba_issue, self).__init__(cr, uid, name, context=context)
+        self.localcontext.update( {
+            'time': time,
+            'get_invoice_name': self._get_invoice_name,
+            'get_company_currency': self._get_company_currency,
+            'get_company_currency_symbol': self._get_company_currency_symbol,
+            'get_amount_total_in_currency': self._get_amount_total_in_currency,
+            'get_amount_total': self._get_amount_total,
+            'get_account_name': self._get_account_name,
+        })
+
+    def _get_invoice_name(self, invoice_id):
+        if invoice_id:
+            pool = pooler.get_pool(self.cr.dbname)
+            value_name = pool.get('account.invoice').name_get(self.cr, self.uid, [invoice_id])
+            if value_name:
+                return value_name[0][1]
+        return False
+
+    def _get_amount_total_in_currency(self, payment):
+        total = 0.0
+        if payment.line_ids:
+            currency_cmp = payment.line_ids[0].currency.id
+        else:
+            return False
+        for line in payment.line_ids:
+            if currency_cmp == line.currency.id:
+                total += line.amount_currency
+            else:
+                return False
+        return total
+
+    def _get_amount_total(self, payment):
+        total = 0.0
+        if not payment.line_ids:
+            return False
+        for line in payment.line_ids:
+            total += line.amount
+        return total
+
+    def _get_company_currency(self):
+        pool = pooler.get_pool(self.cr.dbname)
+        user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
+        return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
+
+    def _get_company_currency_symbol(self):
+        pool = pooler.get_pool(self.cr.dbname)
+        user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
+        return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
+
+    def _get_account_name(self,bank_id):
+        if bank_id:
+            pool = pooler.get_pool(self.cr.dbname)
+            value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
+            if value_name:
+                return value_name[0][1]
+        return False
+
+report_sxw.report_sxw('report.riba.issue', 'riba.issue', 'addons/account_payment/report/riba_issue.rml', parser=riba_issue, header="external")
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/images/riba_issue.jpeg'
Binary files riba_issue/images/riba_issue.jpeg	1970-01-01 00:00:00 +0000 and riba_issue/images/riba_issue.jpeg	2011-09-27 15:07:36 +0000 differ
=== added directory 'riba_issue/report'
=== added file 'riba_issue/report/__init__.py'
--- riba_issue/report/__init__.py	1970-01-01 00:00:00 +0000
+++ riba_issue/report/__init__.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import riba_order
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/report/order.rml'
--- riba_issue/report/order.rml	1970-01-01 00:00:00 +0000
+++ riba_issue/report/order.rml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,290 @@
+<?xml version="1.0"?>
+<document filename="RiBa Order.pdf">
+  <template pageSize="(595.0,842.0)" title="RiBa Order" author="OpenERP S.A. (sales@xxxxxxxxxxx)" allowSplitting="20">
+    <pageTemplate id="first">
+      <frame id="first" x1="34.0" y1="34.0" width="527" height="774"/>
+    </pageTemplate>
+  </template>
+  <stylesheet>
+    <blockTableStyle id="Standard_Outline">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table1">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table6">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table7">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table3">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table4">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
+      <lineStyle kind="LINEBELOW" colorName="#cccccc" start="5,-1" stop="5,-1"/>
+    </blockTableStyle>
+    <blockTableStyle id="Table5">
+      <blockAlignment value="LEFT"/>
+      <blockValign value="TOP"/>
+      <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
+      <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
+      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
+      <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
+      <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
+    </blockTableStyle>
+    <initialize>
+      <paraStyle name="all" alignment="justify"/>
+    </initialize>
+    <paraStyle name="Standard" fontName="Helvetica"/>
+    <paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+    <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+    <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="Index" fontName="Helvetica"/>
+    <paraStyle name="Table Contents" fontName="Helvetica"/>
+    <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
+    <paraStyle name="Footer" fontName="Helvetica"/>
+    <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+    <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
+    <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_Space" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="9.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_space_0.2" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
+    <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
+    <images/>
+  </stylesheet>
+  <story>
+  <pto>
+  <pto_header>
+    <blockTable colWidths="112.0,86.0,106.0,63.0,85.0,75.0" style="Table3">
+      <tr>
+        <td>
+          <para style="terp_tblheader_Details">Partner</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Bank Account</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Invoice Ref</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Value Date</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Right">Amount</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Right">Currency</para>
+        </td>
+      </tr>
+    </blockTable>
+  </pto_header>
+    <para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="318.0,210.0" style="Table1">
+      <tr>
+        <td>
+          <para style="terp_default_9">
+            <font color="white"> </font>
+          </para>
+        </td>
+        <td>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or removeParentNode('para')]]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or removeParentNode('para') ]]</para>
+          <para style="terp_default_address">[[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']]</para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+    <para style="terp_header">RiBa Order / Payment</para>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="106.0,106.0,106.0,106.0,106.0" style="Table6">
+      <tr>
+        <td>
+          <para style="terp_tblheader_General_Centre">Payment Type</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Reference</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Used Account</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Execution Type</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_General_Centre">Company Currency</para>
+        </td>
+      </tr>
+    </blockTable>
+    <blockTable colWidths="106.0,106.0,106.0,106.0,106.0" style="Table7">
+      <tr>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.mode and o.mode.name or '-' ]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.reference or '-' ]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[get_account_name(o.mode.bank_id.id)]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.date_prefered == 'now' and 'Now' or removeParentNode('para') ]]</para>
+          <para style="terp_default_Centre_8">[[ o.date_prefered == 'due' and 'Due date' or removeParentNode('para') ]]</para>
+          <para style="terp_default_Centre_8">[[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]]</para>
+        </td>
+        <td>
+          <para style="terp_default_Centre_8">[[ o.user_id and o.user_id.company_id and o.user_id.company_id.currency_id and o.user_id.company_id.currency_id.name or '' ]]</para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="terp_default_9">
+      <font color="white"> </font>
+    </para>
+    <blockTable colWidths="112.0,86.0,102.0,70.0,82.0,75.0" style="Table3">
+      <tr>
+        <td>
+          <para style="terp_tblheader_Details">Partner</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Bank Account</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Invoice Ref</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Centre">Value Date</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Right">Amount</para>
+        </td>
+        <td>
+          <para style="terp_tblheader_Details_Right">Currency</para>
+        </td>
+      </tr>
+    </blockTable>
+    <section>
+      <para style="terp_default_2">[[repeatIn(o.line_ids, 'line') ]]</para>
+      <blockTable colWidths="112.0,86.0,102.0,70.0,82.0,75.0" style="Table4">
+        <tr>
+          <td>
+            <para style="terp_default_9">[[line.partner_id and line.partner_id.name or '-' ]]</para>
+          </td>
+          <td>
+            <para style="terp_default_Centre_9">[[get_account_name(line.bank_id.id) or '-']]</para>
+          </td>
+          <td>
+            <para style="terp_default_Centre_9">[[ get_invoice_name(line.ml_inv_ref.id) or '-' ]]</para>
+          </td>
+          <td>
+            <para style="terp_default_Centre_9">[[line.date=='False' and '-' or formatLang(line.date,date=True) ]]</para>
+          </td>
+          <td>
+            <para style="terp_default_Right_9">[[formatLang(line.amount) or '-' ]] [[get_company_currency_symbol()]] </para>
+          </td>
+          <td>
+            <para style="terp_default_Right_9">[[ formatLang(line.amount_currency) ]] [[ line.currency.symbol]] </para>
+          </td>
+        </tr>
+      </blockTable>
+    </section>
+    <blockTable colWidths="335.0,32.0,85.0,75.0" style="Table5">
+      <tr>
+        <td>
+          <para style="terp_default_9">
+            <font color="white"> </font>
+          </para>
+        </td>
+        <td>
+          <para style="terp_default_Bold_9">Total:</para>
+        </td>
+        <td>
+          <para style="terp_default_Right_9">[[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] </para>
+        </td>
+        <td>
+          <para style="terp_default_Right_9">[[ formatLang(get_amount_total_in_currency(o)) or '' ]] [[get_company_currency_symbol()]] </para>
+        </td>
+      </tr>
+    </blockTable>
+    <para style="terp_default_8">
+      <font color="white"> </font>
+    </para>
+  </pto>
+  </story>
+</document>

=== added file 'riba_issue/report/order.sxw'
Binary files riba_issue/report/order.sxw	1970-01-01 00:00:00 +0000 and riba_issue/report/order.sxw	2011-09-27 15:07:36 +0000 differ
=== added file 'riba_issue/report/riba_order.py'
--- riba_issue/report/riba_order.py	1970-01-01 00:00:00 +0000
+++ riba_issue/report/riba_order.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,90 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+
+import pooler
+from report import report_sxw
+
+class riba_order(report_sxw.rml_parse):
+
+    def __init__(self, cr, uid, name, context=None):
+        super(riba_order, self).__init__(cr, uid, name, context=context)
+        self.localcontext.update( {
+            'time': time,
+            'get_invoice_name': self._get_invoice_name,
+            'get_company_currency': self._get_company_currency,
+            'get_company_currency_symbol': self._get_company_currency_symbol,
+            'get_amount_total_in_currency': self._get_amount_total_in_currency,
+            'get_amount_total': self._get_amount_total,
+            'get_account_name': self._get_account_name,
+        })
+
+    def _get_invoice_name(self, invoice_id):
+        if invoice_id:
+            pool = pooler.get_pool(self.cr.dbname)
+            value_name = pool.get('account.invoice').name_get(self.cr, self.uid, [invoice_id])
+            if value_name:
+                return value_name[0][1]
+        return False
+
+    def _get_amount_total_in_currency(self, payment):
+        total = 0.0
+        if payment.line_ids:
+            currency_cmp = payment.line_ids[0].currency.id
+        else:
+            return False
+        for line in payment.line_ids:
+            if currency_cmp == line.currency.id:
+                total += line.amount_currency
+            else:
+                return False
+        return total
+
+    def _get_amount_total(self, payment):
+        total = 0.0
+        if not payment.line_ids:
+            return False
+        for line in payment.line_ids:
+            total += line.amount
+        return total
+
+    def _get_company_currency(self):
+        pool = pooler.get_pool(self.cr.dbname)
+        user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
+        return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
+
+    def _get_company_currency_symbol(self):
+        pool = pooler.get_pool(self.cr.dbname)
+        user = pool.get('res.users').browse(self.cr, self.uid, self.uid)
+        return user.company_id and user.company_id.currency_id and user.company_id.currency_id.symbol or False
+
+    def _get_account_name(self,bank_id):
+        if bank_id:
+            pool = pooler.get_pool(self.cr.dbname)
+            value_name = pool.get('res.partner.bank').name_get(self.cr, self.uid, [bank_id])
+            if value_name:
+                return value_name[0][1]
+        return False
+
+report_sxw.report_sxw('report.riba.order', 'riba.order', 'addons/riba_issue/report/riba_order.rml', parser=riba_order, header="external")
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file

=== added file 'riba_issue/riba_issue.py'
--- riba_issue/riba_issue.py	1970-01-01 00:00:00 +0000
+++ riba_issue/riba_issue.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,467 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+
+from osv import osv, fields
+import netsvc
+
+class riba_mode(osv.osv):
+    _name= 'riba.mode'
+    _description= 'Bank Presentacion'
+    _columns = {
+        'name': fields.char('Banca Presentazione', size=64, required=True, help='Banca di Presentazione'),
+        'bank_id': fields.many2one('res.partner.bank', "Bank account",
+            required=True,help='Bank Account for the Presentacion RiBa'),
+        'journal': fields.many2one('account.journal', 'Journal', required=True,
+            domain=[('type', 'in', ('bank','cash'))], help='Bank or Cash Journal for the Payment RiBa'),
+        'company_id': fields.many2one('res.company', 'Company',required=True),
+        'partner_id':fields.related('company_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True,),
+        
+    }
+    _defaults = {
+        'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id
+    }
+
+    def suitable_bank_types(self, cr, uid, payment_code=None, context=None):
+        """Return the codes of the bank type that are suitable
+        for the given payment type code"""
+        if not payment_code:
+            return []
+        cr.execute(""" SELECT pb.state
+            FROM res_partner_bank pb
+            JOIN riba_mode rm ON (rm.bank_id = pb.id)
+            WHERE rm.id = %s """, [payment_code])
+        return [x[0] for x in cr.fetchall()]
+    
+    def onchange_company_id (self, cr, uid, ids, company_id=False, context=None):
+        result = {}
+        if company_id:
+            partner_id = self.pool.get('res.company').browse(cr, uid, company_id, context=context).partner_id.id
+            result['partner_id'] = partner_id
+        return {'value': result}
+                
+
+riba_mode()
+
+class riba_order(osv.osv):
+    _name = 'riba.order'
+    _description = 'Riba Order'
+    _rec_name = 'reference'
+
+    def get_wizard(self, type):
+        logger = netsvc.Logger()
+        logger.notifyChannel("warning", netsvc.LOG_WARNING,
+                "No wizard found for the payment type '%s'." % type)
+        return None
+
+    def _total(self, cursor, user, ids, name, args, context=None):
+        if not ids:
+            return {}
+        res = {}
+        for order in self.browse(cursor, user, ids, context=context):
+            if order.line_ids:
+                res[order.id] = reduce(lambda x, y: x + y.amount, order.line_ids, 0.0)
+            else:
+                res[order.id] = 0.0
+        return res
+
+    _columns = {
+        'date_scheduled': fields.date('Scheduled date if fixed', states={'done':[('readonly', True)]}, help='Select a date if you have chosen Preferred Date to be fixed.'),
+        'reference': fields.char('Reference', size=128, required=1, states={'done': [('readonly', True)]}),
+        'mode': fields.many2one('riba.mode', 'Riba mode', select=True, required=1, states={'done': [('readonly', True)]}, help='Select the Riba Mode to be applied.'),
+        'state': fields.selection([
+            ('draft', 'Draft'),
+            ('open', 'Confirmed'),
+            ('cancel', 'Cancelled'),
+            ('done', 'Done')], 'State', select=True,
+            help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
+        'line_ids': fields.one2many('riba.line', 'order_id', 'Riba lines', states={'done': [('readonly', True)]}),
+        'total': fields.function(_total, string="Total", method=True, type='float'),
+        'user_id': fields.many2one('res.users', 'User', required=True, states={'done': [('readonly', True)]}),
+        'date_prefered': fields.selection([
+            ('now', 'Directly'),
+            ('due', 'Due date'),
+            ('fixed', 'Fixed date')
+            ], "Preferred date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Riba Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
+        'date_created': fields.date('Creation date', readonly=True),
+        'date_done': fields.date('Execution date', readonly=True),
+        'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
+    }
+
+    _defaults = {
+        'user_id': lambda self,cr,uid,context: uid,
+        'state': 'draft',
+        'date_prefered': 'due',
+        'date_created': lambda *a: time.strftime('%Y-%m-%d'),
+        'reference': lambda self,cr,uid,context: self.pool.get('ir.sequence').get(cr, uid, 'riba.order'),
+    }
+
+    def set_to_draft(self, cr, uid, ids, *args):
+        self.write(cr, uid, ids, {'state': 'draft'})
+        wf_service = netsvc.LocalService("workflow")
+        for id in ids:
+            wf_service.trg_create(uid, 'riba.order', id, cr)
+        return True
+
+    def action_open(self, cr, uid, ids, *args):
+        ir_seq_obj = self.pool.get('ir.sequence')
+
+        for order in self.read(cr, uid, ids, ['reference']):
+            if not order['reference']:
+                reference = ir_seq_obj.get(cr, uid, 'riba.order')
+                self.write(cr, uid, order['id'], {'reference':reference})
+        return True
+
+    def set_done(self, cr, uid, ids, *args):
+        wf_service = netsvc.LocalService("workflow")
+        self.write(cr, uid, ids, {'date_done': time.strftime('%Y-%m-%d')})
+        wf_service.trg_validate(uid, 'riba.order', ids[0], 'done', cr)
+        return True
+
+    def copy(self, cr, uid, id, default={}, context=None):
+        default.update({
+            'state': 'draft',
+            'line_ids': [],
+            'reference': self.pool.get('ir.sequence').get(cr, uid, 'riba.order')
+        })
+        return super(riba_order, self).copy(cr, uid, id, default, context=context)
+
+    def write(self, cr, uid, ids, vals, context=None):
+        if context is None:
+            context = {}
+        riba_line_obj = self.pool.get('riba.line')
+        riba_line_ids = []
+
+        if (vals.get('date_prefered', False) == 'fixed' and not vals.get('date_scheduled', False)) or vals.get('date_scheduled', False):
+            for order in self.browse(cr, uid, ids, context=context):
+                for line in order.line_ids:
+                    riba_line_ids.append(line.id)
+            riba_line_obj.write(cr, uid, riba_line_ids, {'date': vals.get('date_scheduled', False)}, context=context)
+        elif vals.get('date_prefered', False) == 'due':
+            vals.update({'date_scheduled': False})
+            for order in self.browse(cr, uid, ids, context=context):
+                for line in order.line_ids:
+                    riba_line_obj.write(cr, uid, [line.id], {'date': line.ml_maturity_date}, context=context)
+        elif vals.get('date_prefered', False) == 'now':
+            vals.update({'date_scheduled': False})
+            for order in self.browse(cr, uid, ids, context=context):
+                for line in order.line_ids:
+                    riba_line_ids.append(line.id)
+            riba_line_obj.write(cr, uid, riba_line_ids, {'date': False}, context=context)
+        return super(riba_order, self).write(cr, uid, ids, vals, context=context)
+
+riba_order()
+
+class riba_line(osv.osv):
+    _name = 'riba.line'
+    _description = 'Riba Line'
+
+    def translate(self, orig):
+        return {
+                "due_date": "date_maturity",
+                "reference": "ref"}.get(orig, orig)
+
+    def info_owner(self, cr, uid, ids, name=None, args=None, context=None):
+        if not ids: return {}
+        partner_zip_obj = self.pool.get('res.partner.zip')
+
+        result = {}
+        info=''
+        for line in self.browse(cr, uid, ids, context=context):
+            owner = line.order_id.mode.bank_id.partner_id
+            result[line.id] = False
+            if owner.address:
+                for ads in owner.address:
+                    if ads.type == 'default':
+                        st = ads.street and ads.street or ''
+                        st1 = ads.street2 and ads.street2 or ''
+                        if 'zip_id' in ads:
+                            zip_city = ads.zip_id and partner_zip_obj.name_get(cr, uid, [ads.zip_id.id])[0][1] or ''
+                        else:
+                            zip = ads.zip and ads.zip or ''
+                            city = ads.city and ads.city or  ''
+                            zip_city = zip + ' ' + city
+                        cntry = ads.country_id and ads.country_id.name or ''
+                        info = owner.name + "\n" + st + " " + st1 + "\n" + zip_city + "\n" +cntry
+                        result[line.id] = info
+                        break
+        return result
+
+    def info_partner(self, cr, uid, ids, name=None, args=None, context=None):
+        if not ids: return {}
+        partner_zip_obj = self.pool.get('res.partner.zip')
+        result = {}
+        info = ''
+
+        for line in self.browse(cr, uid, ids, context=context):
+            result[line.id] = False
+            if not line.partner_id:
+                break
+            partner = line.partner_id.name or ''
+            if line.partner_id.address:
+                for ads in line.partner_id.address:
+                    if ads.type == 'default':
+                        st = ads.street and ads.street or ''
+                        st1 = ads.street2 and ads.street2 or ''
+                        if 'zip_id' in ads:
+                            zip_city = ads.zip_id and partner_zip_obj.name_get(cr, uid, [ads.zip_id.id])[0][1] or ''
+                        else:
+                            zip = ads.zip and ads.zip or ''
+                            city = ads.city and ads.city or  ''
+                            zip_city = zip + ' ' + city
+                        cntry = ads.country_id and ads.country_id.name or ''
+                        info = partner + "\n" + st + " " + st1 + "\n" + zip_city + "\n" +cntry
+                        result[line.id] = info
+                        break
+        return result
+
+    def select_by_name(self, cr, uid, ids, name, args, context=None):
+        if not ids: return {}
+        partner_obj = self.pool.get('res.partner')
+
+        cr.execute("""SELECT rl.id, ml.%s
+            FROM account_move_line ml
+                INNER JOIN riba_line rl
+                ON (ml.id = rl.move_line_id)
+                WHERE rl.id IN %%s"""% self.translate(name),
+                   (tuple(ids),))
+        res = dict(cr.fetchall())
+
+        if name == 'partner_id':
+            partner_name = {}
+            for p_id, p_name in partner_obj.name_get(cr, uid,
+                filter(lambda x:x and x != 0,res.values()), context=context):
+                partner_name[p_id] = p_name
+
+            for id in ids:
+                if id in res and partner_name:
+                    res[id] = (res[id],partner_name[res[id]])
+                else:
+                    res[id] = (False,False)
+        else:
+            for id in ids:
+                res.setdefault(id, (False, ""))
+        return res
+
+    def _amount(self, cursor, user, ids, name, args, context=None):
+        if not ids:
+            return {}
+        currency_obj = self.pool.get('res.currency')
+        if context is None:
+            context = {}
+        res = {}
+
+        for line in self.browse(cursor, user, ids, context=context):
+            ctx = context.copy()
+            ctx['date'] = line.order_id.date_done or time.strftime('%Y-%m-%d')
+            res[line.id] = currency_obj.compute(cursor, user, line.currency.id,
+                    line.company_currency.id,
+                    line.amount_currency, context=ctx)
+        return res
+
+    def _get_currency(self, cr, uid, context=None):
+        user_obj = self.pool.get('res.users')
+        currency_obj = self.pool.get('res.currency')
+        user = user_obj.browse(cr, uid, uid, context=context)
+
+        if user.company_id:
+            return user.company_id.currency_id.id
+        else:
+            return currency_obj.search(cr, uid, [('rate', '=', 1.0)])[0]
+
+    def _get_date(self, cr, uid, context=None):
+        if context is None:
+            context = {}
+        riba_order_obj = self.pool.get('riba.order')
+        date = False
+
+        if context.get('order_id') and context['order_id']:
+            order = riba_order_obj.browse(cr, uid, context['order_id'], context=context)
+            if order.date_prefered == 'fixed':
+                date = order.date_scheduled
+            else:
+                date = time.strftime('%Y-%m-%d')
+        return date
+
+    def _get_ml_inv_ref(self, cr, uid, ids, *a):
+        res = {}
+        for id in self.browse(cr, uid, ids):
+            res[id.id] = False
+            if id.move_line_id:
+                if id.move_line_id.invoice:
+                    res[id.id] = id.move_line_id.invoice.id
+        return res
+
+    def _get_ml_maturity_date(self, cr, uid, ids, *a):
+        res = {}
+        for id in self.browse(cr, uid, ids):
+            if id.move_line_id:
+                res[id.id] = id.move_line_id.date_maturity
+            else:
+                res[id.id] = False
+        return res
+
+    def _get_ml_created_date(self, cr, uid, ids, *a):
+        res = {}
+        for id in self.browse(cr, uid, ids):
+            if id.move_line_id:
+                res[id.id] = id.move_line_id.date_created
+            else:
+                res[id.id] = False
+        return res
+
+    _columns = {
+        'name': fields.char('Your Reference', size=64),
+        'communication': fields.char('Communication', size=64, required=True, help="Used as the message between ordering customer and current company. Depicts 'What do you want to say to the recipient about this order ?'"),
+        'communication2': fields.char('Communication 2', size=64, help='The successor message of Communication.'),
+        'move_line_id': fields.many2one('account.move.line', 'Entry line', domain=[('account_id.type', '=', 'liquidity')], help='This Entry Line will be referred for the information of the ordering customer.'),
+        'amount_currency': fields.float('Amount in Partner Currency', digits=(16, 2),
+            required=True, help='Payment amount in the partner currency'),
+        'currency': fields.many2one('res.currency','Partner Currency'),
+        'company_currency': fields.many2one('res.currency', 'Company Currency', readonly=True),
+        'bank_id': fields.many2one('res.partner.bank', 'Destination Bank account'),
+        'order_id': fields.many2one('riba.order', 'Order', required=True,
+            ondelete='cascade', select=True),
+        'partner_id': fields.many2one('res.partner', string="Partner", required=True, help='The Ordering Customer'),
+        'amount': fields.function(_amount, string='Amount in Company Currency',
+            method=True, type='float',
+            help='Payment amount in the company currency'),
+        'ml_date_created': fields.function(_get_ml_created_date, string="Effective Date",
+            method=True, type='date', help="Invoice Effective Date"),
+        'ml_maturity_date': fields.function(_get_ml_maturity_date, method=True, type='date', string='Due Date'),
+        'ml_inv_ref': fields.function(_get_ml_inv_ref, method=True, type='many2one', relation='account.invoice', string='Invoice Ref.'),
+        'info_owner': fields.function(info_owner, string="Owner Account", method=True, type="text", help='Address of the Main Partner'),
+        'info_partner': fields.function(info_partner, string="Destination Account", method=True, type="text", help='Address of the Ordering Customer.'),
+        'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this riba line directly"),
+        'create_date': fields.datetime('Created', readonly=True),
+        'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True),
+        'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line'),
+        'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
+    }
+    _defaults = {
+        'name': lambda obj, cursor, user, context: obj.pool.get('ir.sequence'
+            ).get(cursor, user, 'riba.line'),
+        'state': 'normal',
+        'currency': _get_currency,
+        'company_currency': _get_currency,
+        'date': _get_date,
+    }
+    _sql_constraints = [
+        ('name_uniq', 'UNIQUE(name)', 'The riba line name must be unique!'),
+    ]
+
+    def onchange_move_line(self, cr, uid, ids, move_line_id, payment_type, date_prefered, date_scheduled, currency=False, company_currency=False, context=None):
+        data = {}
+        move_line_obj = self.pool.get('account.move.line')
+
+        data['amount_currency'] = data['communication'] = data['partner_id'] = data['reference'] = data['date_created'] = data['bank_id'] = data['amount'] = False
+
+        if move_line_id:
+            line = move_line_obj.browse(cr, uid, move_line_id, context=context)
+            data['amount_currency'] = line.amount_to_pay
+
+            res = self.onchange_amount(cr, uid, ids, data['amount_currency'], currency,
+                                       company_currency, context)
+            if res:
+                data['amount'] = res['value']['amount']
+            data['partner_id'] = line.partner_id.id
+            temp = line.currency_id and line.currency_id.id or False
+            if not temp:
+                if line.invoice:
+                    data['currency'] = line.invoice.currency_id.id
+            else:
+                data['currency'] = temp
+
+            # calling onchange of partner and updating data dictionary
+            temp_dict = self.onchange_partner(cr, uid, ids, line.partner_id.id, payment_type)
+            data.update(temp_dict['value'])
+
+            data['reference'] = line.ref
+            data['date_created'] = line.date_created
+            data['communication'] = line.ref
+
+            if date_prefered == 'now':
+                #no payment date => immediate payment
+                data['date'] = False
+            elif date_prefered == 'due':
+                data['date'] = line.date_maturity
+            elif date_prefered == 'fixed':
+                data['date'] = date_scheduled
+        return {'value': data}
+
+    def onchange_amount(self, cr, uid, ids, amount, currency, cmpny_currency, context=None):
+        if (not amount) or (not cmpny_currency):
+            return {'value': {'amount': False}}
+        res = {}
+        currency_obj = self.pool.get('res.currency')
+        company_amount = currency_obj.compute(cr, uid, currency, cmpny_currency, amount)
+        res['amount'] = company_amount
+        return {'value': res}
+
+    def onchange_partner(self, cr, uid, ids, partner_id, payment_type, context=None):
+        data = {}
+        partner_zip_obj = self.pool.get('res.partner.zip')
+        partner_obj = self.pool.get('res.partner')
+        riba_mode_obj = self.pool.get('riba.mode')
+        data['info_partner'] = data['bank_id'] = False
+
+        if partner_id:
+            part_obj = partner_obj.browse(cr, uid, partner_id, context=context)
+            partner = part_obj.name or ''
+
+            if part_obj.address:
+                for ads in part_obj.address:
+                    if ads.type == 'default':
+                        st = ads.street and ads.street or ''
+                        st1 = ads.street2 and ads.street2 or ''
+
+                        if 'zip_id' in ads:
+                            zip_city = ads.zip_id and partner_zip_obj.name_get(cr, uid, [ads.zip_id.id])[0][1] or ''
+                        else:
+                            zip = ads.zip and ads.zip or ''
+                            city = ads.city and ads.city or  ''
+                            zip_city = zip + ' ' + city
+
+                        cntry = ads.country_id and ads.country_id.name or ''
+                        info = partner + "\n" + st + " " + st1 + "\n" + zip_city + "\n" +cntry
+
+                        data['info_partner'] = info
+
+            if part_obj.bank_ids and payment_type:
+                bank_type = riba_mode_obj.suitable_bank_types(cr, uid, payment_type, context=context)
+                for bank in part_obj.bank_ids:
+                    if bank.state in bank_type:
+                        data['bank_id'] = bank.id
+                        break
+        return {'value': data}
+
+    def fields_get(self, cr, uid, fields=None, context=None):
+        res = super(riba_line, self).fields_get(cr, uid, fields, context)
+        if 'communication2' in res:
+            res['communication2'].setdefault('states', {})
+            res['communication2']['states']['structured'] = [('readonly', True)]
+            res['communication2']['states']['normal'] = [('readonly', False)]
+        return res
+
+riba_line()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/riba_issue_view.xml'
--- riba_issue/riba_issue_view.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/riba_issue_view.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!-- View used in the wizard -->
+        <record id="view_move_line_form" model="ir.ui.view">
+            <field name="name">account.move.line.form.inherit</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">
+                <field name="reconcile_partial_id" position="after">
+                    <field name="amount_to_pay"/>
+                </field>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="view_move_line_tree_wiz">
+            <field name="name">account.move.line.tree</field>
+            <field name="model">account.move.line</field>
+            <field name="type">tree</field>
+            <field name="priority" eval="1"/>
+            <field name="arch" type="xml">
+                <tree string="RiBa Entry Line">
+                    <field name="partner_id"/>
+                    <field name="ref"/>
+                    <field name="name"/>
+                    <field name="journal_id"/>
+                    <field name="account_id"/>
+                    <field name="date_maturity"/>
+                    <field name="date"/>
+                    <field name="debit" sum="Total debit"/>
+                    <field name="credit" sum="Total credit"/>
+                    <field name="amount_to_pay"/>
+                    <field name="amount_currency"/>
+                    <field name="currency_id"/>
+                    <field name="period_id" invisible="1"/>
+                </tree>
+            </field>
+        </record>
+
+        <menuitem name="RiBa" parent="account.menu_finance" id="menu_riba" icon="terp-folder-green" sequence="8"/>
+
+        <record id="view_riba_mode_search" model="ir.ui.view">
+            <field name="name">riba.mode.search</field>
+            <field name="model">riba.mode</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <form string="Riba Mode">
+                    <field name="name"/>
+                    <field name="journal" widget='selection'/>
+                    <field name="company_id" widget='selection' groups="base.group_multi_company"/>
+                    <newline/>
+                    <group expand="0" string="Group By...">
+                      <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal'}"/>
+                    </group>
+                </form>
+            </field>
+        </record>
+
+        <record id="view_riba_mode_tree" model="ir.ui.view">
+            <field name="name">riba.mode.tree</field>
+            <field name="model">riba.mode</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Riba Mode">
+                    <field name="name"/>
+                    <field name="journal"/>
+                    <field name="company_id" groups="base.group_multi_company"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_riba_mode_form" model="ir.ui.view">
+            <field name="name">riba.mode.form</field>
+            <field name="model">riba.mode</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Riba Mode">
+                    <field name="name" select="1"/>
+                    <field name="journal" select="1"/>
+                    <field name="bank_id" domain="[('partner_id','=',partner_id)]"  />
+                    <field name="company_id" select="1" widget='selection' groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
+                    <field name="partner_id" select="1" widget='selection' invisible="1"/>
+                </form>
+            </field>
+        </record>
+       <record id="action_riba_mode_form" model="ir.actions.act_window">
+            <field name="name">Riba Mode</field>
+            <field name="res_model">riba.mode</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="search_view_id" ref="view_riba_mode_search"/>
+        </record>
+
+        <menuitem action="action_riba_mode_form" id="menu_action_riba_mode_form" parent="account.menu_configuration_misc"/> -->
+
+<record id="view_riba_order_form" model="ir.ui.view">
+            <field name="name">riba.order.form</field>
+            <field name="model">riba.order</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Riba Order">
+                    <group col="6" colspan="4">
+                      <field name="reference"/>
+
+                      <field name="mode" widget='selection'/>
+                      <button colspan="2" name="%(action_riba_order_create)d" string="Select Riba to Issue" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
+                      <field name="company_id" widget='selection' groups="base.group_multi_company"/> 
+                    </group>
+                    <field name="line_ids" colspan="4" widget="one2many_list" nolabel="1" default_get="{'order_id': active_id or False}" >
+                        <form string="Riba Line">
+                            <notebook>
+                                <page string="Riba">
+                                    <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency)" select="1" domain="[('debit', '>',0),('amount_to_pay','>',0)] "/>
+                                    <separator colspan="4" string="Transaction Information"/>
+                                    <field name="date"/>
+                                    <group colspan="2">
+                                        <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)"/>
+                                        <field name="currency" nolabel="1"/>
+                                    </group>
+                                    <field name="partner_id" on_change="onchange_partner(partner_id,parent.mode)" select="1"/>
+                                    <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
+                                    <separator colspan="2" string="Owner Account"/>
+                                    <separator colspan="2" string="Destination Account"/>
+                                    <field colspan="2" name="info_owner" nolabel="1"/>
+                                    <field colspan="2" name="info_partner" nolabel="1"/>
+                                    <field colspan="4" name="communication"/>
+                                    <field colspan="4" name="communication2"/>
+                                    <field name="name"/>
+                                    <field name="state"/>
+                                    <field name="company_id" widget='selection' groups="base.group_multi_company"/> 
+                                </page>
+                                <page string="Information">
+
+                                    <separator colspan="4" string="General Information"/>
+                                    <group colspan="2">
+                                        <field name="amount"/>
+                                        <field name="company_currency" nolabel="1"/>
+                                    </group>
+                                    <separator colspan="4" string="Entry Information"/>
+                                    <field name="create_date" readonly="1"/>
+                                    <field name="ml_maturity_date"/>
+                                    <field name="ml_inv_ref"/>
+                                </page>
+                            </notebook>
+                        </form>
+                        <tree string="riba Line">
+                            <field name="ml_inv_ref" />
+                            <field name="partner_id" select="1"/>
+                            <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
+                            <field name="ml_maturity_date"/>
+                            <field name="date"/>
+                            <field name="amount_currency" string="Amount"/>
+                            <field name="currency"/>
+                            <field name="name"/>
+                            <field name="amount" sum="Total in Company Currency" invisible="1"/>
+                        </tree>
+                    </field>
+                    <field name="date_created"/>
+                    <field name="date_done"/>
+                    <field name="state" readonly="1" select="1"/>
+                    <group col="4" colspan="2">
+                         <button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
+                         <button name="open" states="draft" string="Confirm Issue"  icon="gtk-apply"/>
+                         <button name="set_done" states="open" string="Make Issue" type="object" icon="gtk-execute"/>
+                         <button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/>
+                    </group>
+                </form>
+            </field>
+        </record> -->
+
+        <record id="view_riba_order_tree" model="ir.ui.view">
+            <field name="name">riba.order.tree</field>
+            <field name="model">riba.order</field>
+            <field name="type">tree</field>
+            <field eval="4" name="priority"/>
+            <field name="arch" type="xml">
+                <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="riba order">
+                    <field name="reference"/>
+                    <field name="mode"/>
+                    <field name="user_id"/>
+                    <field name="company_id" groups="base.group_multi_company"/>
+                    <field name="date_created"/>
+                    <field name="date_done"/>
+                    <field name="total"/>
+                    <field name="state"/>
+                    <button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
+                    <button name="open" states="draft" string="Confirm Issue"  icon="gtk-apply"/>
+                    <button name="set_done" states="open" string="Make Issue"  type ="object" icon="gtk-execute"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_riba_order_search" model="ir.ui.view">
+            <field name="name">riba.order.tree.search</field>
+            <field name="model">riba.order</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Search">
+                    <group col="8" colspan="4">
+                        <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
+                        <filter string="Confirmed" domain="[('state','=','open')]" icon="terp-camera_test"/>
+                        <filter string="Done" domain="[('state','=','done')]" icon="terp-dialog-close"/>
+                        <separator orientation="vertical"/>
+                        <field name="reference"/>
+                        <field name="mode" widget='selection'/>
+                        <field name="date_done"/>
+                        <field name="state"/>
+                    </group>
+                    <newline/>
+                    <group expand="0" string="Group By...">
+                        <filter string="Riba Mode" context="{'group_by': 'mode'}" icon="terp-dolar"/>
+                        <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
+                    </group>
+                </search>
+            </field>
+        </record>
+
+        <record id="action_riba_order_tree" model="ir.actions.act_window">
+            <field name="name">RiBa Order</field>
+            <field name="res_model">riba.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="search_view_id" ref="view_riba_order_search"/>
+            <field name="help">A riba order is a issue request from your company to pay a custumer invoice or a customer debit note. Here you can register all riba orders that should be done, keep track of all riba orders and mention the invoice reference and the partner the riba should be done for.</field>
+        </record>
+
+        <menuitem name="RiBa Issue" action="action_riba_order_tree" id="menu_action_riba_order_form" parent="menu_riba" sequence="3"/>
+
+        <record id="action_riba_order_tree_new" model="ir.actions.act_window">
+            <field name="name">New riba Order</field>
+            <field name="res_model">riba.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form,tree</field>
+        </record>
+
+        <record id="view_riba_line_form" model="ir.ui.view">
+            <field name="name">riba Line</field>
+            <field name="model">riba.line</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Riba Line">
+                    <notebook>
+                        <page string="riba">
+                            <field name="order_id" select="1"/>
+                            <field name="move_line_id" on_change="onchange_move_line(move_line_id, False, currency, company_currency)" select="1" domain="[('debit', '>',0),('amount_to_pay','>',0)] "/>
+                            <separator colspan="4" string="Transaction Information"/>
+                            <field name="date"/>
+                            <group colspan="2">
+                                <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,comapny_currency)"/>
+                                <field name="currency" nolabel="1"/>
+                            </group>
+                            <field name="partner_id" on_change="onchange_partner(partner_id, False)" select="1"/>
+                            <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
+                            <separator colspan="2" string="Owner Account"/>
+                            <separator colspan="2" string="Desitination Account"/>
+                            <field colspan="2" name="info_owner" nolabel="1"/>
+                            <field colspan="2" name="info_partner" nolabel="1"/>
+
+                            <field colspan="4" name="communication"/>
+                            <field colspan="4" name="communication2"/>
+                            <field name="name"/>
+                             <field name="state"/>
+                        </page>
+                        <page string="Information">
+                            <separator colspan="4" string="General Information"/>
+                            <group colspan="2">
+                                <field name="amount" select="1"/>
+                                <field name="company_currency" nolabel="1"/>
+                            </group>
+                            <separator colspan="4" string="Entry Information"/>
+                            <field name="create_date"/>
+                            <field name="ml_maturity_date"/>
+                            <field name="ml_inv_ref"/>
+                        </page>
+                    </notebook>
+                </form>
+            </field>
+        </record>
+        <record id="view_riba_line_tree" model="ir.ui.view">
+            <field name="name">riba Lines</field>
+            <field name="model">riba.line</field>
+            <field name="type">tree</field>
+            <field eval="4" name="priority"/>
+            <field name="arch" type="xml">
+                <tree string="Riba Line">
+                    <field name="order_id"/>
+                    <field name="ml_inv_ref" />
+                    <field name="ml_maturity_date"/>
+                    <field name="partner_id" select="1"/>
+                    <field name="amount" sum="Amount Total"/>
+                    <field name="amount_currency" sum="Currency Amount Total"/>
+                    <field name="currency"/>
+                    <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
+                    <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode)"/>
+                    <field name="create_date"/>
+                    <field name="name"/>
+                </tree>
+            </field>
+        </record>
+        <record id="action_riba_line_form" model="ir.actions.act_window">
+            <field name="name">riba Line</field>
+            <field name="res_model">riba.line</field>
+            <field name="view_type">tree</field>
+            <field name="view_mode">form,tree</field>
+        </record>
+
+     <record id="riba_bank_statement_form" model="ir.ui.view">
+            <field name="name">account.bank.statement.form.inherit</field>
+            <field name="model">account.bank.statement</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="account.view_bank_statement_form"/>
+            <field name="arch" type="xml">
+                <field name="journal_id" position="after">
+                    <button name="%(action_riba_issue_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import Riba Lines" type="action" icon="gtk-execute"/>
+                </field>
+            </field>
+        </record>
+
+        <act_window domain="[('move_line_id.move_id.id', '=', move_id)]" id="act_account_invoice_2_riba_line" name="Riba Lines" res_model="riba.line" src_model="account.invoice"/> -->
+
+              
+
+    </data>
+</openerp>

=== added directory 'riba_issue/security'
=== added file 'riba_issue/security/ir.model.access.csv'
--- riba_issue/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ riba_issue/security/ir.model.access.csv	2011-09-27 15:07:36 +0000
@@ -0,0 +1,2 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+

=== added file 'riba_issue/security/riba_issue_security.xml'
--- riba_issue/security/riba_issue_security.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/security/riba_issue_security.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="1">
+
+    <record id="group_account_riba" model="res.groups">
+        <field name="name">Accounting / RiBa</field>
+    </record>
+
+    <record id="riba_mode_comp_rule" model="ir.rule">
+        <field name="name">RiBa Mode company rule</field>
+        <field model="ir.model" name="model_id" ref="model_riba_mode"/>
+        <field eval="True" name="global"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+    <record id="riba_order_comp_rule" model="ir.rule">
+        <field name="name">RiBa order multi company rule</field>
+        <field model="ir.model" name="model_id" ref="model_riba_order"/>
+        <field eval="True" name="global"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+    <record id="riba_line_comp_rule" model="ir.rule">
+        <field name="name">RiBa line multi company rule</field>
+        <field model="ir.model" name="model_id" ref="model_riba_line"/>
+        <field eval="True" name="global"/>
+        <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+    </record>
+
+</data>
+</openerp>

=== added directory 'riba_issue/wizard'
=== added file 'riba_issue/wizard/__init__.py'
--- riba_issue/wizard/__init__.py	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/__init__.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import riba_issue_order
+import riba_issue_populate_statement
+import riba_issue_pay
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/wizard/riba_issue_order.py'
--- riba_issue/wizard/riba_issue_order.py	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/riba_issue_order.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,122 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from lxml import etree
+
+from osv import osv, fields
+
+class riba_order_create(osv.osv_memory):
+    """
+    Create a riba object with lines corresponding to the account move line
+    to pay according to the date and the mode provided by the user.
+    Hypothesis:
+    - Small number of non-reconcilied move line, riba mode and bank account type,
+    - Big number of partner and bank account.
+
+    If a type is given, unsuitable account Entry lines are ignored.
+    """
+
+    _name = 'riba.order.create'
+    _description = 'riba.order.create'
+    _columns = {
+        'duedate': fields.date('Due Date', required=True),
+        'entries': fields.many2many('account.move.line', 'line_pay_rel', 'pay_id', 'line_id', 'Entries')
+    }
+    _defaults = {
+         'duedate': lambda *a: time.strftime('%Y-%m-%d'),
+    }
+
+    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+        res = super(riba_order_create, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
+        if context and 'line_ids' in context:
+            view_obj = etree.XML(res['arch'])
+            child = view_obj.getchildren()[0]
+            domain = '[("id", "in", '+ str(context['line_ids'])+')]'
+            field = etree.Element('field', attrib={'domain': domain, 'name':'entries', 'colspan':'4', 'height':'300', 'width':'800', 'nolabel':"1"})
+            child.addprevious(field)
+            res['arch'] = etree.tostring(view_obj)
+        return res
+
+    def create_riba(self, cr, uid, ids, context=None):
+        order_obj = self.pool.get('riba.order')
+        line_obj = self.pool.get('account.move.line')
+        riba_obj = self.pool.get('riba.line')
+        if context is None:
+            context = {}
+        data = self.browse(cr, uid, ids, context=context)[0]
+        line_ids = [entry.id for entry in data.entries]
+        if not line_ids:
+            return {'type': 'ir.actions.act_window_close'}
+
+        riba = order_obj.browse(cr, uid, context['active_id'], context=context)
+        t = None
+        line2bank = line_obj.line2bank(cr, uid, line_ids, t, context)
+
+        ## Finally populate the current riba with new lines:
+        for line in line_obj.browse(cr, uid, line_ids, context=context):
+            if riba.date_prefered == "now":
+                #no riba date => immediate payment
+                date_to_pay = False
+            elif riba.date_prefered == 'due':
+                date_to_pay = line.date_maturity
+            elif riba.date_prefered == 'fixed':
+                date_to_pay = riba.date_scheduled
+            riba_obj.create(cr, uid,{
+                'move_line_id': line.id,
+                'amount_currency': line.amount_to_pay,
+                'bank_id': line2bank.get(line.id),
+                'order_id': riba.id,
+                'partner_id': line.partner_id and line.partner_id.id or False,
+                'communication': line.ref or '/',
+                'date': date_to_pay,
+                'currency': line.invoice and line.invoice.currency_id.id or False,
+                }, context=context)
+        return {'type': 'ir.actions.act_window_close'}
+
+    def search_entries(self, cr, uid, ids, context=None):
+        line_obj = self.pool.get('account.move.line')
+        mod_obj = self.pool.get('ir.model.data')
+        if context is None:
+            context = {}
+        data = self.browse(cr, uid, ids, context=context)[0]
+        search_due_date = data.duedate
+
+        # Search for move line to pay:
+        domain = [('account_id.type', '=', 'liquidity'), ('amount_to_pay', '>', 0)]
+        domain = domain + ['|', ('date_maturity', '<=', search_due_date), ('date_maturity', '=', False)]
+        line_ids = line_obj.search(cr, uid, domain, context=context)
+        context.update({'line_ids': line_ids})
+        model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_riba_order_create_lines')], context=context)
+        resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+        return {'name': ('Entrie Lines'),
+                'context': context,
+                'view_type': 'form',
+                'view_mode': 'form',
+                'res_model': 'riba.order.create',
+                'views': [(resource_id,'form')],
+                'type': 'ir.actions.act_window',
+                'target': 'new',
+        }
+
+riba_order_create()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/wizard/riba_issue_order_view.xml'
--- riba_issue/wizard/riba_issue_order_view.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/riba_issue_order_view.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+		<record id="view_riba_order_create" model="ir.ui.view">
+            <field name="name">riba.order.create.form</field>
+            <field name="model">riba.order.create</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+			<form string="Search Payment lines">
+			    <group col="4" colspan="6">
+					<field name="duedate" />
+				</group>
+				<separator colspan="4"/>
+			    <group col="2" colspan="4">
+            		<button special="cancel"  string="Cancel" icon='gtk-cancel'/>
+					<button name="search_entries" string="Search" colspan="1" type="object" icon="gtk-execute"/>
+				</group>
+			</form>
+            </field>
+        </record>
+
+		<record id="view_riba_order_create_lines" model="ir.ui.view">
+            <field name="name">riba.order.create.lines.form</field>
+            <field name="model">riba.order.create</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+			<form string="Search Riba lines">
+			    <group col="4" colspan="6">
+				</group>
+				<separator colspan="4"/>
+			    <group col="2" colspan="4">
+            		<button special="cancel"  string="Cancel" icon='gtk-cancel'/>
+					<button name="create_riba" string="_Add to riba issue" colspan="1" type="object" icon="gtk-execute"/>
+				</group>
+			</form>
+            </field>
+        </record>
+
+        <record id="action_riba_order_create" model="ir.actions.act_window">
+            <field name="name">Populate RiBa</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">riba.order.create</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="view_riba_order_create"/>
+            <field name="target">new</field>
+        </record>
+
+	</data>
+</openerp>

=== added file 'riba_issue/wizard/riba_issue_pay.py'
--- riba_issue/wizard/riba_issue_pay.py	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/riba_issue_pay.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv
+
+class riba_issue_make_payment(osv.osv_memory):
+    _name = "riba.issue.make.payment"
+    _description = "Riba make issue"
+
+    def launch_wizard(self, cr, uid, ids, context=None):
+        """
+        Search for a wizard to launch according to the type.
+        If type is manual. just confirm the order.
+        """
+        obj_riba_order = self.pool.get('riba.order')
+        if context is None:
+            context = {}
+#        obj_model = self.pool.get('ir.model.data')
+#        obj_act = self.pool.get('ir.actions.act_window')
+#        order = obj_payment_order.browse(cr, uid, context['active_id'], context)
+        obj_riba_order.set_done(cr, uid, [context['active_id']], context)
+        return {'type': 'ir.actions.act_window_close'}
+#        t = order.mode and order.mode.type.code or 'manual'
+#        if t == 'manual':
+#            obj_payment_order.set_done(cr,uid,context['active_id'],context)
+#            return {}
+#
+#        gw = obj_payment_order.get_wizard(t)
+#        if not gw:
+#            obj_payment_order.set_done(cr,uid,context['active_id'],context)
+#            return {}
+#
+#        module, wizard= gw
+#        result = obj_model._get_id(cr, uid, module, wizard)
+#        id = obj_model.read(cr, uid, [result], ['res_id'])[0]['res_id']
+#        return obj_act.read(cr, uid, [id])[0]
+
+riba_issue_make_payment()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/wizard/riba_issue_pay_view.xml'
--- riba_issue/wizard/riba_issue_pay_view.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/riba_issue_pay_view.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+     <data>
+
+        <record id="riba_issue_make_payment_view" model="ir.ui.view">
+             <field name="name">riba.issue.make.payment.form</field>
+             <field name="model">riba.issue.make.payment</field>
+             <field name="type">form</field>
+             <field name="arch" type="xml">
+				<form string="Make RiBa Issue">
+					<separator string="Are you sure you want to make Issue RiBa?"/>
+					<newline/>
+					<group  colspan="2" col="4">
+						<button special="cancel" string="Cancel" icon="gtk-cancel"/>
+						<button name="launch_wizard" string="Yes" type="object" icon="gtk-ok" default_focus="1"/>
+	 				</group>
+				</form>
+			</field>
+		</record>
+
+		<record id="action_riba_issue_make_payment" model="ir.actions.act_window">
+			<field name="name">Make RiBa Issue</field>
+			<field name="type">ir.actions.act_window</field>
+			<field name="res_model">riba.issue.make.payment</field>
+			<field name="view_type">form</field>
+			<field name="view_mode">form</field>
+			<field name="view_id" ref="riba_issue_make_payment_view"/>
+			<field name="target">new</field>
+		</record>
+
+
+	</data>
+</openerp>

=== added file 'riba_issue/wizard/riba_issue_populate_statement.py'
--- riba_issue/wizard/riba_issue_populate_statement.py	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/riba_issue_populate_statement.py	2011-09-27 15:07:36 +0000
@@ -0,0 +1,119 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from lxml import etree
+
+from osv import osv, fields
+
+class riba_issue_populate_statement(osv.osv_memory):
+    _name = "riba.issue.populate.statement"
+    _description = "Riba Issue populate Statement"
+    _columns = {
+        'lines': fields.many2many('riba.line', 'riba_line_rel_', 'riba_id', 'line_id', 'Riba Lines')
+    }
+
+    def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+        line_obj = self.pool.get('riba.line')
+
+        res = super(riba_issue_populate_statement, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
+        line_ids = line_obj.search(cr, uid, [
+            ('bank_statement_line_id', '=', False),
+            ('move_line_id.state','=','valid')])
+        line_ids.extend(line_obj.search(cr, uid, [
+            ('order_id.mode', '=', False),
+            ('move_line_id.state','=','valid')]))
+        domain = '[("id", "in", '+ str(line_ids)+')]'
+        doc = etree.XML(res['arch'])
+        nodes = doc.xpath("//field[@name='lines']")
+        for node in nodes:
+            node.set('domain', domain)
+        res['arch'] = etree.tostring(doc)
+        return res
+
+    def populate_statement(self, cr, uid, ids, context=None):
+        line_obj = self.pool.get('riba.line')
+        statement_obj = self.pool.get('account.bank.statement')
+        statement_line_obj = self.pool.get('account.bank.statement.line')
+        currency_obj = self.pool.get('res.currency')
+        voucher_obj = self.pool.get('account.voucher')
+        voucher_line_obj = self.pool.get('account.voucher.line')
+        move_line_obj = self.pool.get('account.move.line')
+
+        if context is None:
+            context = {}
+        data = self.read(cr, uid, ids, [], context=context)[0]
+        line_ids = data['lines']
+        if not line_ids:
+            return {'type': 'ir.actions.act_window_close'}
+
+        statement = statement_obj.browse(cr, uid, context['active_id'], context=context)
+
+        for line in line_obj.browse(cr, uid, line_ids, context=context):
+            ctx = context.copy()
+            ctx['date'] = line.ml_maturity_date # was value_date earlier,but this field exists no more now
+            amount = currency_obj.compute(cr, uid, line.currency.id,
+                    statement.currency.id, line.amount_currency, context=ctx)
+
+            context.update({'move_line_ids': [line.move_line_id.id]})
+            result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype='liquidity', date=line.ml_maturity_date, context=context)
+
+            if line.move_line_id:
+                voucher_res = {
+                        'type': 'liquidity',
+                        'name': line.name,
+                        'partner_id': line.partner_id.id,
+                        'journal_id': statement.journal_id.id,
+                        'account_id': result.get('account_id', statement.journal_id.default_debit_account_id.id),
+                        'company_id': statement.company_id.id,
+                        'currency_id': statement.currency.id,
+                        'date': line.date or time.strftime('%Y-%m-%d'),
+                        'amount': abs(amount),
+                        'period_id': statement.period_id.id
+                }
+                voucher_id = voucher_obj.create(cr, uid, voucher_res, context=context)
+                voucher_line_dict =  False
+                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})
+                    voucher_line_obj.create(cr, uid, voucher_line_dict, context=context)
+
+                st_line_id = statement_line_obj.create(cr, uid, {
+                    'name': line.order_id.reference or '?',
+                    'amount': - amount,
+                    'type': '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)
+
+                line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id})
+        return {'type': 'ir.actions.act_window_close'}
+
+riba_issue_populate_statement()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'riba_issue/wizard/riba_issue_populate_statement_view.xml'
--- riba_issue/wizard/riba_issue_populate_statement_view.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/wizard/riba_issue_populate_statement_view.xml	2011-09-27 15:07:36 +0000
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+
+        <record id="riba_issue_populate_statement_view" model="ir.ui.view">
+             <field name="name">RiBa Issue Populate statement</field>
+             <field name="model">riba.issue.populate.statement</field>
+             <field name="type">form</field>
+             <field name="arch" type="xml">
+                <form string="Populate Statement:">
+                    <group colspan="4" col="6">
+                        <field name="lines" colspan="4" height="300" width="800" nolabel="1" />
+                        <separator colspan="6"/>
+                        <button special="cancel" string="Cancel" icon="gtk-cancel"/>
+                        <button name="populate_statement" string="ADD" type="object" icon="gtk-ok"/>
+                    </group>
+                </form>
+             </field>
+        </record>
+
+        <record id="action_riba_issue_populate_statement_confirm" model="ir.actions.act_window">
+             <field name="name">RiBa Issue Populate statement</field>
+             <field name="res_model">riba.issue.populate.statement</field>
+             <field name="type">ir.actions.act_window</field>
+             <field name="view_type">form</field>
+             <field name="view_mode">tree,form</field>
+             <field name="view_id" ref="riba_issue_populate_statement_view"/>
+             <field name="context">{'record_id':active_id}</field>
+             <field name="target">new</field>
+       </record>
+
+        <record id="action_riba_issue_populate_statement_view" model="ir.actions.act_window">
+             <field name="name">RiBa Issue Populate statement</field>
+             <field name="res_model">riba.issue.populate.statement</field>
+             <field name="type">ir.actions.act_window</field>
+             <field name="view_type">form</field>
+             <field name="view_mode">tree,form</field>
+             <field name="view_id" ref="riba_issue_populate_statement_view"/>
+             <field name="context">{'record_id':active_id}</field>
+             <field name="target">new</field>
+       </record>
+
+	</data>
+</openerp>