← 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/79931
-- 
https://code.launchpad.net/~lopez.eliumara/openobject-italia/riba/+merge/79931
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-10-20 09:16:17 +0000 differ
=== added file 'riba_issue/__init__.py'
--- riba_issue/__init__.py	1970-01-01 00:00:00 +0000
+++ riba_issue/__init__.py	2011-10-20 09:16:17 +0000
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+#----------------------------------------------------------
+# Init RiBa
+#----------------------------------------------------------
+
+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-10-20 09:16:17 +0000
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    "name": "RiBa Issue",
+    "version": "1.0",
+    "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': [],
+    'depends': ['account','account_voucher'],
+    'init_xml': [],
+    'update_xml': [
+                   'security/riba_issue_security.xml',
+                   'security/ir.model.access.csv',
+                   'wizard/riba_issue_pay_view.xml',
+                   'wizard/riba_issue_order_view.xml',
+                   'wizard/riba_file_export.xml',
+                   'account_invoice_view.xml',
+                   'riba_issue_view.xml',
+                   'riba_report.xml',
+                   'riba_sequence.xml',
+                   'account_riba_workflow.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-10-20 09:16:17 +0000
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from datetime import datetime
+
+from osv import fields, osv
+from tools.translate import _
+
+class Invoice(osv.osv):
+    _inherit = 'account.invoice'
+
+    def search_move_id_riba(self, cr, uid, ids, context):
+       """Invoices on Payments"""
+       cr.execute(""" SELECT ai.move_id
+          FROM account_invoice ai
+          INNER JOIN account_payment_term pt ON (ai.payment_term = pt.id)
+          WHERE pt.riba = 'True'""")
+       return [x[0] for x in cr.fetchall()]
+
+
+    def action_process(self, cr, uid, ids, context=None):
+        if not ids: return []
+        inv = self.browse(cr, uid, ids[0], context=context)
+        if inv.payment_term.riba is True:
+          return {
+            'name':_("Pay Invoice"),
+            'view_mode': 'form',
+            'view_id': False,
+            'view_type': 'form',
+            'res_model': 'account.voucher',
+            'type': 'ir.actions.act_window',
+            'nodestroy': True,
+            'target': 'current',
+            'domain': '[]',
+            'context': {
+                'default_partner_id': inv.partner_id.id,
+                'default_amount': inv.residual,
+                'default_name':inv.internal_number,
+                'close_after_process': True,
+                'invoice_type':inv.type,
+                'invoice_id':inv.id,
+                'default_type': inv.type in ('out_invoice') and 'receipt' or 'payment'
+                }
+        }
+ 
+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-10-20 09:16:17 +0000
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+ 
+        <!--
+        Customers Invoices
+        -->
+        <record id="invoice_tree" model="ir.ui.view">
+            <field name="name">account.invoice.tree.inherit</field>
+            <field name="model">account.invoice</field>
+            <field name="type">tree</field>
+            <field name="inherit_id" ref="account.invoice_tree"/>
+            <field name="arch" type="xml">
+                <field name="state" position="after">
+                    <button name="action_process" states="open" string="Process" type="object" icon="gtk-go-forward"/>
+                </field>
+            </field>
+        </record>
+
+        <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>
+
+        <record id="action_invoice_customer_tree" model="ir.actions.act_window">
+            <field name="name">Invoices</field>
+            <field name="res_model">account.invoice</field>
+            <field name="view_type">tree</field>
+            <field name="view_mode">tree,form,calendar,graph</field>
+            <field name="view_id" ref="invoice_tree"/>
+            <field name="context">{'type':'out_invoice'}</field>
+            <field name="domain">[('state','=','open')]</field>
+            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
+        </record>
+
+        <record id="action_invoice_customer_tree1" model="ir.actions.act_window">
+            <field name="name">Customer Invoices</field>
+            <field name="res_model">account.invoice</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form,calendar,graph</field>
+            <field eval="False" name="view_id"/>
+            <field name="domain">[('type','=','out_invoice'),('payment_term.riba', '=', 'True')]</field>
+            <field name="context">{'type':'out_invoice', 'journal_type': 'sale'}</field>
+            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
+            <field name="help">With Customer Invoices you can create and manage sales invoices issued to your customers. OpenERP can also generate draft invoices automatically from sales orders or deliveries. You should only confirm them before sending them to your customers.</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-10-20 09:16:17 +0000
@@ -0,0 +1,153 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from 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 NOT NULL
+            AND debit > 0
+            AND ''' + where + ' and ' + query), ('receivable',)+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 last suitable bank for the corresponding partner.
+        """
+        riba_line_obj = self.pool.get('riba.line')
+        line2bank = {}
+        if not ids:
+            return {}
+        bank_type = riba_line_obj.s_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 not line2bank[line.id] and line.partner_id.bank_ids:
+                    line2bank[line.id] = line.partner_id.bank_ids[-1].id
+            else:
+                raise osv.except_osv(_('Error !'), _('No partner defined on entry line'))
+        return line2bank
+
+    def line2iban(self, cr, uid, ids, payment_type=None, context=None):
+        """
+        Try to return for each Ledger Posting line a corresponding code
+        iban 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 last suitable bank for the corresponding partner.
+        """
+        riba_line_obj = self.pool.get('riba.line')
+        line2iban = {}
+        if not ids:
+            return {}
+        bank_type = riba_line_obj.s_bank_types(cr, uid, payment_type,
+                context=context)
+        for line in self.browse(cr, uid, ids, context=context):
+            line2iban[line.id] = False
+            if line.invoice and line.invoice.partner_bank_id:
+                line2iban[line.id] = line.invoice.partner_bank_id.id.iban
+            elif line.partner_id:
+                if not line.partner_id.bank_ids:
+                    line2iban[line.id] = False
+                else:
+                    for bank in line.partner_id.bank_ids:
+                        if bank.state in bank_type:
+                            line2iban[line.id] = bank.id.iban
+                            break
+                if not line2iban[line.id] and line.partner_id.bank_ids:
+                    line2iban[line.id] = line.partner_id.bank_ids[-1].iban
+            else:
+                raise osv.except_osv(_('Error !'), _('No partner defined on entry line'))
+        return line2iban
+
+    _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_riba_workflow.xml'
--- riba_issue/account_riba_workflow.xml	1970-01-01 00:00:00 +0000
+++ riba_issue/account_riba_workflow.xml	2011-10-20 09:16:17 +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-10-20 09:16:17 +0000
@@ -0,0 +1,545 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* riba_issue
+#
+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: riba_issue
+#: field:riba.order,date_scheduled:0
+msgid "Scheduled date if fixed"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,currency:0
+msgid "Partner Currency"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.order,mode:0
+msgid "Select the Riba Mode to be applied."
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.mode:0
+#: view:riba.order:0
+msgid "Group By..."
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,line_ids:0
+msgid "Riba lines"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: field:riba.line,info_owner:0
+#: view:riba.order:0
+msgid "Owner Account"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.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: riba_issue
+#: field:riba.mode,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,date_prefered:0
+msgid "Preferred date"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.line,state:0
+msgid "Free"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order.create,entries:0
+msgid "Entries"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,ml_maturity_date:0
+#: field:riba.order.create,duedate:0
+msgid "Due Date"
+msgstr ""
+
+
+#. module: riba_issue
+#: view:riba.order.create:0
+msgid "_Add to Riba Order"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+#: view:riba.order:0
+msgid "Amount"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Total in Company Currency"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_order_tree_new
+msgid "New Riba Order"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+#: field:riba.order,reference:0
+msgid "Reference"
+msgstr ""
+
+#. module: riba_issue
+#: sql_constraint:riba.line:0
+msgid "The riba line name must be unique!"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_order_tree
+#: model:ir.ui.menu,name:riba_issue.menu_action_riba_order_form
+msgid "Riba Orders"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,date_prefered:0
+msgid "Directly"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_line_form
+#: model:ir.model,name:riba_issue.model_riba_line
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Riba Line"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+msgid "Amount Total"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: selection:riba.order,state:0
+msgid "Confirmed"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,ml_date_created:0
+msgid "Invoice Effective Date"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Execution Type"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.line,state:0
+msgid "Structured"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: field:riba.order,state:0
+msgid "State"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Transaction Information"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_mode_form
+#: model:ir.model,name:riba_issue.riba_mode
+#: model:ir.ui.menu,name:riba_issue.menu_action_riba_mode_form
+#: view:riba.mode:0
+#: view:riba.order:0
+msgid "Riba Mode"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,ml_date_created:0
+msgid "Effective Date"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,ml_inv_ref:0
+msgid "Invoice Ref."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.order,date_prefered:0
+msgid "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."
+msgstr ""
+
+#. module: riba_issue
+#: code:addons/riba_issue/account_move_line.py:110
+#, python-format
+msgid "Error !"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,date_done:0
+msgid "Execution date"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.mode,journal:0
+msgid "Bank Journal for the Mode RiBa"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,date_prefered:0
+msgid "Fixed date"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,info_partner:0
+#: view:riba.order:0
+msgid "Destination Account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+msgid "Destination Account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Search Riba Orders"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,create_date:0
+msgid "Created"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+msgid "Currency Amount Total"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Make Issue"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,state:0
+msgid "Communication Type"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,date_prefered:0
+msgid "Due date"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Currency"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.issue.make.payment:0
+msgid "Yes"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,info_owner:0
+msgid "Address of the Main Partner"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,date:0
+msgid "If no payment date is specified, the bank will treat this riba line directly"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.mode,name:0
+msgid "Bank of Presentacion"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Value Date"
+msgstr ""
+
+
+#. module: riba_issue
+#: help:riba.line,amount_currency:0
+msgid "Payment amount in the partner currency"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: selection:riba.order,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,communication2:0
+msgid "The successor message of Communication."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,info_partner:0
+msgid "Address of the Customer."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.order,date_scheduled:0
+msgid "Select a date if you have chosen Preferred Date to be fixed."
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.model,name:riba_issue.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: riba_issue
+#: constraint:account.move.line:0
+msgid "Company must be same for its related account and period."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,move_line_id:0
+msgid "This Entry Line will be referred for the information of the ordering customer."
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order.create:0
+msgid "Search"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.report.xml,name:riba_issue.riba_order1
+#: model:ir.model,name:riba_issue.riba_order
+msgid "Riba Order"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,date:0
+msgid "Date"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Total:"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,date_created:0
+msgid "Creation date"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,amount:0
+msgid "Amount in Company Currency"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,partner_id:0
+msgid "The Ordering Customer"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Invoice Ref"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,name:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,mode:0
+msgid "riba mode"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "riba order"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "General Information"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: selection:riba.order,state:0
+msgid "Done"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.model,name:riba_issue.account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,communication:0
+msgid "Communication"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.issue.make.payment:0
+#: view:riba.order:0
+#: view:riba.order.create:0
+msgid "Cancel"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Information"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,help:riba_issue.action_riba_order_tree
+msgid "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."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,amount:0
+msgid "riba amount in the company currency"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order.create:0
+msgid "Search riba lines"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,amount_currency:0
+msgid "Amount in Partner Currency"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,communication2:0
+msgid "Communication 2"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,bank_id:0
+msgid "Debitor Bank"
+msgstr ""
+
+#. module: riba_issue
+#: view:account.riba.make.riba:0
+msgid "Are you sure you want to make Issue RiBa?"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.mode:0
+#: field:riba.mode,journal:0
+msgid "Journal"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.mode,bank_id:0
+msgid "Bank account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Confirm Issue"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,company_currency:0
+#: report:riba.order:0
+msgid "Company Currency"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,move_line_id:0
+msgid "Entry line"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.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: riba_issue
+#: field:riba.mode,name:0
+msgid "Name"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Entry Information"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.model,name:riba_issue.model_riba_order_create
+msgid "riba.order.create"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,order_id:0
+msgid "Order"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,total:0
+msgid "Total"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,partner_id:0
+#: report:riba.order:0
+msgid "Partner"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_create_riba_order
+msgid "Populate RiBa"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.mode,bank_id:0
+msgid "Bank Account for the Riba Mode"
+msgstr ""

=== 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-10-20 09:16:17 +0000
@@ -0,0 +1,545 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* riba_issue
+#
+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: riba_issue
+#: field:riba.order,date_scheduled:0
+msgid "Scheduled date if fixed"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,currency:0
+msgid "Partner Currency"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.order,mode:0
+msgid "Select the Riba Mode to be applied."
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.mode:0
+#: view:riba.order:0
+msgid "Group By..."
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,line_ids:0
+msgid "Riba lines"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: field:riba.line,info_owner:0
+#: view:riba.order:0
+msgid "Owner Account"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.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: riba_issue
+#: field:riba.mode,company_id:0
+msgid "Company"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,date_prefered:0
+msgid "Preferred date"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.line,state:0
+msgid "Free"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order.create,entries:0
+msgid "Entries"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,ml_maturity_date:0
+#: field:riba.order.create,duedate:0
+msgid "Due Date"
+msgstr ""
+
+
+#. module: riba_issue
+#: view:riba.order.create:0
+msgid "_Add to Riba Order"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+#: view:riba.order:0
+msgid "Amount"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Total in Company Currency"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,state:0
+msgid "Cancelled"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_order_tree_new
+msgid "New Riba Order"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+#: field:riba.order,reference:0
+msgid "Reference"
+msgstr ""
+
+#. module: riba_issue
+#: sql_constraint:riba.line:0
+msgid "The riba line name must be unique!"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_order_tree
+#: model:ir.ui.menu,name:riba_issue.menu_action_riba_order_form
+msgid "Riba Orders"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,date_prefered:0
+msgid "Directly"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_line_form
+#: model:ir.model,name:riba_issue.model_riba_line
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Riba Line"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+msgid "Amount Total"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: selection:riba.order,state:0
+msgid "Confirmed"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,ml_date_created:0
+msgid "Invoice Effective Date"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Execution Type"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.line,state:0
+msgid "Structured"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: field:riba.order,state:0
+msgid "State"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Transaction Information"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_riba_mode_form
+#: model:ir.model,name:riba_issue.riba_mode
+#: model:ir.ui.menu,name:riba_issue.menu_action_riba_mode_form
+#: view:riba.mode:0
+#: view:riba.order:0
+msgid "Riba Mode"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,ml_date_created:0
+msgid "Effective Date"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,ml_inv_ref:0
+msgid "Invoice Ref."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.order,date_prefered:0
+msgid "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."
+msgstr ""
+
+#. module: riba_issue
+#: code:addons/riba_issue/account_move_line.py:110
+#, python-format
+msgid "Error !"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,date_done:0
+msgid "Execution date"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.mode,journal:0
+msgid "Bank Journal for the Mode RiBa"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,date_prefered:0
+msgid "Fixed date"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,info_partner:0
+#: view:riba.order:0
+msgid "Destination Account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+msgid "Destination Account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Search Riba Orders"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,create_date:0
+msgid "Created"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+msgid "Currency Amount Total"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Make Issue"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,state:0
+msgid "Communication Type"
+msgstr ""
+
+#. module: riba_issue
+#: selection:riba.order,date_prefered:0
+msgid "Due date"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Currency"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.issue.make.payment:0
+msgid "Yes"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,info_owner:0
+msgid "Address of the Main Partner"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,date:0
+msgid "If no payment date is specified, the bank will treat this riba line directly"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.mode,name:0
+msgid "Bank of Presentacion"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Value Date"
+msgstr ""
+
+
+#. module: riba_issue
+#: help:riba.line,amount_currency:0
+msgid "Payment amount in the partner currency"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: selection:riba.order,state:0
+msgid "Draft"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,communication2:0
+msgid "The successor message of Communication."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,info_partner:0
+msgid "Address of the Customer."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.order,date_scheduled:0
+msgid "Select a date if you have chosen Preferred Date to be fixed."
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.model,name:riba_issue.model_account_move_line
+msgid "Journal Items"
+msgstr ""
+
+#. module: riba_issue
+#: constraint:account.move.line:0
+msgid "Company must be same for its related account and period."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,move_line_id:0
+msgid "This Entry Line will be referred for the information of the ordering customer."
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order.create:0
+msgid "Search"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.report.xml,name:riba_issue.riba_order1
+#: model:ir.model,name:riba_issue.riba_order
+msgid "Riba Order"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,date:0
+msgid "Date"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Total:"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,date_created:0
+msgid "Creation date"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,amount:0
+msgid "Amount in Company Currency"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,partner_id:0
+msgid "The Ordering Customer"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Invoice Ref"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,name:0
+msgid "Your Reference"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,mode:0
+msgid "riba mode"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "riba order"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "General Information"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+#: selection:riba.order,state:0
+msgid "Done"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.model,name:riba_issue.account_invoice
+msgid "Invoice"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,communication:0
+msgid "Communication"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.issue.make.payment:0
+#: view:riba.order:0
+#: view:riba.order.create:0
+msgid "Cancel"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Information"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,help:riba_issue.action_riba_order_tree
+msgid "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."
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.line,amount:0
+msgid "riba amount in the company currency"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order.create:0
+msgid "Search riba lines"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,amount_currency:0
+msgid "Amount in Partner Currency"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,communication2:0
+msgid "Communication 2"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,bank_id:0
+msgid "Debitor Bank"
+msgstr ""
+
+#. module: riba_issue
+#: view:account.riba.make.riba:0
+msgid "Are you sure you want to make Issue RiBa?"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.mode:0
+#: field:riba.mode,journal:0
+msgid "Journal"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.mode,bank_id:0
+msgid "Bank account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.order:0
+msgid "Confirm Issue"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,company_currency:0
+#: report:riba.order:0
+msgid "Company Currency"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,move_line_id:0
+msgid "Entry line"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.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: riba_issue
+#: field:riba.mode,name:0
+msgid "Name"
+msgstr ""
+
+#. module: riba_issue
+#: report:riba.order:0
+msgid "Bank Account"
+msgstr ""
+
+#. module: riba_issue
+#: view:riba.line:0
+#: view:riba.order:0
+msgid "Entry Information"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.model,name:riba_issue.model_riba_order_create
+msgid "riba.order.create"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,order_id:0
+msgid "Order"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.order,total:0
+msgid "Total"
+msgstr ""
+
+#. module: riba_issue
+#: field:riba.line,partner_id:0
+#: report:riba.order:0
+msgid "Partner"
+msgstr ""
+
+#. module: riba_issue
+#: model:ir.actions.act_window,name:riba_issue.action_create_riba_order
+msgid "Populate RiBa"
+msgstr ""
+
+#. module: riba_issue
+#: help:riba.mode,bank_id:0
+msgid "Bank Account for the Riba Mode"
+msgstr ""

=== 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-10-20 09:16:17 +0000
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import riba_order
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== 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-10-20 09:16:17 +0000
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from report import report_sxw
+from osv import osv
+from tools.translate import _
+from decimal import *
+
+
+class riba_order(report_sxw.rml_parse):
+
+
+    def __init__(self, cr, uid, name, context):
+        super(riba_order, self).__init__(cr, uid, name, context=context)
+        self.localcontext.update({
+            'time': time,
+            'cr': cr,
+            'uid': uid,
+
+        })
+
+
+report_sxw.report_sxw('report.riba.order', 'riba.order', 'addons/riba_issue/report/order.mako', parser=riba_order)
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== 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-10-20 09:16:17 +0000
@@ -0,0 +1,521 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+
+from osv import osv, fields
+import netsvc
+from tools.translate import _
+import datetime
+
+
+
+class riba_mode(osv.osv):
+    _name= 'riba.mode'
+    _description= 'Presentacion Bank'
+    _columns = {
+        'name': fields.char('Bank of Presentacion', size=64, required=True, help='Banca di Presentazione'),
+        'bank_id': fields.many2one('res.partner.bank', "Bank Account for the Riba Mode",
+            required=True,help='Presentacion bank account for the RiBa'),
+        'journal': fields.many2one('account.journal', 'Journal', required=True,
+            domain=[('type', '=', 'bank')], help='Bank Journal for the Mode 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"""
+        """ID's Creditor Banks"""
+        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 RiBa 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_address_obj = self.pool.get('res.partner.address')
+
+        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_address_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_address_obj = self.pool.get('res.partner.address')
+        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_address_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 s_bank_types(self, cr, uid, payment_code=None, context=None):
+        """Return the codes of the bank type that are suitable
+        for the given bank payment of riba line"""
+        """ID's Debitor's Banks"""
+        if not payment_code:
+            return []
+        cr.execute(""" SELECT pb.name
+            FROM res_partner_bank pb
+            JOIN riba_line rl ON (rl.bank_id = pb.id)
+            WHERE rl.id = %s """, [payment_code])
+        return [x[0] for x in cr.fetchall()]
+
+    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', '=', 'receivable'), ('account_id.type', '=', 'receivable')], 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', 'Debitor Bank'),
+        '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 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),
+        '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_address_obj = self.pool.get('res.partner.address')
+        partner_obj = self.pool.get('res.partner')
+        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_address_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 = self.s_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()
+
+class account_payment_term(osv.osv):
+    # This OpenERP object inherits from account_payment_term 
+    # to add a new boolean field
+    _inherit = 'account.payment.term'
+    _columns = {
+        'riba' : fields.boolean('Riba'),
+    }
+    _defaults = {
+        'riba': 0,
+    }
+# create an instance of account_payment_term_ 
+# to migrate the objects in the system
+account_payment_term()
+
+class res_bank_add_field(osv.osv):
+    # This OpenERP object inherits from account_payment_term 
+    # to add a new boolean field
+    _inherit = 'res.bank'
+    _columns = {
+        'banca_estera' : fields.boolean('Banca Estera'),
+    }
+# create an instance of account_payment_term_ 
+# to migrate the objects in the system
+res_bank_add_field()
+
+class res_partner_bank_add(osv.osv):
+    # This OpenERP object inherits from account_payment_term 
+    # to add a new boolean field
+    _inherit = "res.partner.bank"
+    _columns = {
+        'codice_sia' : fields.char('Codice SIA', size=5, help="Identification Code of the Company in the System Interbank")    
+    }
+
+# create an instance of account_payment_term_ 
+# to migrate the objects in the system
+res_partner_bank_add()
+
+# 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-10-20 09:16:17 +0000
@@ -0,0 +1,365 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!-- 
+        Create a new field based on account.view_payment_term_from
+        base is the module which contains the code of the account view form
+        view_payment_term_from is the xml ID of the view in addons/account/account_view.xml
+        -->
+        <record id="view_riba_add_text_field" model="ir.ui.view">
+            <field name="name">account.riba.add.text.field</field>
+            <field name="model">account.payment.term</field>
+	    <field name="inherit_id" ref="account.view_payment_term_form"/>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                 <field name="active" position="after">
+                    <field name="riba"/>
+                </field>
+             </field>
+        </record>
+        <!-- 
+        Create a new field based on base.view_parter_from
+        base is the module which contains the code of the account view form
+        view_parter_form is the xml ID of the view in addons/base/res/bank_view.xml
+        -->
+        <record id="view_res_bank_add_text_field" model="ir.ui.view">
+            <field name="name">res.bank.add.text.field</field>
+            <field name="model">res.bank</field>
+	    <field name="inherit_id" ref="base.view_res_bank_form"/>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                 <field name="bic" position="after">
+                    <field name="banca_estera"/>
+                 </field>
+             </field>
+        </record>
+
+       <!-- view for res.partner for SIA Code-->
+        <record id="view_partner_sia_form" model="ir.ui.view">
+            <field name="name">res.partner.form.sia.inherit</field>
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="base.view_partner_form"/>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <field name="acc_number" position="after">
+                    <newline/>
+                    <field name="codice_sia"/>
+                    <newline/>
+                </field>
+            </field>
+        </record>
+
+        <!-- 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>
+
+        <!-- Icon Menu Principale -->
+        <menuitem name="RiBa" parent="account.menu_finance" id="menu_riba" icon="terp-folder-green" sequence="8"/>
+
+        <!-- Vista RiBa Mode (Banca Aziendale di Presentazione Pagamenti Riba) -->
+
+        <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"/> 
+
+
+        <!-- Vista RiBa Order (Raggrupamento Pagamenti Riba Lines) -->
+
+<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"/> 
+                    </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="[('reconcile_id','=', True),('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_date_created"/>
+                            <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 Riba Orders">
+                    <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"/>
+        <menuitem action="action_invoice_customer_tree1" id="menu_action_invoice_customer_tree1" parent="menu_riba" sequence="2"/>
+
+        <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>
+
+        <!-- Vista RiBa Lines (Riga Pagamento Riba) -->
+        <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,company_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="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"/>
+                        </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_date_created" />
+                    <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>
+
+    </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-10-20 09:16:17 +0000
@@ -0,0 +1,11 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_riba_mode","riba.mode","model_riba_mode","group_payment_riba",1,1,1,1
+"access_riba_order","riba.order","model_riba_order","group_payment_riba",1,1,1,1
+"access_riba_line","riba.line","model_riba_line","group_payment_riba",1,1,1,1
+"access_account_journal_riba","account.journal riba","account.model_account_journal","group_payment_riba",1,0,0,0
+"access_account_invoice_riba","account.invoice riba","account.model_account_invoice","group_payment_riba",1,0,0,0
+"access_account_move_line_riba","account.move.line payment","account.model_account_move_line","group_payment_riba",1,0,0,0
+"access_riba_order_accountant","riba.order accountant","model_riba_order","account.group_account_user",1,1,1,1
+"access_riba_order_manager","riba.order manager","model_riba_order","account.group_account_manager",1,0,0,0
+"access_riba_order_invoice","riba.order invoice","model_riba_order","account.group_account_invoice",1,1,1,1
+"access_riba_line_invoice","riba.line invoice","model_riba_line","account.group_account_invoice",1,1,1,1

=== 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-10-20 09:16:17 +0000
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data noupdate="1">
+
+    <record id="group_payment_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-10-20 09:16:17 +0000
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import riba_issue_order
+import riba_issue_pay
+import riba_file_export
+
+# 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-10-20 09:16:17 +0000
@@ -0,0 +1,130 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from lxml import etree
+from tools.translate import _
+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)
+        line2iban = line_obj.line2iban(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
+            iban = []
+            if line2iban.get(line.id):
+                iban = line2iban.get(line.id)
+            else:
+                raise osv.except_osv('Error', _('For one o more partner(s) NO has been specified IBAN '))        
+            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')
+        invoice_obj = self.pool.get('account.invoice')
+        if context is None:
+            context = {}
+        data = self.browse(cr, uid, ids, context=context)[0]
+        move_id = invoice_obj.search_move_id_riba(cr, uid, ids, context)       
+        search_due_date = data.duedate
+        # Search for move line to pay:
+        domain = [('account_id.type', '=', 'receivable'), ('amount_to_pay', '>', 0), ('move_id', 'in', move_id)]
+        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-10-20 09:16:17 +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 Riba 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 Order" 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-10-20 09:16:17 +0000
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    Copyright (C) 2011 OpenERP Italian Community (<http://www.openerp-italia.org>).
+#    All Rights Reserved 
+#    Thanks to Cecchi s.r.l http://www.cecchi.com/
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv
+
+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_riba_order.set_done(cr, uid, [context['active_id']], context)
+        return {'type': 'ir.actions.act_window_close'}
+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-10-20 09:16:17 +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>