openerp-l10n-ar-localization team mailing list archive
-
openerp-l10n-ar-localization team
-
Mailing list archive
-
Message #00071
[Merge] lp:~poyo-ar/openerp-l10n-ar-localization/trunk into lp:openerp-l10n-ar-localization
SilvinaF has proposed merging lp:~poyo-ar/openerp-l10n-ar-localization/trunk into lp:openerp-l10n-ar-localization.
Requested reviews:
OpenERP - Team de Localización Argentina (openerp-l10n-ar-localization)
For more details, see:
https://code.launchpad.net/~poyo-ar/openerp-l10n-ar-localization/trunk/+merge/132709
Manejo de cheques propios y de terceros.Modulo:(l10n_ar_account_check_duo).
---------------------------------------------------------------------------
Configuracion:
-Debe habilitar el diario para el uso de cheques en configuracion del diario y tildar el la solapa correspondiente si es para ambos o para uno en particular. Esto habilitara una solapa en el pago al seleccionar el diario.
Deberá tambien agregar en Settings/Companies .seleccionar su empresa y en la solapa Bank Accounts
agregar la cuenta en el campo correspondiente (Information about the Banck).
Informacion
-Se realiza un pago con un cheque propio o un cheque de tercero.(no ambos)
- Menu Accounting/Bank and Cash se encuentra la carga de cheques propios y de terceros. Cada uno con sus respectivas acciones segun workflow (estados de los cheques).
Manejo de chequera para cheques propios . Modulo (l10n_ar_account_checkbook)
----------------------------------------------------------------------------
Acceso:
Accounting/Configuration/Miscellaneous/Checbook
Manejo de Notas de Debito (Clientes y Proveedores) . Modulo (l10n_ar_account_check_debit_note)
----------------------------------------------------------------------------------------------
Dentro de los menues correspondientes Accounting/Customer o Accounting/Suppliers hay una nueva entrada para las notas de debito, que se generan al rechazar los cheques.
--
https://code.launchpad.net/~poyo-ar/openerp-l10n-ar-localization/trunk/+merge/132709
Your team OpenERP - Team de Localización Argentina is requested to review the proposed merge of lp:~poyo-ar/openerp-l10n-ar-localization/trunk into lp:openerp-l10n-ar-localization.
=== added directory 'l10n_ar_account_check_debit_note'
=== added file 'l10n_ar_account_check_debit_note/__init__.py'
--- l10n_ar_account_check_debit_note/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_debit_note/__init__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,2 @@
+import invoice
+import voucher
=== added file 'l10n_ar_account_check_debit_note/__openerp__.py'
--- l10n_ar_account_check_debit_note/__openerp__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_debit_note/__openerp__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,32 @@
+# coding=utf-8
+# Copyright (C) <2011> <Thymbra>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+{
+ 'name': 'Account Check Debit Note',
+ 'version': '1.0',
+ 'author': 'Ignacio E. Parszyk, Silvina Faner',
+ 'description': """
+ Add the type field to the invoices, allowing to input debit notes
+ """,
+ 'category': 'Generic Modules/Accounting',
+ 'depends': ["account","account_voucher",
+ ],
+ 'init_xml': [],
+ 'demo_xml': [],
+ 'update_xml': [
+ 'invoice_view.xml',
+ ],
+ 'test': [
+ ],
+ 'active': False,
+ 'installable': True,
+}
=== added directory 'l10n_ar_account_check_debit_note/i18n'
=== added file 'l10n_ar_account_check_debit_note/i18n/en_AR.mo'
Binary files l10n_ar_account_check_debit_note/i18n/en_AR.mo 1970-01-01 00:00:00 +0000 and l10n_ar_account_check_debit_note/i18n/en_AR.mo 2012-11-02 15:08:21 +0000 differ
=== added file 'l10n_ar_account_check_debit_note/i18n/en_AR.po'
--- l10n_ar_account_check_debit_note/i18n/en_AR.po 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_debit_note/i18n/en_AR.po 2012-11-02 15:08:21 +0000
@@ -0,0 +1,248 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * account_check_debit_note
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-10-31 00:48+0000\n"
+"PO-Revision-Date: 2012-10-31 11:46-0300\n"
+"Last-Translator: s <poyo.ar@xxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: account_check_debit_note
+#: model:ir.actions.act_window,name:account_check_debit_note.action_debit_note_tree
+#: model:ir.ui.menu,name:account_check_debit_note.menu_action_debit_tree
+msgid "Customer Debit Notes"
+msgstr "Nota de Débito de Clientes"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:298
+#, python-format
+msgid ""
+"Cannot create the invoice !\n"
+"The payment term defined gives a computed amount greater than the total invoiced amount."
+msgstr ""
+"No se puede crear la factura !\n"
+"El termino de pago definido da una cantidad calculada mayorque el monto total de la factura."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:268
+#, python-format
+msgid "No Invoice Lines !"
+msgstr "No hay línea de factura !"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:214
+#, python-format
+msgid "Invoice line account company does not match with invoice company."
+msgstr "La cuenta en la línea de la factura, no coincide con la cuenta de la empresa en la factura."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:287
+#, python-format
+msgid "Bad total !"
+msgstr "Error en el total !"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:234
+#, python-format
+msgid ""
+"Can't find any account journal of %s type for this company.\n"
+"\n"
+"You can create one in the menu: \n"
+"Configuration\\Financial Accounting\\Accounts\\Journals."
+msgstr ""
+"No se puede encontrar un diario de cuenta del %s tipo para esta empresa.\n"
+"\n"
+"Puede crear uno en el menu: \n"
+"Configuración\\Contabilidad Financiera\\Cuentas\\Journals."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:51
+#, python-format
+msgid "You have to define an analytic journal on the '%s' journal!"
+msgstr "Debe definir el diario analítico en el '%s' diario!"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:123
+#: code:addons/account_check_debit_note/invoice.py:189
+#: code:addons/account_check_debit_note/invoice.py:204
+#: code:addons/account_check_debit_note/invoice.py:213
+#: code:addons/account_check_debit_note/invoice.py:234
+#, python-format
+msgid "Configuration Error !"
+msgstr "Error de Configuración !"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:443
+#, python-format
+msgid "Supplier"
+msgstr "Proveedor"
+
+#. module: account_check_debit_note
+#: view:account.invoice:0
+msgid "Type"
+msgstr "Tipo"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:268
+#, python-format
+msgid "Please create some invoice lines."
+msgstr "Por favor crear alguna línea de factura."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:266
+#: code:addons/account_check_debit_note/invoice.py:298
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: account_check_debit_note
+#: model:ir.model,name:account_check_debit_note.model_account_journal
+msgid "Journal"
+msgstr "Diarios"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:534
+#, python-format
+msgid "is validated."
+msgstr "Es válido."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:266
+#, python-format
+msgid "Please define sequence on invoice journal"
+msgstr "Por favor defina una secuencia en el diario de factura."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:465
+#, python-format
+msgid "There is no Accounting Journal of type Sale/Purchase defined!"
+msgstr "Esta no es un Diario de cuenta del tipo Venta/Compra"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:459
+#, python-format
+msgid "Invoice '%s' is waiting for validation."
+msgstr "La Factura '%s' está siendo validada."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:534
+#, python-format
+msgid "Invoice "
+msgstr "Factura"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:441
+#, python-format
+msgid "Customer"
+msgstr "Clientes"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:467
+#, python-format
+msgid "Unknown Error"
+msgstr "Error desconocido"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:558
+#, python-format
+msgid "Pay Invoice"
+msgstr "Pago de Factura"
+
+#. module: account_check_debit_note
+#: constraint:account.journal:0
+msgid "Configuration error! The currency chosen should be shared by the default accounts too."
+msgstr "Error de Configuración! La moneda elegida también debe ser compartida por las cuentas por defecto."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:205
+#, python-format
+msgid "Can not find account chart for this company in invoice line account, Please Create account."
+msgstr "No se puede encontrar la cuenta para esta empresa en la línea de Factura, Por favor crear una cuenta."
+
+#. module: account_check_debit_note
+#: model:ir.actions.act_window,name:account_check_debit_note.action_supplier_debit_note_tree
+#: model:ir.ui.menu,name:account_check_debit_note.menu_action_supplier_debit_note_tree
+msgid "Supplier Debit Notes"
+msgstr "Nota de Débito del Proveedor"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:378
+#, python-format
+msgid "UserError"
+msgstr "Error de Usuario"
+
+#. module: account_check_debit_note
+#: sql_constraint:account.invoice:0
+msgid "Invoice Number must be unique per Company!"
+msgstr "Invoice Number must be unique per Company!"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:287
+#, python-format
+msgid ""
+"Please verify the price of the invoice !\n"
+"The real total does not match the computed total."
+msgstr ""
+"Por favor, verifique el monto de la factura !\n"
+"El total no coincide con el total computado."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:51
+#: code:addons/account_check_debit_note/invoice.py:88
+#, python-format
+msgid "No Analytic Journal !"
+msgstr "No es un Diario Analítico !"
+
+#. module: account_check_debit_note
+#: model:ir.model,name:account_check_debit_note.model_account_voucher
+msgid "Accounting Voucher"
+msgstr "Accounting Voucher"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:88
+#, python-format
+msgid "You must define an analytic journal of type '%s' !"
+msgstr "Debe definir un Diario Analítico del tipo '%s' !"
+
+#. module: account_check_debit_note
+#: sql_constraint:account.journal:0
+msgid "The name of the journal must be unique per company !"
+msgstr "El nombre del diario debe ser único por cada empresa !"
+
+#. module: account_check_debit_note
+#: sql_constraint:account.journal:0
+msgid "The code of the journal must be unique per company !"
+msgstr "El nombre del diario debe ser único por cada empresa !"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:464
+#, python-format
+msgid "Configuration Error!"
+msgstr "Configuration Error!"
+
+#. module: account_check_debit_note
+#: model:ir.model,name:account_check_debit_note.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:124
+#: code:addons/account_check_debit_note/invoice.py:190
+#, python-format
+msgid "Can not find account chart for this company, Please Create account."
+msgstr "No se puede encontrar la cuenta para esta empresa, Por favor crear una cuenta."
+
+#. module: account_check_debit_note
+#: code:addons/account_check_debit_note/invoice.py:379
+#, python-format
+msgid "Cannot create invoice move on centralised journal"
+msgstr "Cannot create invoice move on centralised journal"
+
=== added file 'l10n_ar_account_check_debit_note/invoice.py'
--- l10n_ar_account_check_debit_note/invoice.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_debit_note/invoice.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,579 @@
+import time
+from lxml import etree
+import decimal_precision as dp
+
+import netsvc
+import pooler
+from osv import fields, osv, orm
+from tools.translate import _
+import logging
+_logger = logging.getLogger(__name__)
+
+
+class account_invoice(osv.osv):
+ _name = 'account.invoice'
+ _inherit = 'account.invoice'
+ _description = 'Account Invoice Debit Note'
+
+ _columns = {
+ 'type': fields.selection([
+ ('out_invoice', 'Customer Invoice'),
+ ('in_invoice', 'Supplier Invoice'),
+ ('out_refund', 'Customer Refund'),
+ ('in_refund', 'Supplier Refund'),
+ ('in_debit', 'Supplier Debit Note'), # Added
+ ('out_debit', 'Client Debit Note'), # Added
+ ], 'Type', readonly=True, select=True), # Modified
+ }
+
+ # Modified
+ def _get_analytic_lines(self, cr, uid, id,context=None):
+ if context is None:
+ context = {}
+
+ inv = self.browse(cr, uid, id)
+ cur_obj = self.pool.get('res.currency')
+
+ company_currency = inv.company_id.currency_id.id
+ if inv.type in ('out_invoice', 'in_refund'):
+ sign = 1
+ else:
+ sign = -1
+
+ iml = self.pool.get('account.invoice.line').move_line_get(cr, uid, inv.id,context=context)
+ for il in iml:
+ if il['account_analytic_id']:
+ if inv.type in ('in_invoice', 'in_refund', 'in_debit'): # Modified
+ ref = inv.reference
+ else:
+ ref = self._convert_ref(cr, uid, inv.number)
+ if not inv.journal_id.analytic_journal_id:
+ raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (inv.journal_id.name,))
+ il['analytic_lines'] = [(0,0, {
+ 'name': il['name'],
+ 'date': inv['date_invoice'],
+ 'account_id': il['account_analytic_id'],
+ 'unit_amount': il['quantity'],
+ 'amount': cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, il['price'], context={'date': inv.date_invoice}) * sign,
+ 'product_id': il['product_id'],
+ 'product_uom_id': il['uos_id'],
+ 'general_account_id': il['account_id'],
+ 'journal_id': inv.journal_id.analytic_journal_id.id,
+ 'ref': ref,
+ })]
+ return iml
+
+ # Modified
+ def _get_journal(self, cr, uid, context=None):
+ if context is None:
+ context = {}
+ type_inv = context.get('type', 'out_invoice')
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ company_id = context.get('company_id', user.company_id.id)
+ type2journal = {'out_invoice': 'sale', 'out_debit': 'sale', 'in_invoice': 'purchase', 'in_debit': 'purchase', 'out_refund': 'sale_refund', 'in_refund': 'purchase_refund'} # Modified
+ refund_journal = {'out_invoice': False, 'out_debit': False, 'in_invoice': False, 'in_debit': False, 'out_refund': True, 'in_refund': True} # Modified
+ journal_obj = self.pool.get('account.journal')
+ res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'sale')),
+ ('company_id', '=', company_id)],
+ # ('refund_journal', '=', refund_journal.get(type_inv, False))],
+ limit=1)
+ return res and res[0] or False # Modified
+
+ # Modified
+ def _get_journal_analytic(self, cr, uid, type_inv, context=None):
+ type2journal = {'out_invoice': 'sale', 'out_debit': 'sale', 'in_invoice': 'purchase', 'in_debit': 'purchase', 'out_refund': 'sale', 'in_refund': 'purchase'} # Modified
+ tt = type2journal.get(type_inv, 'sale')
+ result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context)
+ if not result:
+ raise osv.except_osv(_('No Analytic Journal !'),_("You must define an analytic journal of type '%s' !") % (tt,))
+ return result and result[0] or False # Modified
+
+ # Modified
+ def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
+ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False):
+ invoice_addr_id = False
+ contact_addr_id = False
+ partner_payment_term = False
+ acc_id = False
+ bank_id = False
+ fiscal_position = False
+
+ opt = [('uid', str(uid))]
+ if partner_id:
+
+ opt.insert(0, ('id', partner_id))
+ res = self.pool.get('res.partner').address_get(cr, uid, [partner_id], ['contact', 'invoice'])
+ contact_addr_id = res['contact']
+ invoice_addr_id = res['invoice']
+ p = self.pool.get('res.partner').browse(cr, uid, partner_id)
+ if company_id:
+ if p.property_account_receivable.company_id.id != company_id and p.property_account_payable.company_id.id != company_id:
+ property_obj = self.pool.get('ir.property')
+ rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
+ pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('res_id','=','res.partner,'+str(partner_id)+''),('company_id','=',company_id)])
+ if not rec_pro_id:
+ rec_pro_id = property_obj.search(cr,uid,[('name','=','property_account_receivable'),('company_id','=',company_id)])
+ if not pay_pro_id:
+ pay_pro_id = property_obj.search(cr,uid,[('name','=','property_account_payable'),('company_id','=',company_id)])
+ rec_line_data = property_obj.read(cr,uid,rec_pro_id,['name','value_reference','res_id'])
+ pay_line_data = property_obj.read(cr,uid,pay_pro_id,['name','value_reference','res_id'])
+ rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False
+ pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False
+ if not rec_res_id and not pay_res_id:
+ raise osv.except_osv(_('Configuration Error !'),
+ _('Can not find account chart for this company, Please Create account.'))
+ account_obj = self.pool.get('account.account')
+ rec_obj_acc = account_obj.browse(cr, uid, [rec_res_id])
+ pay_obj_acc = account_obj.browse(cr, uid, [pay_res_id])
+ p.property_account_receivable = rec_obj_acc[0]
+ p.property_account_payable = pay_obj_acc[0]
+
+ if type in ('out_invoice', 'out_refund', 'out_debit'): # Modified
+ acc_id = p.property_account_receivable.id
+ else:
+ acc_id = p.property_account_payable.id
+ fiscal_position = p.property_account_position and p.property_account_position.id or False
+ partner_payment_term = p.property_payment_term and p.property_payment_term.id or False
+ if p.bank_ids:
+ bank_id = p.bank_ids[0].id
+
+ result = {'value': {
+ 'address_contact_id': contact_addr_id,
+ 'address_invoice_id': invoice_addr_id,
+ 'account_id': acc_id,
+ 'payment_term': partner_payment_term,
+ 'fiscal_position': fiscal_position
+ }
+ }
+
+ if type in ('in_invoice', 'in_refund', 'in_debit'): # Modified
+ result['value']['partner_bank_id'] = bank_id
+
+ if payment_term != partner_payment_term:
+ if partner_payment_term:
+ to_update = self.onchange_payment_term_date_invoice(
+ cr, uid, ids, partner_payment_term, date_invoice)
+ result['value'].update(to_update['value'])
+ else:
+ result['value']['date_due'] = False
+
+ if partner_bank_id != bank_id:
+ to_update = self.onchange_partner_bank(cr, uid, ids, bank_id)
+ result['value'].update(to_update['value'])
+ return result
+
+ # Modified
+ def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id):
+ val = {}
+ dom = {}
+ obj_journal = self.pool.get('account.journal')
+ account_obj = self.pool.get('account.account')
+ inv_line_obj = self.pool.get('account.invoice.line')
+ if company_id and part_id and type:
+ acc_id = False
+ partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id)
+ if partner_obj.property_account_payable and partner_obj.property_account_receivable:
+ if partner_obj.property_account_payable.company_id.id != company_id and partner_obj.property_account_receivable.company_id.id != company_id:
+ property_obj = self.pool.get('ir.property')
+ rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
+ pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)])
+ if not rec_pro_id:
+ rec_pro_id = property_obj.search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)])
+ if not pay_pro_id:
+ pay_pro_id = property_obj.search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)])
+ rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value_reference','res_id'])
+ pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value_reference','res_id'])
+ rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or False
+ pay_res_id = pay_line_data and pay_line_data[0].get('value_reference',False) and int(pay_line_data[0]['value_reference'].split(',')[1]) or False
+ if not rec_res_id and not pay_res_id:
+ raise osv.except_osv(_('Configuration Error !'),
+ _('Can not find account chart for this company, Please Create account.'))
+ if type in ('out_invoice', 'out_refund'):
+ acc_id = rec_res_id
+ else:
+ acc_id = pay_res_id
+ val= {'account_id': acc_id}
+ if ids:
+ if company_id:
+ inv_obj = self.browse(cr,uid,ids)
+ for line in inv_obj[0].invoice_line:
+ if line.account_id:
+ if line.account_id.company_id.id != company_id:
+ result_id = account_obj.search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)])
+ if not result_id:
+ raise osv.except_osv(_('Configuration Error !'),
+ _('Can not find account chart for this company in invoice line account, Please Create account.'))
+ # inv_line_obj.write(cr, uid, [line.id], {'account_id': result_id[0]}) SIL
+ inv_line_obj.write(cr, uid, [line.id], {'account_id': result_id[-1]})
+ else:
+ if invoice_line:
+ for inv_line in invoice_line:
+ obj_l = account_obj.browse(cr, uid, inv_line[2]['account_id'])
+ if obj_l.company_id.id != company_id:
+ raise osv.except_osv(_('Configuration Error !'),
+ _('Invoice line account company does not match with invoice company.'))
+ else:
+ continue
+ if company_id and type:
+ if type in ('out_invoice', 'out_debit'): # Modified
+ journal_type = 'sale'
+ elif type in ('out_refund'):
+ journal_type = 'sale_refund'
+ elif type in ('in_refund', 'in_debit'): # Modified
+ journal_type = 'purchase_refund'
+ else:
+ journal_type = 'purchase'
+ journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)])
+ if journal_ids:
+ val['journal_id'] = journal_ids[0]
+ res_journal_default = self.pool.get('ir.values').get(cr, uid, 'default', 'type=%s' % (type), ['account.invoice'])
+ for r in res_journal_default:
+ if r[1] == 'journal_id' and r[2] in journal_ids:
+ val['journal_id'] = r[2]
+ if not val.get('journal_id', False):
+ raise osv.except_osv(_('Configuration Error !'), (_('Can\'t find any account journal of %s type for this company.\n\nYou can create one in the menu: \nConfiguration\Financial Accounting\Accounts\Journals.') % (journal_type)))
+ dom = {'journal_id': [('id', 'in', journal_ids)]}
+ else:
+ journal_ids = obj_journal.search(cr, uid, [])
+
+ if currency_id and company_id:
+ currency = self.pool.get('res.currency').browse(cr, uid, currency_id)
+ if currency.company_id and currency.company_id.id != company_id:
+ val['currency_id'] = False
+ else:
+ val['currency_id'] = currency.id
+ if company_id:
+ company = self.pool.get('res.company').browse(cr, uid, company_id)
+ if company.currency_id.company_id and company.currency_id.company_id.id != company_id:
+ val['currency_id'] = False
+ else:
+ val['currency_id'] = company.currency_id.id
+ return {'value': val, 'domain': dom}
+
+ # Modified
+ def action_move_create(self, cr, uid, ids,context=None):
+ """Creates invoice related analytics and financial move lines"""
+ ait_obj = self.pool.get('account.invoice.tax')
+ cur_obj = self.pool.get('res.currency')
+ period_obj = self.pool.get('account.period')
+ payment_term_obj = self.pool.get('account.payment.term')
+ journal_obj = self.pool.get('account.journal')
+ move_obj = self.pool.get('account.move')
+ if context is None:
+ context = {}
+ for inv in self.browse(cr, uid, ids,context=context):
+ if not inv.journal_id.sequence_id:
+ raise osv.except_osv(_('Error !'), _('Please define sequence on invoice journal'))
+ if not inv.invoice_line:
+ raise osv.except_osv(_('No Invoice Lines !'), _('Please create some invoice lines.'))
+ if inv.move_id:
+ continue
+ ctx = context.copy()
+ ctx.update({'lang': inv.partner_id.lang})
+
+ if not inv.date_invoice:
+ self.write(cr, uid, [inv.id], {'date_invoice': fields.date.context_today(self,cr,uid,context=context)}, context=ctx)
+ company_currency = inv.company_id.currency_id.id
+ # create the analytical lines
+ # one move line per invoice line
+ iml = self._get_analytic_lines(cr, uid, inv.id,context=ctx)
+ # check if taxes are all computed
+ ctx = context.copy()
+ ctx.update({'lang': inv.partner_id.lang})
+ compute_taxes = ait_obj.compute(cr, uid, inv.id, context=ctx)
+ self.check_tax_lines(cr, uid, inv, compute_taxes, ait_obj)
+
+ # SIL if inv.type in ('in_invoice', 'in_refund', 'in_debit') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0): # Modified
+ # raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe real total does not match the computed total.'))
+
+ if inv.payment_term:
+ total_fixed = total_percent = 0
+ for line in inv.payment_term.line_ids:
+ if line.value == 'fixed':
+ total_fixed += line.value_amount
+ if line.value == 'procent':
+ total_percent += line.value_amount
+ total_fixed = (total_fixed * 100) / (inv.amount_total or 1.0)
+ if (total_fixed + total_percent) > 100:
+ raise osv.except_osv(_('Error !'), _("Cannot create the invoice !\nThe payment term defined gives a computed amount greater than the total invoiced amount."))
+
+ # one move line per tax line
+ iml += ait_obj.move_line_get(cr, uid, inv.id)
+
+ entry_type = ''
+ if inv.type in ('in_invoice', 'in_refund', 'in_debit'): # Modified
+ ref = inv.reference
+ entry_type = 'journal_pur_voucher'
+ if inv.type == 'in_refund':
+ entry_type = 'cont_voucher'
+ else:
+ ref = self._convert_ref(cr, uid, inv.number)
+ entry_type = 'journal_sale_vou'
+ if inv.type == 'out_refund':
+ entry_type = 'cont_voucher'
+
+ diff_currency_p = inv.currency_id.id <> company_currency
+ # create one move line for the total and possibly adjust the other lines amount
+ total = 0
+ total_currency = 0
+ total, total_currency, iml = self.compute_invoice_totals(cr, uid, inv, company_currency, ref, iml)
+ acc_id = inv.account_id.id
+
+ name = inv['name'] or '/'
+ totlines = False
+ if inv.payment_term:
+ totlines = payment_term_obj.compute(cr,uid, inv.payment_term.id, total, inv.date_invoice or False, context=ctx)
+ if totlines:
+ res_amount_currency = total_currency
+ i = 0
+ ctx.update({'date': inv.date_invoice})
+ for t in totlines:
+ if inv.currency_id.id != company_currency:
+ amount_currency = cur_obj.compute(cr, uid, company_currency, inv.currency_id.id, t[1], context=ctx)
+ else:
+ amount_currency = False
+
+ # last line add the diff
+ res_amount_currency -= amount_currency or 0
+ i += 1
+ if i == len(totlines):
+ amount_currency += res_amount_currency
+
+ iml.append({
+ 'type': 'dest',
+ 'name': name,
+ 'price': t[1],
+ 'account_id': acc_id,
+ 'date_maturity': t[0],
+ 'amount_currency': diff_currency_p \
+ and amount_currency or False,
+ 'currency_id': diff_currency_p \
+ and inv.currency_id.id or False,
+ 'ref': ref,
+ })
+ else:
+ iml.append({
+ 'type': 'dest',
+ 'name': name,
+ 'price': total,
+ 'account_id': acc_id,
+ 'date_maturity': inv.date_due or False,
+ 'amount_currency': diff_currency_p \
+ and total_currency or False,
+ 'currency_id': diff_currency_p \
+ and inv.currency_id.id or False,
+ 'ref': ref
+ })
+
+ date = inv.date_invoice or time.strftime('%Y-%m-%d')
+ part = inv.partner_id.id
+
+ line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context=ctx)),iml)
+
+ line = self.group_lines(cr, uid, iml, line, inv)
+
+ journal_id = inv.journal_id.id
+ journal = self.pool.get('account.journal').browse(cr, uid, journal_id,context=ctx)
+ if journal.centralisation:
+ raise osv.except_osv(_('UserError'),
+ _('Cannot create invoice move on centralised journal'))
+
+ line = self.finalize_invoice_move_lines(cr, uid, inv, line)
+
+ move = {
+ 'ref': inv.reference and inv.reference or inv.name,
+ 'line_id': line,
+ 'journal_id': journal_id,
+ 'date': date,
+ 'type': entry_type,
+ 'narration':inv.comment
+ }
+ period_id = inv.period_id and inv.period_id.id or False
+ if not period_id:
+ period_ids = self.pool.get('account.period').search(cr, uid, [('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d')), ('company_id', '=', inv.company_id.id)])
+ if period_ids:
+ period_id = period_ids[0]
+ if period_id:
+ move['period_id'] = period_id
+ for i in line:
+ i[2]['period_id'] = period_id
+
+ move_id = move_obj.create(cr, uid, move, context=ctx)
+ new_move_name = move_obj.browse(cr, uid, move_id, context=ctx).name
+ # make the invoice point to that move
+ self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name}, context=ctx)
+ # Pass invoice in context in method post: used if you want to get the same
+ # account move reference when creating the same invoice after a cancelled one:
+ ctx.update({'invoice':inv})
+ move_obj.post(cr, uid, [move_id], context=ctx)
+ self._log_event(cr, uid, ids)
+ return True
+
+ # Modified
+ def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
+ if context is None:
+ context = {}
+ journal_obj = self.pool.get('account.journal')
+
+ if context.get('active_model', '') in ['res.partner'] and context.get('active_ids', False) and context['active_ids']:
+ partner = self.pool.get(context['active_model']).read(cr, uid, context['active_ids'], ['supplier','customer'])[0]
+ if not view_type:
+ view_id = self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'account.invoice.tree')])
+ view_type = 'tree'
+ if view_type == 'form':
+ if partner['supplier'] and not partner['customer']:
+ view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.supplier.form')])
+ else:
+ view_id = self.pool.get('ir.ui.view').search(cr,uid,[('name', '=', 'account.invoice.form')])
+ if view_id and isinstance(view_id, (list, tuple)):
+ view_id = view_id[0]
+ res = super(account_invoice,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
+
+ type = context.get('journal_type', 'sale')
+ for field in res['fields']:
+ if field == 'journal_id':
+ journal_select = journal_obj._name_search(cr, uid, '', [('type', '=', type)], context=context, limit=None, name_get_uid=1)
+ res['fields'][field]['selection'] = journal_select
+
+ if view_type == 'tree':
+ doc = etree.XML(res['arch'])
+ nodes = doc.xpath("//field[@name='partner_id']")
+ partner_string = _('Customer')
+ if context.get('type', 'out_invoice') in ('in_invoice', 'in_refund', 'in_debit'): # Modified
+ partner_string = _('Supplier')
+ for node in nodes:
+ node.set('string', partner_string)
+ res['arch'] = etree.tostring(doc)
+ return res
+
+ # Modified
+ def create(self, cr, uid, vals, context=None):
+ if context is None:
+ context = {}
+ try:
+ res = super(account_invoice, self).create(cr, uid, vals, context)
+ for inv_id, name in self.name_get(cr, uid, [res], context=context):
+ ctx = context.copy()
+ if vals.get('type', 'in_invoice') in ('out_invoice', 'out_refund', 'out_debit'): # Modified
+ ctx = self.get_log_context(cr, uid, context=ctx)
+ message = _("Invoice '%s' is waiting for validation.") % name
+ self.log(cr, uid, inv_id, message, context=ctx)
+ return res
+ except Exception, e:
+ if '"journal_id" viol' in e.args[0]:
+ raise orm.except_orm(_('Configuration Error!'),
+ _('There is no Accounting Journal of type Sale/Purchase defined!'))
+ else:
+ raise orm.except_orm(_('Unknown Error'), str(e))
+
+ # Modified
+ def compute_invoice_totals(self, cr, uid, inv, company_currency, ref, invoice_move_lines):
+ total = 0
+ total_currency = 0
+ cur_obj = self.pool.get('res.currency')
+ for i in invoice_move_lines:
+ if inv.currency_id.id != company_currency:
+ i['currency_id'] = inv.currency_id.id
+ i['amount_currency'] = i['price']
+ i['price'] = cur_obj.compute(cr, uid, inv.currency_id.id,
+ company_currency, i['price'],
+ context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
+ else:
+ i['amount_currency'] = False
+ i['currency_id'] = False
+ i['ref'] = ref
+ if inv.type in ('out_invoice','in_refund', 'out_debit'): # Modified
+ total += i['price']
+ total_currency += i['amount_currency'] or i['price']
+ i['price'] = - i['price']
+ else:
+ total -= i['price']
+ total_currency -= i['amount_currency'] or i['price']
+ return total, total_currency, invoice_move_lines
+
+ # Modified
+ def action_number(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ #TODO: not correct fix but required a frech values before reading it.
+ self.write(cr, uid, ids, {})
+
+ for obj_inv in self.browse(cr, uid, ids, context=context):
+ id = obj_inv.id
+ invtype = obj_inv.type
+ number = obj_inv.number
+ move_id = obj_inv.move_id and obj_inv.move_id.id or False
+ reference = obj_inv.reference or ''
+
+ self.write(cr, uid, ids, {'internal_number':number})
+
+ if invtype in ('in_invoice', 'in_refund', 'in_debit'): # Modified
+ if not reference:
+ ref = self._convert_ref(cr, uid, number)
+ else:
+ ref = reference
+ else:
+ ref = self._convert_ref(cr, uid, number)
+
+ cr.execute('UPDATE account_move SET ref=%s ' \
+ 'WHERE id=%s AND (ref is null OR ref = \'\')',
+ (ref, move_id))
+ cr.execute('UPDATE account_move_line SET ref=%s ' \
+ 'WHERE move_id=%s AND (ref is null OR ref = \'\')',
+ (ref, move_id))
+ cr.execute('UPDATE account_analytic_line SET ref=%s ' \
+ 'FROM account_move_line ' \
+ 'WHERE account_move_line.move_id = %s ' \
+ 'AND account_analytic_line.move_id = account_move_line.id',
+ (ref, move_id))
+
+ for inv_id, name in self.name_get(cr, uid, [id]):
+ ctx = context.copy()
+ if obj_inv.type in ('out_invoice', 'out_refund', 'out_debit'): # Modified
+ ctx = self.get_log_context(cr, uid, context=ctx)
+ message = _('Invoice ') + " '" + name + "' "+ _("is validated.")
+ self.log(cr, uid, inv_id, message, context=ctx)
+ return True
+
+ # Modified
+ def name_get(self, cr, uid, ids, context=None):
+ if not ids:
+ return []
+ types = {
+ 'out_invoice': 'CI: ',
+ 'in_invoice': 'SI: ',
+ 'out_refund': 'OR: ',
+ 'in_refund': 'SR: ',
+ 'out_debit': 'CD', # Added
+ 'in_debit': 'SD', # Added
+ }
+ return [(r['id'], (r['number']) or types[r['type']] + (r['name'] or '')) for r in self.read(cr, uid, ids, ['type', 'number', 'name'], context, load='_classic_write')]
+
+
+ def invoice_pay_customer(self, cr, uid, ids, context=None):
+ if not ids:
+ return []
+ inv = self.browse(cr, uid, ids[0], context=context)
+ 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.name,
+ 'close_after_process': True,
+ 'invoice_type':inv.type,
+ 'invoice_id':inv.id,
+ 'default_type': inv.type in ('out_invoice','out_refund','out_debit') and 'receipt' or 'payment', # Added
+ 'type': inv.type in ('out_invoice','out_refund','out_debit') and 'receipt' or 'payment' # Added
+ }
+ }
+
+account_invoice()
=== added file 'l10n_ar_account_check_debit_note/invoice_view.xml'
--- l10n_ar_account_check_debit_note/invoice_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_debit_note/invoice_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_invoice_supplier_form" model="ir.ui.view">
+ <field name="name">account.invoice.supplier.form</field>
+ <field name="model">account.invoice</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
+ <field name="arch" type="xml">
+ <field name="fiscal_position" position="after">
+ <field name="type" string="Type" readonly="1"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="view_invoice_form" model="ir.ui.view">
+ <field name="name">account.invoice.form</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="name" position="after">
+ <field name="type" string="Type" readonly="1"/>
+ </field>
+ </field>
+ </record>
+
+ <record id="action_supplier_debit_note_tree" model="ir.actions.act_window">
+ <field name="name">Supplier Debit Notes</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', '=', 'in_debit')]</field>
+ <field name="context">{'type': 'in_debit', 'journal_type': 'purchase'}</field>
+ <field name="search_view_id" ref="account.view_account_invoice_filter"/>
+ </record>
+
+ <menuitem action="action_supplier_debit_note_tree"
+ id="menu_action_supplier_debit_note_tree"
+ parent="account.menu_finance_payables"/>
+
+ <record id="action_debit_note_tree" model="ir.actions.act_window">
+ <field name="name">Customer Debit Notes</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_debit')]</field>
+ <field name="context">{'type': 'out_debit', 'journal_type': 'sale'}</field>
+ <field name="search_view_id" ref="account.view_account_invoice_filter"/>
+ </record>
+
+ <record id="action_debit_note_tree1_view1" model="ir.actions.act_window.view">
+ <field eval="1" name="sequence"/>
+ <field name="view_mode">tree</field>
+ <field name="act_window_id" ref="action_debit_note_tree"/>
+ </record>
+ <record id="action_debit_note_tree1_view2" model="ir.actions.act_window.view">
+ <field eval="2" name="sequence"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="account.invoice_form"/>
+ <field name="act_window_id" ref="action_debit_note_tree"/>
+ </record>
+ <menuitem action="action_debit_note_tree" id="menu_action_debit_tree"
+ parent="account.menu_finance_receivables"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_debit_note/voucher.py'
--- l10n_ar_account_check_debit_note/voucher.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_debit_note/voucher.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import time
+from lxml import etree
+
+import netsvc
+from osv import osv, fields
+import decimal_precision as dp
+from tools.translate import _
+import logging
+_logger = logging.getLogger(__name__)
+
+
+class account_voucher(osv.osv):
+
+
+ # Modified
+ def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
+ mod_obj = self.pool.get('ir.model.data')
+ if context is None: context = {}
+ _logger.info("context: %s",context)
+ if view_type == 'form':
+ if not view_id and context.get('invoice_type'):
+ if context.get('invoice_type') in ('out_invoice', 'out_refund','out_debit'):
+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
+ else:
+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form')
+ result = result and result[1] or False
+ view_id = result
+ if not view_id and context.get('line_type'):
+ if context.get('line_type') == 'customer':
+ _logger.info("customer: %s",view_id)
+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_receipt_form')
+ _logger.info("customer: %s",result)
+ else:
+ result = mod_obj.get_object_reference(cr, uid, 'account_voucher', 'view_vendor_payment_form')
+ result = result and result[1] or False
+ view_id = result
+
+ res = super(account_voucher, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
+ doc = etree.XML(res['arch'])
+
+ if context.get('type', 'sale') in ('purchase', 'payment'):
+ nodes = doc.xpath("//field[@name='partner_id']")
+ for node in nodes:
+ node.set('domain', "[('supplier', '=', True)]")
+ res['arch'] = etree.tostring(doc)
+ return res
+
+ _inherit = "account.voucher"
+ _description = 'Account voucher Debit Note'
+
+
+
+account_voucher()
+
=== added directory 'l10n_ar_account_check_duo'
=== added directory 'l10n_ar_account_check_duo/.git'
=== added file 'l10n_ar_account_check_duo/.git/HEAD'
--- l10n_ar_account_check_duo/.git/HEAD 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/HEAD 2012-11-02 15:08:21 +0000
@@ -0,0 +1,1 @@
+ref: refs/heads/master
=== added file 'l10n_ar_account_check_duo/.git/config'
--- l10n_ar_account_check_duo/.git/config 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/config 2012-11-02 15:08:21 +0000
@@ -0,0 +1,8 @@
+[core]
+ repositoryformatversion = 0
+ filemode = false
+ bare = false
+ logallrefupdates = true
+ symlinks = false
+ ignorecase = true
+ hideDotFiles = dotGitOnly
=== added file 'l10n_ar_account_check_duo/.git/description'
--- l10n_ar_account_check_duo/.git/description 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/description 2012-11-02 15:08:21 +0000
@@ -0,0 +1,1 @@
+Unnamed repository; edit this file 'description' to name the repository.
=== added directory 'l10n_ar_account_check_duo/.git/hooks'
=== added file 'l10n_ar_account_check_duo/.git/hooks/applypatch-msg.sample'
--- l10n_ar_account_check_duo/.git/hooks/applypatch-msg.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/applypatch-msg.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message taken by
+# applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit. The hook is
+# allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "applypatch-msg".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/commit-msg" &&
+ exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
+:
=== added file 'l10n_ar_account_check_duo/.git/hooks/commit-msg.sample'
--- l10n_ar_account_check_duo/.git/hooks/commit-msg.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/commit-msg.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# An example hook script to check the commit log message.
+# Called by "git commit" with one argument, the name of the file
+# that has the commit message. The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit. The hook is allowed to edit the commit message file.
+#
+# To enable this hook, rename this file to "commit-msg".
+
+# Uncomment the below to add a Signed-off-by line to the message.
+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
+# hook is more suited to it.
+#
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
+
+# This example catches duplicate Signed-off-by lines.
+
+test "" = "$(grep '^Signed-off-by: ' "$1" |
+ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || {
+ echo >&2 Duplicate Signed-off-by lines.
+ exit 1
+}
=== added file 'l10n_ar_account_check_duo/.git/hooks/post-commit.sample'
--- l10n_ar_account_check_duo/.git/hooks/post-commit.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/post-commit.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# An example hook script that is called after a successful
+# commit is made.
+#
+# To enable this hook, rename this file to "post-commit".
+
+: Nothing
=== added file 'l10n_ar_account_check_duo/.git/hooks/post-receive.sample'
--- l10n_ar_account_check_duo/.git/hooks/post-receive.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/post-receive.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# An example hook script for the "post-receive" event.
+#
+# The "post-receive" script is run after receive-pack has accepted a pack
+# and the repository has been updated. It is passed arguments in through
+# stdin in the form
+# <oldrev> <newrev> <refname>
+# For example:
+# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
+#
+# see contrib/hooks/ for a sample, or uncomment the next line and
+# rename the file to "post-receive".
+
+#. /usr/share/doc/git-core/contrib/hooks/post-receive-email
=== added file 'l10n_ar_account_check_duo/.git/hooks/post-update.sample'
--- l10n_ar_account_check_duo/.git/hooks/post-update.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/post-update.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# An example hook script to prepare a packed repository for use over
+# dumb transports.
+#
+# To enable this hook, rename this file to "post-update".
+
+exec git update-server-info
=== added file 'l10n_ar_account_check_duo/.git/hooks/pre-applypatch.sample'
--- l10n_ar_account_check_duo/.git/hooks/pre-applypatch.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/pre-applypatch.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed
+# by applypatch from an e-mail message.
+#
+# The hook should exit with non-zero status after issuing an
+# appropriate message if it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-applypatch".
+
+. git-sh-setup
+test -x "$GIT_DIR/hooks/pre-commit" &&
+ exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
+:
=== added file 'l10n_ar_account_check_duo/.git/hooks/pre-commit.sample'
--- l10n_ar_account_check_duo/.git/hooks/pre-commit.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/pre-commit.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# An example hook script to verify what is about to be committed.
+# Called by "git commit" with no arguments. The hook should
+# exit with non-zero status after issuing an appropriate message if
+# it wants to stop the commit.
+#
+# To enable this hook, rename this file to "pre-commit".
+
+if git rev-parse --verify HEAD >/dev/null 2>&1
+then
+ against=HEAD
+else
+ # Initial commit: diff against an empty tree object
+ against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+# If you want to allow non-ascii filenames set this variable to true.
+allownonascii=$(git config hooks.allownonascii)
+
+# Redirect output to stderr.
+exec 1>&2
+
+# Cross platform projects tend to avoid non-ascii filenames; prevent
+# them from being added to the repository. We exploit the fact that the
+# printable range starts at the space character and ends with tilde.
+if [ "$allownonascii" != "true" ] &&
+ # Note that the use of brackets around a tr range is ok here, (it's
+ # even required, for portability to Solaris 10's /usr/bin/tr), since
+ # the square bracket bytes happen to fall in the designated range.
+ test $(git diff --cached --name-only --diff-filter=A -z $against |
+ LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
+then
+ echo "Error: Attempt to add a non-ascii file name."
+ echo
+ echo "This can cause problems if you want to work"
+ echo "with people on other platforms."
+ echo
+ echo "To be portable it is advisable to rename the file ..."
+ echo
+ echo "If you know what you are doing you can disable this"
+ echo "check using:"
+ echo
+ echo " git config hooks.allownonascii true"
+ echo
+ exit 1
+fi
+
+# If there are whitespace errors, print the offending file names and fail.
+exec git diff-index --check --cached $against --
=== added file 'l10n_ar_account_check_duo/.git/hooks/pre-rebase.sample'
--- l10n_ar_account_check_duo/.git/hooks/pre-rebase.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/pre-rebase.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,169 @@
+#!/bin/sh
+#
+# Copyright (c) 2006, 2008 Junio C Hamano
+#
+# The "pre-rebase" hook is run just before "git rebase" starts doing
+# its job, and can prevent the command from running by exiting with
+# non-zero status.
+#
+# The hook is called with the following parameters:
+#
+# $1 -- the upstream the series was forked from.
+# $2 -- the branch being rebased (or empty when rebasing the current branch).
+#
+# This sample shows how to prevent topic branches that are already
+# merged to 'next' branch from getting rebased, because allowing it
+# would result in rebasing already published history.
+
+publish=next
+basebranch="$1"
+if test "$#" = 2
+then
+ topic="refs/heads/$2"
+else
+ topic=`git symbolic-ref HEAD` ||
+ exit 0 ;# we do not interrupt rebasing detached HEAD
+fi
+
+case "$topic" in
+refs/heads/??/*)
+ ;;
+*)
+ exit 0 ;# we do not interrupt others.
+ ;;
+esac
+
+# Now we are dealing with a topic branch being rebased
+# on top of master. Is it OK to rebase it?
+
+# Does the topic really exist?
+git show-ref -q "$topic" || {
+ echo >&2 "No such branch $topic"
+ exit 1
+}
+
+# Is topic fully merged to master?
+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
+if test -z "$not_in_master"
+then
+ echo >&2 "$topic is fully merged to master; better remove it."
+ exit 1 ;# we could allow it, but there is no point.
+fi
+
+# Is topic ever merged to next? If so you should not be rebasing it.
+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
+only_next_2=`git rev-list ^master ${publish} | sort`
+if test "$only_next_1" = "$only_next_2"
+then
+ not_in_topic=`git rev-list "^$topic" master`
+ if test -z "$not_in_topic"
+ then
+ echo >&2 "$topic is already up-to-date with master"
+ exit 1 ;# we could allow it, but there is no point.
+ else
+ exit 0
+ fi
+else
+ not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
+ /usr/bin/perl -e '
+ my $topic = $ARGV[0];
+ my $msg = "* $topic has commits already merged to public branch:\n";
+ my (%not_in_next) = map {
+ /^([0-9a-f]+) /;
+ ($1 => 1);
+ } split(/\n/, $ARGV[1]);
+ for my $elem (map {
+ /^([0-9a-f]+) (.*)$/;
+ [$1 => $2];
+ } split(/\n/, $ARGV[2])) {
+ if (!exists $not_in_next{$elem->[0]}) {
+ if ($msg) {
+ print STDERR $msg;
+ undef $msg;
+ }
+ print STDERR " $elem->[1]\n";
+ }
+ }
+ ' "$topic" "$not_in_next" "$not_in_master"
+ exit 1
+fi
+
+exit 0
+
+################################################################
+
+This sample hook safeguards topic branches that have been
+published from being rewound.
+
+The workflow assumed here is:
+
+ * Once a topic branch forks from "master", "master" is never
+ merged into it again (either directly or indirectly).
+
+ * Once a topic branch is fully cooked and merged into "master",
+ it is deleted. If you need to build on top of it to correct
+ earlier mistakes, a new topic branch is created by forking at
+ the tip of the "master". This is not strictly necessary, but
+ it makes it easier to keep your history simple.
+
+ * Whenever you need to test or publish your changes to topic
+ branches, merge them into "next" branch.
+
+The script, being an example, hardcodes the publish branch name
+to be "next", but it is trivial to make it configurable via
+$GIT_DIR/config mechanism.
+
+With this workflow, you would want to know:
+
+(1) ... if a topic branch has ever been merged to "next". Young
+ topic branches can have stupid mistakes you would rather
+ clean up before publishing, and things that have not been
+ merged into other branches can be easily rebased without
+ affecting other people. But once it is published, you would
+ not want to rewind it.
+
+(2) ... if a topic branch has been fully merged to "master".
+ Then you can delete it. More importantly, you should not
+ build on top of it -- other people may already want to
+ change things related to the topic as patches against your
+ "master", so if you need further changes, it is better to
+ fork the topic (perhaps with the same name) afresh from the
+ tip of "master".
+
+Let's look at this example:
+
+ o---o---o---o---o---o---o---o---o---o "next"
+ / / / /
+ / a---a---b A / /
+ / / / /
+ / / c---c---c---c B /
+ / / / \ /
+ / / / b---b C \ /
+ / / / / \ /
+ ---o---o---o---o---o---o---o---o---o---o---o "master"
+
+
+A, B and C are topic branches.
+
+ * A has one fix since it was merged up to "next".
+
+ * B has finished. It has been fully merged up to "master" and "next",
+ and is ready to be deleted.
+
+ * C has not merged to "next" at all.
+
+We would want to allow C to be rebased, refuse A, and encourage
+B to be deleted.
+
+To compute (1):
+
+ git rev-list ^master ^topic next
+ git rev-list ^master next
+
+ if these match, topic has not merged in next at all.
+
+To compute (2):
+
+ git rev-list master..topic
+
+ if this is empty, it is fully merged to "master".
=== added file 'l10n_ar_account_check_duo/.git/hooks/prepare-commit-msg.sample'
--- l10n_ar_account_check_duo/.git/hooks/prepare-commit-msg.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/prepare-commit-msg.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# An example hook script to prepare the commit log message.
+# Called by "git commit" with the name of the file that has the
+# commit message, followed by the description of the commit
+# message's source. The hook's purpose is to edit the commit
+# message file. If the hook fails with a non-zero status,
+# the commit is aborted.
+#
+# To enable this hook, rename this file to "prepare-commit-msg".
+
+# This hook includes three examples. The first comments out the
+# "Conflicts:" part of a merge commit.
+#
+# The second includes the output of "git diff --name-status -r"
+# into the message, just before the "git status" output. It is
+# commented because it doesn't cope with --amend or with squashed
+# commits.
+#
+# The third example adds a Signed-off-by line to the message, that can
+# still be edited. This is rarely a good idea.
+
+case "$2,$3" in
+ merge,)
+ /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
+
+# ,|template,)
+# /usr/bin/perl -i.bak -pe '
+# print "\n" . `git diff --cached --name-status -r`
+# if /^#/ && $first++ == 0' "$1" ;;
+
+ *) ;;
+esac
+
+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
=== added file 'l10n_ar_account_check_duo/.git/hooks/update.sample'
--- l10n_ar_account_check_duo/.git/hooks/update.sample 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/hooks/update.sample 2012-11-02 15:08:21 +0000
@@ -0,0 +1,128 @@
+#!/bin/sh
+#
+# An example hook script to blocks unannotated tags from entering.
+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
+#
+# To enable this hook, rename this file to "update".
+#
+# Config
+# ------
+# hooks.allowunannotated
+# This boolean sets whether unannotated tags will be allowed into the
+# repository. By default they won't be.
+# hooks.allowdeletetag
+# This boolean sets whether deleting tags will be allowed in the
+# repository. By default they won't be.
+# hooks.allowmodifytag
+# This boolean sets whether a tag may be modified after creation. By default
+# it won't be.
+# hooks.allowdeletebranch
+# This boolean sets whether deleting branches will be allowed in the
+# repository. By default they won't be.
+# hooks.denycreatebranch
+# This boolean sets whether remotely creating branches will be denied
+# in the repository. By default this is allowed.
+#
+
+# --- Command line
+refname="$1"
+oldrev="$2"
+newrev="$3"
+
+# --- Safety check
+if [ -z "$GIT_DIR" ]; then
+ echo "Don't run this script from the command line." >&2
+ echo " (if you want, you could supply GIT_DIR then run" >&2
+ echo " $0 <ref> <oldrev> <newrev>)" >&2
+ exit 1
+fi
+
+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
+ echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
+ exit 1
+fi
+
+# --- Config
+allowunannotated=$(git config --bool hooks.allowunannotated)
+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
+denycreatebranch=$(git config --bool hooks.denycreatebranch)
+allowdeletetag=$(git config --bool hooks.allowdeletetag)
+allowmodifytag=$(git config --bool hooks.allowmodifytag)
+
+# check for no description
+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
+case "$projectdesc" in
+"Unnamed repository"* | "")
+ echo "*** Project description file hasn't been set" >&2
+ exit 1
+ ;;
+esac
+
+# --- Check types
+# if $newrev is 0000...0000, it's a commit to delete a ref.
+zero="0000000000000000000000000000000000000000"
+if [ "$newrev" = "$zero" ]; then
+ newrev_type=delete
+else
+ newrev_type=$(git cat-file -t $newrev)
+fi
+
+case "$refname","$newrev_type" in
+ refs/tags/*,commit)
+ # un-annotated tag
+ short_refname=${refname##refs/tags/}
+ if [ "$allowunannotated" != "true" ]; then
+ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
+ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,delete)
+ # delete tag
+ if [ "$allowdeletetag" != "true" ]; then
+ echo "*** Deleting a tag is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/tags/*,tag)
+ # annotated tag
+ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
+ then
+ echo "*** Tag '$refname' already exists." >&2
+ echo "*** Modifying a tag is not allowed in this repository." >&2
+ exit 1
+ fi
+ ;;
+ refs/heads/*,commit)
+ # branch
+ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
+ echo "*** Creating a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/heads/*,delete)
+ # delete branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ refs/remotes/*,commit)
+ # tracking branch
+ ;;
+ refs/remotes/*,delete)
+ # delete tracking branch
+ if [ "$allowdeletebranch" != "true" ]; then
+ echo "*** Deleting a tracking branch is not allowed in this repository" >&2
+ exit 1
+ fi
+ ;;
+ *)
+ # Anything else (is there anything else?)
+ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
+ exit 1
+ ;;
+esac
+
+# --- Finished
+exit 0
=== added directory 'l10n_ar_account_check_duo/.git/info'
=== added file 'l10n_ar_account_check_duo/.git/info/exclude'
--- l10n_ar_account_check_duo/.git/info/exclude 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/.git/info/exclude 2012-11-02 15:08:21 +0000
@@ -0,0 +1,6 @@
+# git ls-files --others --exclude-from=.git/info/exclude
+# Lines that start with '#' are comments.
+# For a project mostly in C, the following would be a good set of
+# exclude patterns (uncomment them if you want to use them):
+# *.[oa]
+# *~
=== added directory 'l10n_ar_account_check_duo/.git/objects'
=== added directory 'l10n_ar_account_check_duo/.git/objects/info'
=== added directory 'l10n_ar_account_check_duo/.git/objects/pack'
=== added directory 'l10n_ar_account_check_duo/.git/refs'
=== added directory 'l10n_ar_account_check_duo/.git/refs/heads'
=== added directory 'l10n_ar_account_check_duo/.git/refs/tags'
=== added file 'l10n_ar_account_check_duo/__init__.py'
--- l10n_ar_account_check_duo/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/__init__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+import account_check_duo
+import account_voucher
+import res_partner_bank
+import wizard_third
+import wizard_issued
+import account
+import report
+
=== added file 'l10n_ar_account_check_duo/__openerp__.py'
--- l10n_ar_account_check_duo/__openerp__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/__openerp__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+ "name": "Account Check Duo",
+ "version": "1.0",
+ "depends": ['account', 'account_voucher'],
+ "author": "Sistemas ADHOC , Silvina Faner ",
+ "category": "Generic Modules/Accounting",
+ "description": """
+
+ This module provides to manage checks (issued and third).
+ =========================================================
+ Add models of Issued Checks and Third Checks. Add options in Jorunals for using
+ checks in vouchers.
+ """,
+ 'data': [
+ 'account_check_duo_view.xml',
+ 'account_voucher_view.xml',
+ 'workflow_third.xml',
+ 'workflow_issued.xml',
+ 'wizard_third/view_check_deposit.xml',
+ 'wizard_third/view_check_hreject.xml',
+ 'wizard_third/view_check_dreject.xml',
+ 'wizard_third/view_check_sold.xml',
+ 'wizard_issued/view_issued_check_hreject.xml',
+ 'partner_view.xml',
+ 'account_view.xml',
+ 'security/ir.model.access.csv',
+ #'report/report_check_issued.xml',
+ #'report/report_check_third.xml',
+ ],
+
+ 'demo': [
+ #files containg demo data
+ ],
+ 'test': [
+ #files containg tests
+ ],
+ 'installable': True,
+ 'active': False,
+ # 'certificate': '',
+}
=== added file 'l10n_ar_account_check_duo/account.py'
--- l10n_ar_account_check_duo/account.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/account.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv, fields
+
+class account_journal(osv.osv):
+ _name = 'account.journal'
+ _inherit = 'account.journal'
+ _columns = {
+ 'use_issued_check': fields.boolean('Use Issued Checks', help='Allow to user Issued Checks in associated vouchers.'),
+ 'use_third_check': fields.boolean('Use Third Checks', help='Allow to user Third Checks in associated vouchers.'),
+ 'validate_only_checks': fields.boolean('Validate only Checks', help='If marked, when validating a voucher, verifies that the total amounth of the voucher is the same as the checks used.'),
+ }
+
+account_journal()
=== added file 'l10n_ar_account_check_duo/account_check_duo.py'
--- l10n_ar_account_check_duo/account_check_duo.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/account_check_duo.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,364 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+import logging
+import time
+_logger = logging.getLogger(__name__)
+from tools.translate import _
+from datetime import datetime
+
+class account_issued_check(osv.osv):
+
+
+ _name = 'account.issued.check'
+ _description = 'Manage Checks Issued'
+
+ _columns = {
+ 'number': fields.char('Check Number', size=8, required=True,readonly=True,states={'draft': [('readonly', False)]}),
+ 'amount': fields.float('Amount Check', required=True,readonly=True,states={'draft': [('readonly', False)]}),
+ 'date': fields.date('Date Check', required=True,readonly=True,states={'draft': [('readonly', False)]}),
+ 'debit_date': fields.date('Date Debit', readonly=True), # clearing date + clearing
+ 'receiving_partner_id': fields.many2one('res.partner','Destiny Partner' ,readonly=True,states={'draft': [('readonly', False)]}),
+ 'clearing': fields.selection((
+ ('24', '24 hs'),
+ ('48', '48 hs'),
+ ('72', '72 hs'),
+ ), 'Clearing',readonly=True,states={'draft': [('readonly', False)]}),
+ 'account_bank_id': fields.many2one('res.partner.bank','Account Bank',required=True,readonly=True,states={'draft': [('readonly', False)]}),
+ 'voucher_id': fields.many2one('account.voucher', 'Voucher'),
+ 'issued': fields.boolean('Issued'),
+ 'user_id' : fields.many2one('res.users','User'),
+ 'change_date': fields.date('Change Date', required=True),
+ 'clearing_date' : fields.date('Clearing Date', required=True,readonly=True,states={'draft':[('readonly',False)]}),
+ 'state':fields.selection([('draft','Draft'),
+ ('handed','Handed'),
+ ('hrejected','Hand-Rejected'),
+ ('cancel','Cancelled')],
+ string='State',required=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True,readonly=True,states={'draft':[('readonly',False)]}, select=1, help="Company related to this Check"),
+ 'reject_debit_note': fields.many2one('account.invoice','Reject Debit Note'),
+ }
+
+ _sql_constraints = [('number_check_uniq','unique(number,account_bank_id)','The number must be unique!')]
+ _order = "number"
+ _defaults = {
+ 'clearing': lambda *a: '48',
+ 'state': 'draft',
+ 'change_date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'user_id': lambda s, cr, u, c: u,
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
+
+ }
+
+
+ def create(self, cr, uid, vals, context={}):
+ order_obj= self.pool.get('account.voucher')
+
+ if not order_obj.browse(cr, uid, context.get('active_ids', []), context=context):
+ raise osv.except_osv(_('Error !'), _('The Check must be create on one payment !'))
+ return res
+ res = super(account_issued_check, self).create(cr, uid, vals, context)
+ return res
+
+
+
+ def unlink(self, cr, uid, ids, context=None):
+
+ res= {}
+ for order in self.browse(cr,uid,ids,context=context):
+ if order.state not in ('draft'):
+ raise osv.except_osv(_('Error !'), _('The Check must be in draft state only for unlink !'))
+ return res
+
+ def onchange_number(self, cr, uid, ids, number, context=None):
+ res = {}
+ number_str = str(number)
+ if len(number_str) != 8:
+ res = {'value':{'number': 0}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Ckeck Number must be 8 numbers !')}})
+ else:
+
+ res = {'value':{'number': number}}
+ return res
+
+ def onchange_clearing_date(self, cr, uid, ids, date,clearing_date, context=None):
+ res = {}
+ if clearing_date < date:
+ res = {'value':{'clearing_date': None}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Clearing date must be greater than check date')}})
+ else:
+ res = {'value':{'clearing_date': clearing_date}}
+ return res
+
+
+ def wkfw_draft(self,cr,user,ids,context=None):
+ return self.write(cr,user,ids,{'state':'draft'},context=context)
+
+ def wkfw_handed(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'handed',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+
+ def wkfw_hrejected(self, cr, user, ids, context=None):
+ # TODO: Ejecutar el armado de nota de debito por cheque rechazado!
+ # Ver si el cheque fue emitido por la empresa, si es asi deberia generar
+ # una nota de credito al proveedor.
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'hrejected',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkfw_cancel(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'cancel',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+account_issued_check()
+
+
+class account_third_check(osv.osv):
+
+
+ _name = 'account.third.check'
+ _description = 'Manage Checks Third'
+
+
+ _columns = {
+ 'number': fields.char('Check Number', size=8, required=True,readonly=True,states={'draft': [('readonly', False)]}),
+ 'amount': fields.float('Check Amount', required=True,readonly=True,states={'draft':[('readonly',False)]}),
+ 'date_in': fields.date('Date In', required=True,readonly=True,states={'draft':[('readonly',False)]}),
+ 'date': fields.date('Check Date', required=True,readonly=True,states={'draft':[('readonly',False)]}),
+ 'source_partner_id': fields.many2one('res.partner', 'Source Partner',readonly=True,states={'draft':[('readonly',False)]}),
+ 'destiny_partner_id': fields.many2one('res.partner', 'Destiny Partner',readonly=False, required=False,states={'handed': [('required', True)]}),
+ 'state': fields.selection((
+ ('draft', 'Draft'),
+ ('holding', 'Holding'),
+ ('deposited', 'Deposited'),
+ ('drejected', 'Dep-Rejected'),
+ ('handed', 'Handed'),
+ ('hrejected', 'Hand-Rejected'),
+ ('sold', 'Sold'),
+ ), 'State', required=True),
+ 'bank_id': fields.many2one('res.bank', 'Bank', readonly=True,required=True,states={'draft': [('readonly', False)]}),
+ 'vat': fields.char('Vat', size=11,states={'draft': [('readonly', False)]}),
+ 'user_id' : fields.many2one('res.users','User'),
+ 'change_date': fields.date('Change Date', required=True),
+ 'clearing_date' : fields.date('Clearing Date', required=True,readonly=True,states={'draft':[('readonly',False)]}),
+ 'clearing': fields.selection((
+ ('24', '24 hs'),
+ ('48', '48 hs'),
+ ('72', '72 hs'),
+ ), 'Clearing', readonly=True,states={'draft': [('readonly', False)]}),
+ 'account_bank_id': fields.many2one('res.partner.bank','Destiny Account'),
+ 'voucher_id': fields.many2one('account.voucher', 'Voucher'),
+ 'company_id': fields.many2one('res.company', 'Company', required=True,readonly=True,states={'draft':[('readonly',False)]}, select=1, help="Company related to this Check"),
+ 'reject_debit_note': fields.many2one('account.invoice','Reject Debit Note'),
+ 'reject_debit_note_prov':fields.many2one('account.invoice','Reject Debit Note Prov'),
+ 'clearing_date_hasta':fields.date('Clearing Date Hasta', required=False)
+ }
+
+ _order = "clearing_date"
+ _defaults = {
+ 'state': 'draft',
+ 'clearing': lambda *a: '48',
+ 'date_in': lambda *a: time.strftime('%Y-%m-%d'),
+ 'change_date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'user_id': lambda s, cr, u, c: u,
+ 'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
+ }
+
+
+ def search(self, cr, uid, args, offset=0, limit=None, order=None,
+ context=None, count=False):
+ if context is None:
+ context = {}
+ pos = 0
+ desde = False
+ hasta = False
+ while pos < len(args):
+ if args[pos][0] == 'clearing_date':
+ desde= args[pos][2]
+ if args[pos][0] == 'clearing_date_hasta':
+ hasta= args[pos][2]
+ pos += 1
+
+ if desde and hasta:
+
+ return super(account_third_check, self).search(cr, uid, [('clearing_date', '>', desde),
+ ('clearing_date', '<', hasta),
+ ])
+
+ return super(account_third_check, self).search(cr, uid, args, offset, limit,
+ order, context=context, count=count)
+
+ def onchange_number(self, cr, uid, ids, number, context=None):
+ res = {}
+ number_str = str(number)
+ if len(number_str) != 8:
+ res = {'value':{'number': 0}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Ckeck Number must be 8 numbers !')}})
+ else:
+
+ res = {'value':{'number': number}}
+ return res
+
+ def onchange_clearing_date(self, cr, uid, ids, date,clearing_date, context=None):
+ res = {}
+ if clearing_date < date:
+ res = {'value':{'clearing_date': None}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Clearing date must be greater than check date')}})
+ else:
+ res = {'value':{'clearing_date': clearing_date}}
+ return res
+
+ def onchange_vat(self, cr, uid, ids, vat, context=None):
+ res = {}
+ if not vat:
+ res.update({'warning': {'title': _('Error !'), 'message': _('Vat number must be not null !')}})
+ else:
+ if len(vat) != 11:
+ res = {'value':{'vat': None}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Vat number must be 11 numbers !')}})
+ else:
+ res = {'value':{'vat': vat}}
+ return res
+
+ def unlink(self, cr, uid, ids, context=None):
+ _logger.info("pasa por unlink state third: %s",ids)
+ res= {}
+ for order in self.browse(cr,uid,ids,context=context):
+ _logger.info("order ss: %s",order.state)
+ if order.state not in ('draft'):
+ raise osv.except_osv(_('Error !'), _('The Check must be in draft state only for unlink !'))
+ return res
+
+ def create(self, cr, uid, vals, context={}):
+ order_obj= self.pool.get('account.voucher')
+
+ if not order_obj.browse(cr, uid, context.get('active_ids', []), context=context):
+ raise osv.except_osv(_('Error !'), _('The Check must be create on one payment !'))
+ return res
+ res = super(account_third_check, self).create(cr, uid, vals, context)
+ return res
+
+ def wkf_draft(self, cr, user, ids, context=None):
+ return self.write(cr,uid,ids,{'state':'draft'},context=context)
+
+
+ def wkf_holding(self, cr, user, ids, context=None):
+ _logger.info("ids: %s",ids)
+
+ #Transicion efectuada al validar un pago de cliente que contenga cheque
+ for check in self.browse(cr, user, ids):
+ _logger.info("check.voucher_id %s",check.voucher_id)
+ if check.voucher_id:
+ source_partner_id = check.voucher_id.partner_id.id
+
+ else:
+ source_partner_id = None
+
+ # Si creo el cheque para usar en pago al proveedor o lo uso de pago cliente
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'source_partner_id': source_partner_id,
+ 'state': 'holding',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkf_handed(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'handed',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkf_hrejected(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'hrejected',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkf_deposited(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'deposited',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkf_drejected(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'drejected',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkf_sold(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'sold',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+ def wkf_cancel(self, cr, user, ids, context=None):
+ for check in self.browse(cr, user, ids):
+ current_date = datetime.now().strftime('%Y-%m-%d')
+ check.write({
+ 'state': 'cancel',
+ 'change_date': current_date,
+ 'user_id':user
+ })
+ return True
+
+account_third_check()
=== added file 'l10n_ar_account_check_duo/account_check_duo_view.xml'
--- l10n_ar_account_check_duo/account_check_duo_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/account_check_duo_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <!-- crea el menu principal-->
+
+ <menuitem id="menu_account_check" name="Checks" sequence="100"
+ parent="account.menu_finance_bank_and_cash" />
+
+
+ <!-- Issued Check -->
+ <record model="ir.ui.view" id="view_account_issued_check_tree">
+ <field name="name">account.issued.check.tree</field>
+ <field name="model">account.issued.check</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree colors="blue:state == 'draft';black:state in ('handed');red:state == 'hrejected';gray:state == 'cancel'" string="Issued Checks">
+ <field name="number"/>
+ <field name="date"/>
+ <field name="clearing_date"/>
+ <field name="receiving_partner_id"/>
+ <field name="account_bank_id"/>
+ <field name="amount" sum="Total Amount"/>
+ <field name="change_date"/>
+ <field name="user_id"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </record>
+
+
+ <record model="ir.ui.view" id="view_account_issued_check_form">
+ <field name="name">account.issued.check.form</field>
+ <field name="model">account.issued.check</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Issued Checks">
+ <separator string= "Issued Checks" colspan="4"/>
+ <field name="account_bank_id"/>
+ <field name="number" on_change="onchange_number(number)"/>
+ <field name="amount"/>
+ <field name="date"/>
+ <field name="clearing_date" on_change="onchange_clearing_date(date,clearing_date)"/>
+ <field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
+ <separator colspan="8"/>
+ <field name="debit_date"/>
+ <field name="state" widget="statusbar" colspan="8"/>
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_issued_checks_search">
+ <field name="name">issued.check.search</field>
+ <field name="model">account.issued.check</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Issued Checks...">
+ <group colspan='4'>
+ <filter string="Date" icon="terp-gtk-jump-to-rtl"
+ domain="[]" context="{'group_by':'date'}"/>
+ <filter string="Partner" icon="terp-gtk-jump-to-rtl"
+ domain="[]" context="{'group_by':'receiving_partner_id'}"/>
+ <filter string="State" icon="terp-gtk-jump-to-rtl"
+ domain="[]" context="{'group_by':'state'}"/>
+ </group>
+ <separator colspan="8"/>
+ <group colspan='4'>
+ <field name="number" select="1" string="Check Number"/>
+ <field name="receiving_partner_id" select="1" string="Destiny Partner"/>
+ <field name="state" select="1" string="State"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_account_issued_check_calendar">
+ <field name="name">account.issued.check.calendar</field>
+ <field name="model">account.issued.check</field>
+ <field name="type">calendar</field>
+ <field name="priority" eval="2"/>
+ <field name="arch" type="xml">
+ <calendar string="Issued Checks" date_start="date" mode="month" color="receiving_partner_id">
+ <field name="amount" />
+ <field name="receiving_partner_id" />
+ </calendar>
+ </field>
+ </record>
+
+
+ <!-- Issued Check Menu -->
+ <record model="ir.actions.act_window" id="action_issued_check">
+ <field name="name">Issued Checks</field>
+ <field name="res_model">account.issued.check</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form,calendar</field>
+ <!-- <field name="search_view_id" ref="view_issued_checks_search"/>-->
+ </record>
+
+ <menuitem
+ action="action_issued_check"
+ id="menu_treasury_issued_check"
+ name="Issued Checks"
+ parent="menu_account_check"/>
+
+
+
+ <!-- Third Check -->
+ <record model="ir.ui.view" id="view_account_third_check_tree">
+ <field name="name">account.third.check.tree</field>
+ <field name="model">account.third.check</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree colors="blue:state == 'draft';black:state in ('handed','deposited','sold');red:state in ('hrejected','drejected');gray:state == 'cancel'" string="Third Checks">
+ <field name="number"/>
+ <field name="date"/>
+ <field name="clearing_date"/>
+ <field name="source_partner_id"/>
+ <field name="bank_id"/>
+ <field name="destiny_partner_id"/>
+ <field name="amount" sum="Total Amount"/>
+ <field name="change_date"/>
+ <field name="user_id"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </record>
+
+
+ <record model="ir.ui.view" id="view_account_third_check_form">
+ <field name="name">account.third.check.form</field>
+ <field name="model">account.third.check</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Third Checks">
+ <separator string= "Third Checks" colspan="4"/>
+ <field name="number" on_change="onchange_number(number)"/>
+ <field name="amount"/>
+ <field name="date"/>
+ <field name="bank_id"/>
+ <field name="clearing_date" on_change="onchange_clearing_date(date,clearing_date)"/>
+ <field name="clearing"/>
+ <field name="company_id" groups="base.group_multi_company" widget="selection" colspan="2"/>
+ <separator colspan="8"/>
+ <field name="source_partner_id"/>
+ <field name="vat" on_change="onchange_vat(vat)"/>
+ <field name="date_in"/>
+ <separator string="Information " colspan="8"/>
+ <field name="state" widget="statusbar" colspan="8"/>
+ </form>
+ </field>
+ </record>
+
+
+
+ <record id="view_third_checks_search" model="ir.ui.view">
+ <field name="name">third.check.search</field>
+ <field name="model">account.third.check</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Third Checks...">
+ <group colspan='4'>
+ <filter string="Date" icon="terp-gtk-jump-to-rtl"
+ domain="[]" context="{'group_by':'date'}"/>
+ <filter string="Source Partner" icon="terp-gtk-jump-to-rtl"
+ domain="[]" context="{'group_by':'source_partner_id'}"/>
+ <filter string="Destiny Partner" icon="terp-gtk-jump-to-rtl"
+ domain="[]" context="{'group_by':'destiny_partner_id'}"/>
+ <filter icon="terp-document-new" name="holding"
+ string="In Holding" domain="[('state','=','holding')]"/>
+ </group>
+ <separator colspan="8"/>
+ <group colspan='4'>
+ <field name="number" select="1" string="Check Number"/>
+ <field name="destiny_partner_id" select="1" string="Destiny Partner"/>
+ <field name="state" select="1" string="State"/>
+ <field name="clearing_date" string= "Desde fecha Clearing" select="1"/>
+ <field name="clearing_date_hasta" string= "Hasta fecha Clearing" select="1"/>
+ </group>
+ <separator colspan="8"/>
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="view_account_third_check_calendar">
+ <field name="name">account.third.check.calendar</field>
+ <field name="model">account.third.check</field>
+ <field name="type">calendar</field>
+ <field name="priority" eval="2"/>
+ <field name="arch" type="xml">
+ <calendar string="Third Checks" date_start="date" mode="month" color="source_partner_id">
+ <field name="amount" />
+ <field name="source_partner_id" />
+ </calendar>
+ </field>
+ </record>
+
+ <!-- Third Check Menu -->
+ <record model="ir.actions.act_window" id="action_third_check">
+ <field name="name">Third Checks</field>
+ <field name="res_model">account.third.check</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form,calendar</field>
+ <!-- <field name="search_view_id" ref="view_third_checks_search"/>-->
+ </record>
+
+ <menuitem
+ action="action_third_check"
+ id="menu_treasury_third_check"
+ name="Third Checks"
+ parent="menu_account_check"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/account_view.xml'
--- l10n_ar_account_check_duo/account_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/account_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_account_check_journal_form" model="ir.ui.view">
+ <field name="name">account_check.account.journal.form</field>
+ <field name="model">account.journal</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="account.view_account_journal_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="/form/notebook" >
+ <page string="Check Configuration" attrs="{'invisible':[('type','!=', 'bank')]}">
+ <field name="use_issued_check"/>
+ <field name="use_third_check"/>
+ <field name="validate_only_checks"/>
+ </page>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/account_voucher.py'
--- l10n_ar_account_check_duo/account_voucher.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/account_voucher.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,231 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+###########################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+from datetime import datetime
+
+class account_voucher(osv.osv):
+
+ _name = 'account.voucher'
+ _inherit = 'account.voucher'
+ _description = 'Change the journal_id in Check Model'
+
+ _columns = {
+ 'issued_check_ids': fields.one2many('account.issued.check','voucher_id', 'Issued Checks', required=False, readonly=True, states={'draft':[('readonly',False)]}),
+ 'third_check_receipt_ids': fields.one2many('account.third.check','voucher_id', 'Third Checks', required=False,readonly=True, states={'draft':[('readonly',False)]}),
+ 'third_check_ids': fields.many2many('account.third.check','third_check_voucher_rel', 'third_check_id', 'voucher_id','Third Checks',required=False,readonly=True, states={'draft':[('readonly',False)]}),
+
+ 'show_check_page': fields.boolean('Show Check Page', ),
+ 'use_issued_check': fields.boolean('Use Issued Checks', ),
+ 'use_third_check': fields.boolean('Use Third Checks', ),
+ }
+
+ _defaults = {
+ 'show_check_page': False,
+ 'use_issued_check': False,
+ 'use_third_check': False,
+ }
+
+
+ def _amount_checks(self, cr, uid, voucher_id):
+ res = {}
+ res['issued_check_amount'] = 0.00
+ res['third_check_amount'] = 0.00
+ res['third_check_receipt_amount'] = 0.00
+ if voucher_id:
+ voucher_obj = self.pool.get('account.voucher').browse(cr, uid, voucher_id)
+ if voucher_obj.issued_check_ids:
+ for issued_check in voucher_obj.issued_check_ids:
+ res['issued_check_amount'] += issued_check.amount
+ if voucher_obj.third_check_ids:
+ for third_check in voucher_obj.third_check_ids:
+ res['third_check_amount'] += third_check.amount
+ if voucher_obj.third_check_receipt_ids:
+ for third_rec_check in voucher_obj.third_check_receipt_ids:
+ res['third_check_receipt_amount'] += third_rec_check.amount
+ return res
+
+ def onchange_issued_checks(self, cr, uid, ids, issued_check_ids, third_check_ids, journal_id, partner_id, currency_id,
+ type, date, context=None):
+ data = {}
+ amount = 0.00
+ third_checks = self.pool.get('account.third.check').browse(cr, uid, third_check_ids[0][2])
+ for check in third_checks:
+ amount += check.amount
+ for check in issued_check_ids:
+ amount += check[2].get('amount', 0.00)
+ data['amount'] = amount
+
+ vals = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, type, date)
+ data.update(vals.get('value'))
+
+ return {'value': data}
+
+ def onchange_third_check_receipt_ids(self, cr, uid, ids,third_check_receipt_ids,
+ journal_id, partner_id, currency_id, type,date,state, context=None):
+
+ data = {}
+ if len(ids) < 1:
+ data.update({'warning': {'title': _('ATENTION !'), 'message': _('Journal must be fill')}})
+
+ amount = 0.00
+ for check in third_check_receipt_ids:
+ amount += check[2].get('amount', 0.00)
+ data['amount'] = amount
+
+ vals = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id,
+ amount, currency_id, type, date)
+ data.update(vals.get('value'))
+
+ return {'value': data}
+
+
+ def onchange_third_check_ids(self, cr, uid, ids, issued_check_ids, third_check_ids, journal_id, partner_id,
+ currency_id, type, date):
+
+ data = {}
+ amount = 0.00
+ third_checks = self.pool.get('account.third.check').browse(cr, uid, third_check_ids[0][2])
+ for check in third_checks:
+ amount += check.amount
+ for check in issued_check_ids:
+ amount += check[2].get('amount', 0.00)
+ data['amount'] = amount
+
+ vals = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, amount, currency_id, type, date)
+ data.update(vals.get('value'))
+
+ return {'value': data}
+
+
+
+ def action_move_line_create(self, cr, uid, ids, context=None):
+ voucher_obj = self.pool.get('account.voucher').browse(cr, uid, ids)[0]
+ wf_service = netsvc.LocalService('workflow')
+ if voucher_obj.type == 'payment':
+ if voucher_obj.issued_check_ids:
+ for check in voucher_obj.issued_check_ids:
+ check.write({
+ 'issued': True,
+ 'receiving_partner_id': voucher_obj.partner_id.id,
+ })
+ wf_service.trg_validate(uid, 'account.issued.check',check.id, 'draft_handed', cr)
+ else:
+ if voucher_obj.third_check_ids:
+ for check in voucher_obj.third_check_ids:
+
+ check_obj = self.pool.get('account.third.check')
+ result= check_obj.browse(cr,uid,check.id)
+ if result.state != 'holding':
+ raise osv.except_osv(_('State!'), _('The check must be in holding state.'))
+ return False
+ else:
+ check.write({'destiny_partner_id': voucher_obj.partner_id.id,
+ })
+
+ wf_service.trg_validate(uid, 'account.third.check',check.id, 'draft_holding', cr)
+ wf_service.trg_validate(uid, 'account.third.check',check.id, 'holding_handed', cr)
+ elif voucher_obj.type == 'receipt':
+ voucher_obj = self.pool.get('account.voucher').browse(cr, uid, ids)[0]
+ for check in voucher_obj.third_check_receipt_ids:
+ check.write({
+ 'source_partner_id': voucher_obj.partner_id.id,
+ })
+ wf_service.trg_validate(uid, 'account.third.check', check.id, 'draft_holding', cr)
+
+
+ return super(account_voucher, self).action_move_line_create(cr, uid, ids, context=None)
+
+ def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, date, amount,
+ ttype, company_id, context=None):
+ '''
+ Override the onchange_journal function to check which are the page and fields that should be shown
+ in the view.
+ '''
+ ret = super(account_voucher, self).onchange_journal(cr, uid, ids, journal_id, line_ids, tax_id, partner_id,
+ date, amount, ttype, company_id, context=context)
+
+ if not journal_id:
+ return ret
+
+ journal_obj = self.pool.get('account.journal')
+ journal = journal_obj.browse(cr, uid, journal_id, context=context)
+ if isinstance(journal, list):
+ journal = journal[0]
+
+ if journal.use_issued_check:
+ ret['value']['use_issued_check'] = True
+ else:
+ ret['value']['use_issued_check'] = False
+
+ if journal.use_third_check:
+ ret['value']['use_third_check'] = True
+ else:
+ ret['value']['use_third_check'] = False
+
+ if ttype in ['sale', 'receipt']:
+ if not journal.use_third_check:
+ ret['value']['show_check_page'] = False
+ else:
+ if journal.type == 'bank':
+ ret['value']['show_check_page'] = True
+ else:
+ ret['value']['show_check_page'] = False
+
+ elif ttype in ['purchase', 'payment']:
+ if not journal.use_issued_check and not journal.use_third_check:
+ ret['value']['show_check_page'] = False
+ else:
+ if journal.type == 'bank':
+ ret['value']['show_check_page'] = True
+ else:
+ ret['value']['show_check_page'] = False
+
+ return ret
+
+ def proforma_voucher(self, cr, uid, ids, context=None):
+ '''
+ Override the proforma_voucher function (called when voucher workflow moves to act_done activity)
+ to check, when the associated journal is marked with validate_only_checks, if the total amount is
+ the same of the sum of checks.
+ '''
+ for voucher in self.browse(cr, uid, ids, context=context):
+ if voucher.journal_id.validate_only_checks:
+ check_amount = 0
+ compare_amounts = False
+
+ if voucher.type == 'payment':
+ compare_amounts = True
+ for issued_check in voucher.issued_check_ids:
+ check_amount += issued_check.amount
+ for third_check in voucher.third_check_ids:
+ check_amount += third_check.amount
+
+ if voucher.type == 'receipt':
+ compare_amounts = True
+ for third_check in voucher.third_check_receipt_ids:
+ check_amount += third_check.amount
+
+ voucher_amount = voucher.amount
+
+ if compare_amounts and voucher_amount != check_amount:
+ title = _('Cannot Validate Voucher')
+ message = _('The associated journal force that the total amount is the same as the one paid with checks.')
+ raise osv.except_osv(title, message)
+
+ return super(account_voucher, self).proforma_voucher(cr, uid, ids, context=context)
+
+account_voucher()
=== added file 'l10n_ar_account_check_duo/account_voucher_view.xml'
--- l10n_ar_account_check_duo/account_voucher_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/account_voucher_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <!-- Payment -->
+
+ <record id="view_voucher_check_form" model="ir.ui.view">
+ <field name="name">account.voucher.form.inherit</field>
+ <field name="model">account.voucher</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="account_voucher.view_vendor_payment_form"/>
+ <field name="arch" type="xml">
+ <page string="Payment Information" position="after">
+ <page string="Checks" attrs="{'invisible':[('show_check_page','=', False)]}">
+
+ <field name="show_check_page" invisible="1"/>
+ <field name="use_issued_check" invisible="1"/>
+ <field name="use_third_check" invisible="1"/>
+
+ <group attrs="{'invisible':[('use_issued_check','=', False)]}" colspan="4" col="4" >
+ <field name="issued_check_ids" string="Issued Checks" nolabel="1" colspan="4"
+ on_change="onchange_issued_checks(issued_check_ids, third_check_ids, journal_id, partner_id, currency_id, type, date)"/>
+ </group>
+ <group attrs="{'invisible':[('use_third_check','=', False)]}" colspan="4" col="4" >
+ <separator string="Third Checks" colspan="4"/>
+ <field name="third_check_ids" nolabel="1" colspan="4"
+ domain="[('state', '=', 'holding')]"
+ attrs="{'invisible':[('use_third_check','=', False)]}"
+ on_change="onchange_third_check_ids(issued_check_ids, third_check_ids, journal_id, partner_id, currency_id, type, date)"/>
+ </group>
+ </page>
+ </page>
+ </field>
+ </record>
+
+ <!-- Receipt -->
+
+ <record id="view_vendor_receipt_check_form" model="ir.ui.view">
+ <field name="name">account.voucher.form.receipt.inherit</field>
+ <field name="model">account.voucher</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="account_voucher.view_vendor_receipt_form"/>
+ <field name="arch" type="xml">
+ <page string="Payment Information" position="after" >
+ <page string="Checks" attrs="{'invisible':[('show_check_page','=', False)]}">
+
+ <field name="show_check_page" invisible="1"/>
+ <field name="use_issued_check" invisible="1"/>
+ <field name="use_third_check" invisible="1"/>
+
+ <field name="third_check_receipt_ids" nolabel="1" colspan="4"
+ on_change="onchange_third_check_receipt_ids(third_check_receipt_ids, journal_id, partner_id, currency_id, type, date,state)"/>
+ </page>
+ </page>
+ </field>
+ </record>
+
+
+ <record id="action_debit_vendor_receipt" model="ir.actions.act_window">
+ <field name="name">Customer Debit Payment</field>
+ <field name="res_model">account.voucher</field>
+ <field name="view_type">form</field>
+ <!-- <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt')]</field> -->
+ <field name="domain">[('type','=','receipt')]</field>
+ <field name="context">{'type':'receipt'}</field>
+ <field name="search_view_id" ref="account_voucher.view_voucher_filter_customer_pay"/>
+ <field name="view_id" eval="False"/>
+ <field name="target">current</field>
+ <field name="help">Sales payment allows you to register the payments you receive from your customers. In order to record a payment, you must enter the customer, the payment method (=the journal) and the payment amount. OpenERP will propose to you automatically the reconciliation of this payment with the open invoices or sales receipts.</field>
+ </record>
+
+ <record id="action_debit_vendor_receipt_tree" model="ir.actions.act_window.view">
+ <field eval="1" name="sequence"/>
+ <field name="view_mode">tree</field>
+ <field name="act_window_id" ref="action_debit_vendor_receipt"/>
+ </record>
+
+ <record id="action_debit_vendor_receipt_form" model="ir.actions.act_window.view">
+ <field eval="2" name="sequence"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="view_vendor_receipt_check_form"/>
+ <field name="act_window_id" ref="action_debit_vendor_receipt"/>
+ </record>
+
+
+ </data>
+</openerp>
=== added directory 'l10n_ar_account_check_duo/i18n'
=== added file 'l10n_ar_account_check_duo/i18n/en_AR.mo'
Binary files l10n_ar_account_check_duo/i18n/en_AR.mo 1970-01-01 00:00:00 +0000 and l10n_ar_account_check_duo/i18n/en_AR.mo 2012-11-02 15:08:21 +0000 differ
=== added file 'l10n_ar_account_check_duo/i18n/en_AR.po'
--- l10n_ar_account_check_duo/i18n/en_AR.po 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/i18n/en_AR.po 2012-11-02 15:08:21 +0000
@@ -0,0 +1,631 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * account_check_duo
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-10-30 19:47+0000\n"
+"PO-Revision-Date: 2012-10-30 17:21-0300\n"
+"Last-Translator: s <poyo.ar@xxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: account_check_duo
+#: field:account.issued.check,clearing:0
+#: field:account.third.check,clearing:0
+msgid "Clearing"
+msgstr "Clearing"
+
+#. module: account_check_duo
+#: field:account.voucher,show_check_page:0
+msgid "Show Check Page"
+msgstr "Mostrar Listado de Cheques"
+
+#. module: account_check_duo
+#: field:account.check.dreject,reject_date:0
+#: field:account.check.hreject,reject_date:0
+#: field:account.issuedcheck.hreject,reject_date:0
+msgid "Reject Date"
+msgstr "Fecha Rechazo"
+
+#. module: account_check_duo
+#: selection:account.third.check,state:0
+msgid "Deposited"
+msgstr "Depositado"
+
+#. module: account_check_duo
+#: view:account.voucher:0
+msgid "Payment methods"
+msgstr "Metodos de Pagos"
+
+#. module: account_check_duo
+#: field:account.third.check,vat:0
+msgid "Vat"
+msgstr "CUIT"
+
+#. module: account_check_duo
+#: field:account.journal,use_issued_check:0
+#: field:account.voucher,use_issued_check:0
+msgid "Use Issued Checks"
+msgstr "Cheques Propios"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_check_sold
+msgid "account.check.sold"
+msgstr "account.check.sold"
+
+#. module: account_check_duo
+#: field:account.check.sold,sold_date:0
+msgid "Sold Date"
+msgstr "Fecha Venta"
+
+#. module: account_check_duo
+#: field:account.issued.check,amount:0
+msgid "Amount Check"
+msgstr "Monto"
+
+#. module: account_check_duo
+#: field:account.issued.check,company_id:0
+#: field:account.third.check,company_id:0
+msgid "Company"
+msgstr "Empresa"
+
+#. module: account_check_duo
+#: field:account.third.check,reject_debit_note_prov:0
+msgid "Reject Debit Note Prov"
+msgstr "Nota de Debito del Proveedor"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_check_hreject
+msgid "account.check.hreject"
+msgstr "account.check.hreject"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+#: view:account.voucher:0
+#: field:account.voucher,issued_check_ids:0
+#: model:ir.actions.act_window,name:account_check_duo.action_issued_check
+#: model:ir.ui.menu,name:account_check_duo.menu_treasury_issued_check
+msgid "Issued Checks"
+msgstr "Cheques Propios"
+
+#. module: account_check_duo
+#: field:account.journal,use_third_check:0
+#: field:account.voucher,use_third_check:0
+msgid "Use Third Checks"
+msgstr "Cheques de Terceros"
+
+#. module: account_check_duo
+#: view:res.partner.bank:0
+#: field:res.partner.bank,account_id:0
+msgid "Account"
+msgstr "Cuenta"
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,help:account_check_duo.action_debit_vendor_receipt
+msgid "Sales payment allows you to register the payments you receive from your customers. In order to record a payment, you must enter the customer, the payment method (=the journal) and the payment amount. OpenERP will propose to you automatically the reconciliation of this payment with the open invoices or sales receipts."
+msgstr "Sales payment allows you to register the payments you receive from your customers. In order to record a payment, you must enter the customer, the payment method (=the journal) and the payment amount. OpenERP will propose to you automatically the reconciliation of this payment with the open invoices or sales receipts."
+
+#. module: account_check_duo
+#: view:account.third.check:0
+#: field:account.third.check,source_partner_id:0
+msgid "Source Partner"
+msgstr "Empresa Origen"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+#: view:account.third.check:0
+msgid "Total Amount"
+msgstr "Total"
+
+#. module: account_check_duo
+#: view:account.third.check:0
+#: view:account.voucher:0
+#: field:account.voucher,third_check_ids:0
+#: field:account.voucher,third_check_receipt_ids:0
+#: model:ir.actions.act_window,name:account_check_duo.action_third_check
+#: model:ir.ui.menu,name:account_check_duo.menu_treasury_third_check
+msgid "Third Checks"
+msgstr "Cheques de Terceros"
+
+#. module: account_check_duo
+#: constraint:account.journal:0
+msgid "Configuration error! The currency chosen should be shared by the default accounts too."
+msgstr "Configuration error! The currency chosen should be shared by the default accounts too."
+
+#. module: account_check_duo
+#: selection:account.issued.check,state:0
+msgid "Cancelled"
+msgstr "Cancelado"
+
+#. module: account_check_duo
+#: field:account.third.check,amount:0
+msgid "Check Amount"
+msgstr "Monto"
+
+#. module: account_check_duo
+#: field:account.issued.check,change_date:0
+#: field:account.third.check,change_date:0
+msgid "Change Date"
+msgstr "Fecha de Cambio"
+
+#. module: account_check_duo
+#: sql_constraint:account.journal:0
+msgid "The code of the journal must be unique per company !"
+msgstr "El código del diario debe ser único por empresa!"
+
+#. module: account_check_duo
+#: field:account.check.dreject,make_expense:0
+#: field:account.check.hreject,make_expense:0
+#: field:account.issuedcheck.hreject,make_expense:0
+msgid "Make Expenses ?"
+msgstr "Genera Gastos?"
+
+#. module: account_check_duo
+#: field:account.third.check,date_in:0
+msgid "Date In"
+msgstr "Fecha de Entrada"
+
+#. module: account_check_duo
+#: view:account.voucher:0
+msgid "Payment Information"
+msgstr "Información del Pago"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+msgid "Partner"
+msgstr "Partner"
+
+#. module: account_check_duo
+#: field:account.issued.check,clearing_date:0
+#: field:account.third.check,clearing_date:0
+msgid "Clearing Date"
+msgstr "Fecha de Clearing"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_voucher.py:226
+#, python-format
+msgid "The associated journal force that the total amount is the same as the one paid with checks."
+msgstr "The associated journal force that the total amount is the same as the one paid with checks."
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_voucher
+msgid "Accounting Voucher"
+msgstr "Accounting Voucher"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_voucher.py:82
+#, python-format
+msgid "Journal must be fill"
+msgstr "El diario debe ser cargado."
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+#: field:account.issued.check,state:0
+#: view:account.third.check:0
+#: field:account.third.check,state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:277
+#, python-format
+msgid "Vat number must be 11 numbers !"
+msgstr "El número de CUIT debe tener 11 números !"
+
+#. module: account_check_duo
+#: selection:account.issued.check,clearing:0
+#: selection:account.third.check,clearing:0
+msgid "72 hs"
+msgstr "72 hs"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:99
+#: code:addons/account_check_duo/account_check_duo.py:111
+#: code:addons/account_check_duo/account_check_duo.py:119
+#: code:addons/account_check_duo/account_check_duo.py:129
+#: code:addons/account_check_duo/account_check_duo.py:255
+#: code:addons/account_check_duo/account_check_duo.py:265
+#: code:addons/account_check_duo/account_check_duo.py:273
+#: code:addons/account_check_duo/account_check_duo.py:277
+#: code:addons/account_check_duo/account_check_duo.py:288
+#: code:addons/account_check_duo/account_check_duo.py:295
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,name:account_check_duo.action_check_deposit
+msgid "Check Deposit"
+msgstr "Depositar Cheque"
+
+#. module: account_check_duo
+#: field:account.check.deposit,date:0
+msgid "Deposit Date"
+msgstr "Deposit Date"
+
+#. module: account_check_duo
+#: field:account.issued.check,reject_debit_note:0
+#: field:account.third.check,reject_debit_note:0
+msgid "Reject Debit Note"
+msgstr "Nota de Débito"
+
+#. module: account_check_duo
+#: view:account.third.check:0
+msgid "In Holding"
+msgstr "En Cartera"
+
+#. module: account_check_duo
+#: help:account.issued.check,company_id:0
+#: help:account.third.check,company_id:0
+msgid "Company related to this Check"
+msgstr "Empresa relacionada con este cheque"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_voucher.py:225
+#, python-format
+msgid "Cannot Validate Voucher"
+msgstr "No se puede validar el cheque"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_check_deposit
+msgid "account.check.deposit"
+msgstr "account.check.deposit"
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,name:account_check_duo.action_check_dreject
+msgid "Rejected Deposited Check"
+msgstr "Rechazar Cheque Depositado"
+
+#. module: account_check_duo
+#: field:account.third.check,clearing_date_hasta:0
+msgid "Clearing Date Hasta"
+msgstr "Fecha de Clearing Hasta"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+#: field:account.issued.check,receiving_partner_id:0
+#: view:account.third.check:0
+#: field:account.third.check,destiny_partner_id:0
+msgid "Destiny Partner"
+msgstr "Empresa Destino"
+
+#. module: account_check_duo
+#: field:account.check.dreject,expense_amount:0
+#: field:account.check.hreject,expense_amount:0
+#: field:account.check.sold,expense_amount:0
+#: field:account.issuedcheck.hreject,expense_amount:0
+msgid "Expense Amount"
+msgstr "Importe de Gastos"
+
+#. module: account_check_duo
+#: field:account.issued.check,date:0
+msgid "Date Check"
+msgstr "Fecha de Emisión"
+
+#. module: account_check_duo
+#: selection:account.issued.check,state:0
+#: selection:account.third.check,state:0
+msgid "Hand-Rejected"
+msgstr "Entregado-Rechazado"
+
+#. module: account_check_duo
+#: view:account.third.check:0
+msgid "Desde fecha Clearing"
+msgstr "Desde fecha Clearing"
+
+#. module: account_check_duo
+#: view:account.journal:0
+msgid "Check Configuration"
+msgstr "Configuración del Cheque"
+
+#. module: account_check_duo
+#: sql_constraint:account.issued.check:0
+msgid "The number must be unique!"
+msgstr "El número debe ser único!"
+
+#. module: account_check_duo
+#: field:account.journal,validate_only_checks:0
+msgid "Validate only Checks"
+msgstr "Validar solo cheques"
+
+#. module: account_check_duo
+#: field:account.issued.check,debit_date:0
+msgid "Date Debit"
+msgstr "Fecha de Débito"
+
+#. module: account_check_duo
+#: selection:account.issued.check,state:0
+#: selection:account.third.check,state:0
+msgid "Handed"
+msgstr "Entregado"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_check_dreject
+msgid "account.check.dreject"
+msgstr "account.check.dreject"
+
+#. module: account_check_duo
+#: selection:account.issued.check,state:0
+#: selection:account.third.check,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:99
+#: code:addons/account_check_duo/account_check_duo.py:295
+#, python-format
+msgid "The Check must be create on one payment !"
+msgstr "El Cheque debe ser creado en un pago!"
+
+#. module: account_check_duo
+#: view:account.third.check:0
+msgid "Hasta fecha Clearing"
+msgstr "Hasta fecha Clearing"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_voucher.py:133
+#, python-format
+msgid "The check must be in holding state."
+msgstr "El Cheque debe estar en estado \"En Cartera\" "
+
+#. module: account_check_duo
+#: field:account.check.dreject,invoice_expense:0
+#: field:account.check.hreject,invoice_expense:0
+#: field:account.issuedcheck.hreject,invoice_expense:0
+msgid "Invoice Expense?"
+msgstr "Facturar los Gastos?"
+
+#. module: account_check_duo
+#: view:account.voucher:0
+#: model:ir.ui.menu,name:account_check_duo.menu_account_check
+msgid "Checks"
+msgstr "Cheques"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+#: field:account.issued.check,number:0
+#: view:account.third.check:0
+#: field:account.third.check,number:0
+msgid "Check Number"
+msgstr "Número Cheque"
+
+#. module: account_check_duo
+#: help:account.journal,validate_only_checks:0
+msgid "If marked, when validating a voucher, verifies that the total amounth of the voucher is the same as the checks used."
+msgstr "If marked, when validating a voucher, verifies that the total amounth of the voucher is the same as the checks used."
+
+#. module: account_check_duo
+#: selection:account.third.check,state:0
+msgid "Sold"
+msgstr "Vendido"
+
+#. module: account_check_duo
+#: field:account.third.check,date:0
+msgid "Check Date"
+msgstr "Fecha Cheque"
+
+#. module: account_check_duo
+#: view:account.third.check:0
+msgid "Information "
+msgstr "Información"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+msgid "Issued Checks..."
+msgstr "Cheques Propios..."
+
+#. module: account_check_duo
+#: field:account.issued.check,user_id:0
+#: field:account.third.check,user_id:0
+msgid "User"
+msgstr "Usuario"
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,name:account_check_duo.action_debit_vendor_receipt
+msgid "Customer Debit Payment"
+msgstr "Customer Debit Payment"
+
+#. module: account_check_duo
+#: view:account.issued.check:0
+#: view:account.third.check:0
+msgid "Date"
+msgstr "Fecha"
+
+#. module: account_check_duo
+#: field:account.third.check,account_bank_id:0
+msgid "Destiny Account"
+msgstr "Cuenta destino"
+
+#. module: account_check_duo
+#: selection:account.third.check,state:0
+msgid "Dep-Rejected"
+msgstr "Depositado-Rechazado"
+
+#. module: account_check_duo
+#: view:account.third.check:0
+msgid "Third Checks..."
+msgstr "Cheques de Terceros..."
+
+#. module: account_check_duo
+#: field:account.check.dreject,expense_account:0
+#: field:account.check.hreject,expense_account:0
+#: field:account.check.sold,expense_account:0
+#: field:account.issuedcheck.hreject,expense_account:0
+msgid "Expense Account"
+msgstr "Cuenta de gastos"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:111
+#: code:addons/account_check_duo/account_check_duo.py:288
+#, python-format
+msgid "The Check must be in draft state only for unlink !"
+msgstr "El Cheque debe estar en estado \"Borrador\" para ser eliminado !"
+
+#. module: account_check_duo
+#: selection:account.issued.check,clearing:0
+#: selection:account.third.check,clearing:0
+msgid "48 hs"
+msgstr "48 hs"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_issued_check
+msgid "Manage Checks Issued"
+msgstr "Manage Checks Issued"
+
+#. module: account_check_duo
+#: sql_constraint:account.invoice:0
+msgid "Invoice Number must be unique per Company!"
+msgstr "El número de Factura debe ser único por empresa!"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_third_check
+msgid "Manage Checks Third"
+msgstr "Manage Checks Third"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_issuedcheck_hreject
+msgid "account issued check hreject"
+msgstr "account issued check hreject"
+
+#. module: account_check_duo
+#: field:account.issued.check,issued:0
+msgid "Issued"
+msgstr "Propios"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_res_partner_bank
+msgid "Bank Accounts"
+msgstr "Cuenta Bancaria"
+
+#. module: account_check_duo
+#: field:account.issued.check,voucher_id:0
+#: field:account.third.check,voucher_id:0
+msgid "Voucher"
+msgstr "Cheques"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_invoice
+msgid "Invoice"
+msgstr "Factura"
+
+#. module: account_check_duo
+#: selection:account.third.check,state:0
+msgid "Holding"
+msgstr "En Cartera"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:119
+#: code:addons/account_check_duo/account_check_duo.py:255
+#, python-format
+msgid "Ckeck Number must be 8 numbers !"
+msgstr "El número de cheque debe ser de 8 dígitos !"
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,name:account_check_duo.action_check_issue_hrejected
+msgid "Reject Handed Checks"
+msgstr "Rechazar Cheques Entregados"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_voucher.py:133
+#, python-format
+msgid "State!"
+msgstr "Estado!"
+
+#. module: account_check_duo
+#: model:ir.model,name:account_check_duo.model_account_journal
+msgid "Journal"
+msgstr "Diario"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/wizard_issued/check_issued_hreject.py:100
+#: code:addons/account_check_duo/wizard_third/check_dreject.py:96
+#: code:addons/account_check_duo/wizard_third/check_hreject.py:150
+#, python-format
+msgid "Error"
+msgstr "Error"
+
+#. module: account_check_duo
+#: field:account.issued.check,account_bank_id:0
+msgid "Account Bank"
+msgstr "Cuenta Bancaria"
+
+#. module: account_check_duo
+#: help:account.journal,use_issued_check:0
+msgid "Allow to user Issued Checks in associated vouchers."
+msgstr "Allow to user Issued Checks in associated vouchers."
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,name:account_check_duo.action_check_sold
+msgid "Check Sold"
+msgstr "Cheque Vendido"
+
+#. module: account_check_duo
+#: help:account.journal,use_third_check:0
+msgid "Allow to user Third Checks in associated vouchers."
+msgstr "Allow to user Third Checks in associated vouchers."
+
+#. module: account_check_duo
+#: field:account.third.check,bank_id:0
+msgid "Bank"
+msgstr "Banco"
+
+#. module: account_check_duo
+#: field:account.check.deposit,bank_account_id:0
+#: field:account.check.sold,bank_account_id:0
+msgid "Bank Account"
+msgstr "Cuenta Bancaria"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:129
+#: code:addons/account_check_duo/account_check_duo.py:265
+#, python-format
+msgid "Clearing date must be greater than check date"
+msgstr "Fecha de Clearing debe ser mayor a la fecha del cheque"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_check_duo.py:273
+#, python-format
+msgid "Vat number must be not null !"
+msgstr "El Número de CUIT no puede estar vacio !"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/wizard_issued/check_issued_hreject.py:100
+#: code:addons/account_check_duo/wizard_third/check_dreject.py:97
+#: code:addons/account_check_duo/wizard_third/check_hreject.py:150
+#, python-format
+msgid "You must assign expense account and amount !"
+msgstr "Debe asignar la cuenta de gastos y el importe "
+
+#. module: account_check_duo
+#: selection:account.issued.check,clearing:0
+#: selection:account.third.check,clearing:0
+msgid "24 hs"
+msgstr "24 hs"
+
+#. module: account_check_duo
+#: view:account.voucher:0
+msgid "Metodos de Cobro"
+msgstr "Metodos de Cobro"
+
+#. module: account_check_duo
+#: code:addons/account_check_duo/account_voucher.py:82
+#, python-format
+msgid "ATENTION !"
+msgstr "ATENCION !"
+
+#. module: account_check_duo
+#: sql_constraint:account.journal:0
+msgid "The name of the journal must be unique per company !"
+msgstr "El nombre del diario debe ser único por empresa !"
+
+#. module: account_check_duo
+#: model:ir.actions.act_window,name:account_check_duo.action_check_hrejected
+msgid "Rejected Handed Checks"
+msgstr "Rechazar Cheques Entregados"
+
=== added file 'l10n_ar_account_check_duo/partner_view.xml'
--- l10n_ar_account_check_duo/partner_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/partner_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_res_partner_bank_form" model="ir.ui.view">
+ <field name="name">res.partner.bank.form</field>
+ <field name="model">res.partner.bank</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="base.view_partner_bank_form"/>
+ <field name="arch" type="xml">
+ <field name="bank" position="after">
+ <field name="account_id" string="Account"/>
+ </field>
+ </field>
+ </record>
+ </data>
+</openerp>
=== added directory 'l10n_ar_account_check_duo/report'
=== added file 'l10n_ar_account_check_duo/report/New Database.odb'
Binary files l10n_ar_account_check_duo/report/New Database.odb 1970-01-01 00:00:00 +0000 and l10n_ar_account_check_duo/report/New Database.odb 2012-11-02 15:08:21 +0000 differ
=== added file 'l10n_ar_account_check_duo/report/report_check_issued.odt'
Binary files l10n_ar_account_check_duo/report/report_check_issued.odt 1970-01-01 00:00:00 +0000 and l10n_ar_account_check_duo/report/report_check_issued.odt 2012-11-02 15:08:21 +0000 differ
=== added file 'l10n_ar_account_check_duo/report/report_check_issued.rml'
--- l10n_ar_account_check_duo/report/report_check_issued.rml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/report/report_check_issued.rml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,377 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Tabla2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Tabla3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Tabla1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica" fontSize="14.0" leading="17" alignment="CENTER"/>
+ <paraStyle name="P2" fontName="Helvetica" fontSize="15.0" leading="19" alignment="CENTER"/>
+ <paraStyle name="P3" fontName="Helvetica" fontSize="15.0" leading="19" alignment="RIGHT"/>
+ <paraStyle name="P4" fontName="Helvetica" fontSize="14.0" leading="17" textColor="#ff420e"/>
+ <paraStyle name="P5" fontName="Helvetica" fontSize="15.0" leading="19" textColor="#ff420e"/>
+ <paraStyle name="P6" fontName="Helvetica"/>
+ <paraStyle name="P7" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="P8" fontName="Helvetica"/>
+ <paraStyle name="P9" fontName="Helvetica" fontSize="15.0" leading="19" alignment="CENTER"/>
+ <paraStyle name="P10" fontName="Helvetica"/>
+ <paraStyle name="Standard" fontName="Helvetica"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text_20_body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Helvetica"/>
+ <paraStyle name="Table_20_Contents" fontName="Helvetica"/>
+ <paraStyle name="Horizontal_20_Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
+ <paraStyle name="Table_20_Heading" fontName="Helvetica" alignment="CENTER"/>
+ <images/>
+ </stylesheet>
+ <story>
+ <blockTable colWidths="482.0" style="Tabla2">
+ <tr>
+ <td>
+ <para style="Standard">[[repeatIn(objects,'check')]]</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="P5">[[ check.company_id.name ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="P4">
+ <font color="white"> </font>
+ </para>
+ <para style="P3">
+ <font face="Helvetica" size="12.0"/>
+ <font face="Helvetica" size="12.0">Fecha:</font>
+ <font face="Helvetica" size="12.0">13/10/12</font>
+ </para>
+ <para style="P2">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="482.0" style="Tabla3">
+ <tr>
+ <td>
+ <para style="P9">CHEQUES PROPIOS</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="P2">
+ <font color="white"> </font>
+ </para>
+ <para style="P1">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="74.0,63.0,69.0,107.0,64.0,5.0,6.0,8.0,86.0" style="Tabla1">
+ <tr>
+ <td>
+ <para style="P6">Numero</para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P7">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">Fecha </para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P7">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">Fecha Clearing</para>
+ <para style="P7">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">Destiny</para>
+ <para style="P6">Partner</para>
+ <para style="P7">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">Estado</para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P7">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P6">Importe</para>
+ <para style="P6">
+ <font color="white"> </font>
+ </para>
+ <para style="P7">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="P8">[[repeatIn(objects,'check')]]</para>
+ <para style="P10">[[ check.number ]]</para>
+ </td>
+ <td>
+ <para style="P10">[[ check.date ]]</para>
+ </td>
+ <td>
+ <para style="P10">[[ check.clearing_date ]]</para>
+ </td>
+ <td>
+ <para style="P10">[[ check.receiving_partner_id.name ]]</para>
+ </td>
+ <td>
+ <para style="P10">[[ check.state ]]</para>
+ </td>
+ <td>
+ <para style="P10">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P10">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P10">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="P10">[[ check.amount ]]</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard"/>
+ </story>
+</document>
=== added file 'l10n_ar_account_check_duo/report/report_check_third.odt'
Binary files l10n_ar_account_check_duo/report/report_check_third.odt 1970-01-01 00:00:00 +0000 and l10n_ar_account_check_duo/report/report_check_third.odt 2012-11-02 15:08:21 +0000 differ
=== added file 'l10n_ar_account_check_duo/report/report_check_third.rml'
--- l10n_ar_account_check_duo/report/report_check_third.rml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/report/report_check_third.rml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<document filename="test.pdf">
+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
+ <pageTemplate id="first">
+ <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
+ </pageTemplate>
+ </template>
+ <stylesheet>
+ <blockTableStyle id="Standard_Outline">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Tabla3">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <blockTableStyle id="Tabla1">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
+ </blockTableStyle>
+ <blockTableStyle id="Tabla2">
+ <blockAlignment value="LEFT"/>
+ <blockValign value="TOP"/>
+ </blockTableStyle>
+ <initialize>
+ <paraStyle name="all" alignment="justify"/>
+ </initialize>
+ <paraStyle name="P1" fontName="Helvetica" fontSize="13.0" leading="16" alignment="RIGHT" textColor="#ff420e"/>
+ <paraStyle name="P2" fontName="Helvetica" fontSize="14.0" leading="17" textColor="#ff420e"/>
+ <paraStyle name="P3" fontName="Helvetica" fontSize="15.0" leading="19" alignment="CENTER"/>
+ <paraStyle name="Standard" fontName="Helvetica"/>
+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
+ <paraStyle name="Text_20_body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
+ <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
+ <paraStyle name="Index" fontName="Helvetica"/>
+ <paraStyle name="Table_20_Contents" fontName="Helvetica"/>
+ <images/>
+ </stylesheet>
+ <story>
+ <blockTable colWidths="482.0" style="Tabla3">
+ <tr>
+ <td>
+ <para style="Standard">[[repeatIn(objects,'check')]]</para>
+ <para style="Standard">[[setLang(check.company_id.partner_id.lang) ]]</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="P2">[[ check.company_id.name ]]</para>
+ <para style="P1"/>
+ <para style="P1">
+ <font face="Helvetica" size="12.0">Fecha:</font>
+ <font face="Helvetica" size="12.0">14/10/12</font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="482.0" style="Tabla1">
+ <tr>
+ <td>
+ <para style="P3">CHEQUE DE TERCEROS</para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ <blockTable colWidths="65.0,68.0,62.0,77.0,70.0,8.0,8.0,71.0,54.0" style="Tabla2">
+ <tr>
+ <td>
+ <para style="Table_20_Contents">Numero</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">Fecha</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">Fecha Clearing</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">Source Partner</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">Destiny Partner</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">Estado</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">Importe</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="Standard">[[repeatIn(objects,'check')]]</para>
+ <para style="Table_20_Contents">[[ check.number ]]</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">[[ check.date ]]</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">[[ check.clearing_date ]]</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">[[ check.source_partner_id ]]</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">[[ check.destiny_partner_id ]]</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">[[ check.state ]]</para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">[[ check.amount ]]</para>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ <td>
+ <para style="Table_20_Contents">
+ <font color="white"> </font>
+ </para>
+ </td>
+ </tr>
+ </blockTable>
+ <para style="Standard">
+ <font color="white"> </font>
+ </para>
+ </story>
+</document>
=== added file 'l10n_ar_account_check_duo/res_partner_bank.py'
--- l10n_ar_account_check_duo/res_partner_bank.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/res_partner_bank.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,26 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from osv import fields, osv
+
+
+class res_partner_bank(osv.osv):
+ _name = 'res.partner.bank'
+ _description = 'Res Partner Bank Inherited'
+ _inherit = 'res.partner.bank'
+
+ _columns = {
+ 'account_id': fields.many2one('account.account', 'Account')
+ }
+
+res_partner_bank()
=== added directory 'l10n_ar_account_check_duo/security'
=== added file 'l10n_ar_account_check_duo/security/account_check_security.xml'
--- l10n_ar_account_check_duo/security/account_check_security.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/security/account_check_security.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <!--<data noupdate="0">-->
+ <data>
+ <record id="access_account_issued_check" model="ir.model.access">
+ <field name="model_id" ref="account_check_duo.model_account_issued_check"/>
+ <field name="name">account.issued.check.access</field>
+ <field eval="1" name="perm_read"/>
+ <field eval="1" name="perm_write"/>
+ <field eval="1" name="perm_create"/>
+ <field eval="1" name="perm_unlink"/>
+ <field name="group_id" ref="account.group_account_invoice"/>
+ </record>
+
+ <record id="access_account_third_check" model="ir.model.access">
+ <field name="model_id" ref="account_check_duo.model_account_third_check"/>
+ <field name="name">account.issued.check.access</field>
+ <field eval="1" name="perm_read"/>
+ <field eval="1" name="perm_write"/>
+ <field eval="1" name="perm_create"/>
+ <field eval="1" name="perm_unlink"/>
+ <field name="group_id" ref="account.group_account_invoice"/>
+ </record>
+
+ <!--<record id="issued_check_rule" model="ir.rule">
+ <field name="name">Issued Check Multi-Company</field>
+ <field model="ir.model" name="model_id" ref="account_check.model_account_issued_check"/>
+ <field eval="True" name="global"/>
+ <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
+ </record>
+
+ <record id="third_check_rule" model="ir.rule">
+ <field name="name">Third Check Multi-Company</field>
+ <field model="ir.model" name="model_id" ref="account_check.model_account_third_check"/>
+ <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 file 'l10n_ar_account_check_duo/security/ir.model.access.csv'
--- l10n_ar_account_check_duo/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/security/ir.model.access.csv 2012-11-02 15:08:21 +0000
@@ -0,0 +1,5 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_account_issued_check_full,account_check_duo_access_issued,model_account_issued_check,account.group_account_invoice,1,1,1,1
+access_account_third_check_full,account_check_duo_access_third,model_account_third_check,account.group_account_invoice,1,1,1,1
+access_account_check_duo_third,access_account_check_duo_third,model_account_third_check,,1,1,1,1
+access_account_check_duo_issued,access_account_check_duo_issued,model_account_issued_check,,1,1,1,1
=== added directory 'l10n_ar_account_check_duo/wizard_issued'
=== added file 'l10n_ar_account_check_duo/wizard_issued/__init__.py'
--- l10n_ar_account_check_duo/wizard_issued/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_issued/__init__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,2 @@
+import check_issued_hreject
+
=== added file 'l10n_ar_account_check_duo/wizard_issued/check_issued_hreject.py'
--- l10n_ar_account_check_duo/wizard_issued/check_issued_hreject.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_issued/check_issued_hreject.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,151 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+##########################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+
+class account_issuedcheck_hreject(osv.osv_memory):
+
+ _name = 'account.issuedcheck.hreject'
+ _description = 'account issued check hreject'
+ _columns = {
+ 'reject_date': fields.date('Reject Date', required=True),
+ 'expense_account': fields.many2one('account.account','Expense Account'),
+ 'expense_amount': fields.float('Expense Amount'),
+ 'invoice_expense': fields.boolean('Invoice Expense?'),
+ 'make_expense': fields.boolean('Make Expenses ?'),
+ }
+
+ _defaults = { 'make_expense': False,
+ }
+
+
+ def _get_address_invoice(self, cr, uid, partner):
+ partner_obj = self.pool.get('res.partner')
+ return partner_obj.address_get(cr, uid, [partner],['contact', 'invoice'])
+
+
+ def action_hreject_issued(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ record_ids = context.get('active_ids', [])
+ third_issued = self.pool.get('account.issued.check')
+ check_objs = third_issued.browse(cr, uid, record_ids, context=context)
+
+ third_check = self.pool.get('account.issued.check')
+ wf_service = netsvc.LocalService('workflow')
+ invoice_obj = self.pool.get('account.invoice')
+ move_line = self.pool.get('account.move.line')
+ invoice_line_obj = self.pool.get('account.invoice.line')
+ wizard = self.browse(cr, uid, ids[0], context=context)
+
+ period_id = self.pool.get('account.period').find(cr, uid,wizard.reject_date)[0]
+
+ for check in check_objs:
+ if check.state != 'handed':
+ raise osv.except_osv('Check %s selected error' % (check.number),
+ 'The selected checks must to be in handed.'
+ )
+ partner_address = self._get_address_invoice(cr, uid,check.voucher_id.partner_id.id)
+ contact_address = partner_address['contact']
+ invoice_address = partner_address['invoice']
+ invoice_vals = {
+ 'name': check.number,
+ 'origin': 'Check Rejected Hand ' + (check.number or '') + ',' + (check.voucher_id.number),
+ 'type': 'in_debit',
+ 'account_id': check.voucher_id.partner_id.property_account_payable.id,
+ 'partner_id': check.voucher_id.partner_id.id,
+ 'address_invoice_id': invoice_address,
+ 'address_contact_id': contact_address,
+ 'date_invoice': wizard.reject_date,
+ }
+
+ invoice_id = invoice_obj.create(cr, uid, invoice_vals)
+
+ invoice_line_vals = {
+ 'name': 'Check Rejected Hand ' + check.number,
+ 'origin': 'Check Rejected Hand ' + check.number,
+ 'invoice_id': invoice_id,
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'price_unit': check.amount,
+ 'quantity': 1,
+ }
+ invoice_line_obj.create(cr, uid, invoice_line_vals)
+ check.write({'reject_debit_note': invoice_id})
+
+ if wizard.make_expense:
+ if wizard.invoice_expense:
+ if wizard.expense_amount != 0.00 and wizard.expense_account:
+ invoice_line_obj.create(cr, uid, {
+ 'name': 'Check Rejected Hand Expenses' + check.number,
+ 'origin':'Check Rejected Hand ' + check.number,
+ 'invoice_id': invoice_id,
+ 'account_id': wizard.expense_account.id,
+ 'price_unit': wizard.expense_amount,
+ 'quantity': 1,
+ })
+ else:
+ raise osv.except_osv(_('Error'),_('You must assign expense account and amount !'))
+
+ else:
+ if wizard.expense_amount != 0.00 \
+ and wizard.expense_account:
+ name = self.pool.get('ir.sequence').get_id(cr, uid,check.voucher_id.journal_id.id)
+ move_id = self.pool.get('account.move').create(cr, uid, {
+ 'name': name,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'state': 'draft',
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'ref': 'Check Rejected Hand ' + check.number,
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': wizard.expense_account.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'debit': wizard.expense_amount,
+ 'credit': 0.0,
+ 'ref': 'Check Hand Reject Nro. ' + check.number,
+ 'state': 'valid',
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'debit': 0.0,
+ 'credit': wizard.expense_amount,
+ 'ref': 'Check Hand Reject' + check.number,
+ 'state': 'valid',
+ })
+ self.pool.get('account.move').write(cr, uid, [move_id], {
+ 'state': 'posted',
+ })
+
+ wf_service.trg_validate(uid, 'account.issued.check', check.id,
+ 'handed_hrejected', cr)
+
+ return {}
+
+account_issuedcheck_hreject()
=== added file 'l10n_ar_account_check_duo/wizard_issued/view_issued_check_hreject.xml'
--- l10n_ar_account_check_duo/wizard_issued/view_issued_check_hreject.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_issued/view_issued_check_hreject.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="account.account_issuedcheck_hreject_form_view">
+ <field name="name">account.issuedcheck.hreject.wizard.form</field>
+ <field name="model">account.issuedcheck.hreject</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Rejected Handed Check" col="2">
+ <field name="reject_date"/>
+ <field name="make_expense" string="Make Expense ?"/>
+ <field name="expense_account"/>
+ <field name="expense_amount"/>
+ <field name="invoice_expense"/>
+ <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+ <button type="object" name="action_hreject_issued" string="Rejecting Checks Handed" icon="gtk-ok"/>
+ </form>
+ </field>
+ </record>
+
+ <act_window
+ name="Reject Handed Checks"
+ res_model="account.issuedcheck.hreject"
+ src_model="account.issued.check"
+ view_mode="form"
+ target="new"
+ key2="client_action_multi"
+ id="action_check_issue_hrejected"/>
+
+ </data>
+</openerp>
=== added directory 'l10n_ar_account_check_duo/wizard_third'
=== added file 'l10n_ar_account_check_duo/wizard_third/__init__.py'
--- l10n_ar_account_check_duo/wizard_third/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/__init__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,4 @@
+import check_deposit
+import check_hreject
+import check_dreject
+import check_sold
=== added file 'l10n_ar_account_check_duo/wizard_third/check_deposit.py'
--- l10n_ar_account_check_duo/wizard_third/check_deposit.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/check_deposit.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,92 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+
+class account_check_deposit(osv.osv_memory):
+ _name = 'account.check.deposit'
+
+ _columns = {
+ 'bank_account_id': fields.many2one('res.partner.bank', 'Bank Account',required=True),
+ 'date': fields.date('Deposit Date'),
+ }
+
+ def action_deposit(self, cr, uid, ids, context=None):
+ third_check = self.pool.get('account.third.check')
+ wf_service = netsvc.LocalService('workflow')
+
+ move_line = self.pool.get('account.move.line')
+
+ wizard = self.browse(cr, uid, ids[0], context=context)
+
+ period_id = self.pool.get('account.period').find(cr, uid, wizard.date)[0]
+
+ if context is None:
+ context = {}
+ record_ids = context.get('active_ids', [])
+
+ check_objs = third_check.browse(cr, uid, record_ids, context=context)
+
+ for check in check_objs:
+ if check.state != 'holding':
+ raise osv.except_osv('Check %s selected error' % (check.number),
+ 'The selected checks must to be in the holding.' )
+
+ else:
+ name = self.pool.get('ir.sequence').get_id(cr, uid,check.voucher_id.journal_id.id)
+
+ move_id = self.pool.get('account.move').create(cr, uid, {
+ 'name': name,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'state': 'draft',
+ 'period_id': period_id,
+ 'date': wizard.date,
+ 'ref': 'Check Deposit Nr. ' + check.number,
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': wizard.bank_account_id.account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': check.date,
+ 'debit': check.amount,
+ 'credit': 0.0,
+ 'ref': 'Check Deposit Nro. ' + check.number,
+ 'state': 'valid',
+ })
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': check.date,
+ 'debit': 0.0,
+ 'credit': check.amount,
+ 'ref': 'Check Deposit' + check.number,
+ 'state': 'valid',
+ })
+
+ check.write({'account_bank_id': wizard.bank_account_id.id})
+ wf_service.trg_validate(uid, 'account.third.check', check.id,'holding_deposited', cr)
+ self.pool.get('account.move').write(cr, uid, [move_id], {'state': 'posted',})
+
+ return {}
+
+account_check_deposit()
=== added file 'l10n_ar_account_check_duo/wizard_third/check_dreject.py'
--- l10n_ar_account_check_duo/wizard_third/check_dreject.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/check_dreject.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,148 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+##########################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+
+
+class account_check_dreject(osv.osv_memory):
+ _name = 'account.check.dreject'
+
+ _columns = {
+ 'reject_date': fields.date('Reject Date', required=True),
+ 'expense_account': fields.many2one('account.account','Expense Account'),
+ 'expense_amount': fields.float('Expense Amount'),
+ 'invoice_expense': fields.boolean('Invoice Expense?'),
+ 'make_expense': fields.boolean('Make Expenses ?'),
+ }
+
+ def _get_address_invoice(self, cr, uid, partner):
+ partner_obj = self.pool.get('res.partner')
+ return partner_obj.address_get(cr, uid, [partner],['contact', 'invoice'])
+
+ def action_dreject(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ record_ids = context.get('active_ids', [])
+ third_check = self.pool.get('account.third.check')
+ check_objs = third_check.browse(cr, uid, record_ids, context=context)
+
+ third_check = self.pool.get('account.third.check')
+ wf_service = netsvc.LocalService('workflow')
+ invoice_obj = self.pool.get('account.invoice')
+ move_line = self.pool.get('account.move.line')
+ invoice_line_obj = self.pool.get('account.invoice.line')
+ wizard = self.browse(cr, uid, ids[0], context=context)
+
+ period_id = self.pool.get('account.period').find(cr, uid,wizard.reject_date)[0]
+
+ for check in check_objs:
+ if check.state != 'deposited':
+ raise osv.except_osv('Check %s selected error' % (check.number),
+ 'The selected checks must to be in deposited.'
+ )
+ partner_address = self._get_address_invoice(cr, uid,check.voucher_id.partner_id.id)
+ contact_address = partner_address['contact']
+ invoice_address = partner_address['invoice']
+ invoice_vals = {
+ 'name': check.number,
+ 'origin': 'Check Rejected Dep ' + (check.number or '') + ',' + (check.voucher_id.number),
+ 'type': 'out_debit',
+ 'account_id': check.voucher_id.partner_id.property_account_receivable.id,
+ 'partner_id': check.voucher_id.partner_id.id,
+ 'address_invoice_id': invoice_address,
+ 'address_contact_id': contact_address,
+ 'date_invoice': wizard.reject_date,
+ }
+
+ invoice_id = invoice_obj.create(cr, uid, invoice_vals)
+
+ invoice_line_vals = {
+ 'name': 'Check Rejected Dep' + check.number,
+ 'origin': 'Check Rejected Dep' + check.number,
+ 'invoice_id': invoice_id,
+ 'account_id': check.account_bank_id,
+ #'account_id': check.voucher_id.journal_id.default_debit_account_id.id,
+ 'price_unit': check.amount,
+ 'quantity': 1,
+ }
+ invoice_line_obj.create(cr, uid, invoice_line_vals)
+ check.write({'reject_debit_note': invoice_id})
+
+ if wizard.make_expense:
+ if wizard.invoice_expense:
+ if wizard.expense_amount != 0.00 and wizard.expense_account:
+ invoice_line_obj.create(cr, uid, {
+ 'name': 'Check Rejected Dep Expenses' + check.number,
+ 'origin': 'Check Rejected Dep ' + check.number,
+ 'invoice_id': invoice_id,
+ 'account_id': wizard.expense_account.id,
+ 'price_unit': wizard.expense_amount,
+ 'quantity': 1,
+ })
+ else:
+ raise osv.except_osv(_('Error'),
+ _('You must assign expense account and amount !'))
+
+ else:
+ if wizard.expense_amount != 0.00 \
+ and wizard.expense_account:
+ name = self.pool.get('ir.sequence').get_id(cr, uid,check.voucher_id.journal_id.id)
+ move_id = self.pool.get('account.move').create(cr, uid, {
+ 'name': name,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'state': 'draft',
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'ref': 'Check Rejected Dep ' + check.number,
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': wizard.expense_account.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'debit': wizard.expense_amount,
+ 'credit': 0.0,
+ 'ref': 'Check Dep Reject Nro ' + check.number,
+ 'state': 'valid',
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'debit': 0.0,
+ 'credit': wizard.expense_amount,
+ 'ref': 'Check Dep Reject' + check.number,
+ 'state': 'valid',
+ })
+ self.pool.get('account.move').write(cr, uid, [move_id], {
+ 'state': 'posted',
+ })
+
+ wf_service.trg_validate(uid, 'account.third.check', check.id,
+ 'deposited_drejected', cr)
+
+ return {}
+
+account_check_dreject()
=== added file 'l10n_ar_account_check_duo/wizard_third/check_hreject.py'
--- l10n_ar_account_check_duo/wizard_third/check_hreject.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/check_hreject.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,200 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+##########################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+import logging
+
+_logger = logging.getLogger(__name__)
+
+
+class account_check_hreject(osv.osv_memory):
+ _name = 'account.check.hreject'
+
+ _columns = {
+ 'reject_date': fields.date('Reject Date', required=True),
+ 'expense_account': fields.many2one('account.account','Expense Account'),
+ 'expense_amount': fields.float('Expense Amount'),
+ 'invoice_expense': fields.boolean('Invoice Expense?'),
+ 'make_expense': fields.boolean('Make Expenses ?'),
+ }
+
+ _defaults = { 'make_expense': False,
+ }
+
+
+ def _get_address_invoice(self, cr, uid, partner):
+ partner_obj = self.pool.get('res.partner')
+ return partner_obj.address_get(cr, uid, [partner],['contact', 'invoice'])
+
+ def action_hreject(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ record_ids = context.get('active_ids', [])
+
+ third_check = self.pool.get('account.third.check')
+ check_objs = third_check.browse(cr, uid, record_ids, context=context)
+
+
+ wf_service = netsvc.LocalService('workflow')
+ invoice_obj = self.pool.get('account.invoice')
+ invoice_line_obj = self.pool.get('account.invoice.line')
+ invoice_obj_prov = self.pool.get('account.invoice')
+ invoice_line_obj_prov = self.pool.get('account.invoice.line')
+ move_line = self.pool.get('account.move.line')
+
+ wizard = self.browse(cr, uid, ids[0], context=context)
+
+ period_id = self.pool.get('account.period').find(cr, uid,wizard.reject_date)[0]
+
+ for check in check_objs:
+ if check.state != 'handed':
+ raise osv.except_osv('Check %s selected error' % (check.number),
+ 'The selected checks must to be in handed.'
+ )
+ #client
+ partner_address = self._get_address_invoice(cr, uid,check.voucher_id.partner_id.id)
+ contact_address = partner_address['contact']
+ invoice_address = partner_address['invoice']
+ invoice_vals = {
+ 'name': check.number,
+ 'origin': 'Check Rejected Hand ' + (check.number or '') + ',' + (check.voucher_id.number),
+ 'type': 'out_debit',
+ 'account_id': check.voucher_id.partner_id.property_account_receivable.id,
+ 'partner_id': check.voucher_id.partner_id.id,
+ 'address_invoice_id': invoice_address,
+ 'address_contact_id': contact_address,
+ 'date_invoice': wizard.reject_date,
+ }
+
+ invoice_id = invoice_obj.create(cr, uid, invoice_vals)
+
+ invoice_line_vals = {
+ 'name': 'Check Rejected Hand ' + check.number,
+ 'origin': 'Check Rejected Hand ' + check.number,
+ 'invoice_id': invoice_id,
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'price_unit': check.amount,
+ 'quantity': 1,
+ }
+ invoice_line_obj.create(cr, uid, invoice_line_vals)
+ check.write({'reject_debit_note': invoice_id})
+
+ #proveedor
+ #partner_address = self._get_address_invoice(cr, uid,check.voucher_id.partner_id.id)
+
+ partner_address = self._get_address_invoice(cr, uid,check.destiny_partner_id.id)
+ contact_address = partner_address['contact']
+ invoice_address = partner_address['invoice']
+ invoice_vals_prov = {
+ 'name': check.number,
+ 'origin': 'Check Rejected Hand ' + (check.number or '') + ',' + (check.voucher_id.number),
+ 'type': 'in_debit',
+ 'account_id': check.voucher_id.partner_id.property_account_receivable.id,
+ 'partner_id': check.destiny_partner_id.id,
+ 'address_invoice_id': invoice_address,
+ 'address_contact_id': contact_address,
+ 'date_invoice': wizard.reject_date,
+ }
+
+ invoice_id_prov = invoice_obj_prov.create(cr, uid, invoice_vals_prov)
+
+ invoice_line_vals_prov = {
+ 'name': 'Check Rejected Hand ' + check.number,
+ 'origin': 'Check Rejected Hand ' + check.number,
+ 'invoice_id': invoice_id_prov,
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'price_unit': check.amount,
+ 'quantity': 1,
+ }
+ invoice_line_obj_prov.create(cr, uid, invoice_line_vals_prov)
+ check.write({'reject_debit_note_prov': invoice_id_prov})
+
+
+ if wizard.make_expense:
+ if wizard.invoice_expense:
+ if wizard.expense_amount != 0.00 and wizard.expense_account:
+ #cliente
+ invoice_line_obj.create(cr, uid, {
+ 'name': 'Check Rejected Hand Expenses' + check.number,
+ 'origin':'Check Rejected Hand ' + check.number,
+ 'invoice_id': invoice_id,
+ 'account_id': wizard.expense_account.id,
+ 'price_unit': wizard.expense_amount,
+ 'quantity': 1,
+ })
+ #proveedor
+ invoice_line_obj.create(cr, uid, {
+ 'name': 'Check Rejected Hand Expenses' + check.number,
+ 'origin':'Check Rejected Hand ' + check.number,
+ 'invoice_id': invoice_id_prov,
+ 'account_id': wizard.expense_account.id,
+ 'price_unit': wizard.expense_amount,
+ 'quantity': 1,
+ })
+
+ else:
+ raise osv.except_osv(_('Error'),_('You must assign expense account and amount !'))
+
+ else:
+ if wizard.expense_amount != 0.00 \
+ and wizard.expense_account:
+ name = self.pool.get('ir.sequence').get_id(cr, uid,check.voucher_id.journal_id.id)
+ move_id = self.pool.get('account.move').create(cr, uid, {
+ 'name': name,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'state': 'draft',
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'ref': 'Check Rejected Hand ' + check.number,
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': wizard.expense_account.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'debit': wizard.expense_amount,
+ 'credit': 0.0,
+ 'ref': 'Check Hand Reject Nro. ' + check.number,
+ 'state': 'valid',
+ })
+
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.reject_date,
+ 'debit': 0.0,
+ 'credit': wizard.expense_amount,
+ 'ref': 'Check Hand Reject' + check.number,
+ 'state': 'valid',
+ })
+ self.pool.get('account.move').write(cr, uid, [move_id], {
+ 'state': 'posted',
+ })
+
+ wf_service.trg_validate(uid, 'account.third.check', check.id,
+ 'handed_hrejected', cr)
+
+ return {}
+
+account_check_hreject()
=== added file 'l10n_ar_account_check_duo/wizard_third/check_sold.py'
--- l10n_ar_account_check_duo/wizard_third/check_sold.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/check_sold.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,115 @@
+# coding=utf-8
+# Copyright (C) 2008-2011 Thymbra
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+##########################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+import time
+
+
+class account_check_sold(osv.osv_memory):
+ _name = 'account.check.sold'
+
+ _columns = {
+ 'sold_date': fields.date('Sold Date', required=True),
+ 'expense_account': fields.many2one('account.account','Expense Account'),
+ 'expense_amount': fields.float('Expense Amount'),
+ 'bank_account_id': fields.many2one('res.partner.bank', 'Bank Account',required=True),
+ }
+
+ def action_sold(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ record_ids = context.get('active_ids', [])
+
+ third_check = self.pool.get('account.third.check')
+ check_objs = third_check.browse(cr, uid, record_ids, context=context)
+
+ #third_check = self.pool.get('account.third.check')
+ wf_service = netsvc.LocalService('workflow')
+ #invoice_obj = self.pool.get('account.invoice')
+ move_line = self.pool.get('account.move.line')
+ #invoice_line_obj = self.pool.get('account.invoice.line')
+ wizard = self.browse(cr, uid, ids[0], context=context)
+
+ period_id = self.pool.get('account.period').find(cr, uid,wizard.sold_date)[0]
+
+ for check in check_objs:
+ if check.state != 'holding':
+ raise osv.except_osv('Check %s selected error' % (check.number),
+ 'The selected checks must to be in holding.'
+ )
+
+ if wizard.expense_amount != 0.00 and wizard.expense_account:
+ name = self.pool.get('ir.sequence').get_id(cr, uid,check.voucher_id.journal_id.id)
+ move_id = self.pool.get('account.move').create(cr, uid, {
+ 'name': name,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'state': 'draft',
+ 'period_id': period_id,
+ 'date': wizard.sold_date,
+ 'ref': 'Check Sold ' + check.number,
+ })
+ #debit
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': wizard.expense_account.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.sold_date,
+ 'debit': wizard.expense_amount,
+ 'credit': 0.0,
+ 'ref': 'Check Sold Nro. ' + check.number,
+ 'state': 'valid',
+ })
+ #debit
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': wizard.bank_account_id.account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.sold_date,
+ 'debit': check.amount - wizard.expense_amount,
+ 'credit': 0.0,
+ 'ref': 'Check Sold Nro. ' + check.number,
+ 'state': 'valid',
+ })
+ #credit
+ move_line.create(cr, uid, {
+ 'name': name,
+ 'centralisation': 'normal',
+ 'account_id': check.voucher_id.journal_id.default_credit_account_id.id,
+ 'move_id': move_id,
+ 'journal_id': check.voucher_id.journal_id.id,
+ 'period_id': period_id,
+ 'date': wizard.sold_date,
+ 'debit': 0.0,
+ 'credit':check.amount,
+ 'ref': 'Check Sold' + check.number,
+ 'state': 'valid',
+ })
+ self.pool.get('account.move').write(cr, uid, [move_id], {
+ 'state': 'posted',
+ })
+
+ wf_service.trg_validate(uid, 'account.third.check', check.id,
+ 'holding_sold', cr)
+
+ return {}
+
+account_check_sold()
=== added file 'l10n_ar_account_check_duo/wizard_third/view_check_deposit.xml'
--- l10n_ar_account_check_duo/wizard_third/view_check_deposit.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/view_check_deposit.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="account.check_deposit_form_view">
+ <field name="name">account.check.deposit.wizard.form</field>
+ <field name="model">account.check.deposit</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Check Deposit" col="2">
+ <field name="bank_account_id"/>
+ <field name="date"/>
+ <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+ <button type="object" name="action_deposit" string="Checks Deposit" icon="gtk-ok"/>
+ </form>
+ </field>
+ </record>
+
+ <act_window
+ name="Check Deposit"
+ res_model="account.check.deposit"
+ src_model="account.third.check"
+ view_mode="form"
+ target="new"
+ key2="client_action_multi"
+ id="action_check_deposit"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/wizard_third/view_check_dreject.xml'
--- l10n_ar_account_check_duo/wizard_third/view_check_dreject.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/view_check_dreject.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="account.check_dreject_form_view">
+ <field name="name">account.check.dreject.wizard.form</field>
+ <field name="model">account.check.dreject</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Deposited Check Reject" col="2">
+ <field name="reject_date"/>
+ <field name="make_expense" string="Make Expenses ?"/>
+ <field name="expense_account"/>
+ <field name="expense_amount"/>
+ <field name="invoice_expense"/>
+ <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+ <button type="object" name="action_dreject" string="Deposited Checks Reject" icon="gtk-ok"/>
+ </form>
+ </field>
+ </record>
+
+ <act_window
+ name="Rejected Deposited Check"
+ res_model="account.check.dreject"
+ src_model="account.third.check"
+ view_mode="form"
+ target="new"
+ key2="client_action_multi"
+ id="action_check_dreject"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/wizard_third/view_check_hreject.xml'
--- l10n_ar_account_check_duo/wizard_third/view_check_hreject.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/view_check_hreject.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="account.check_hreject_form_view">
+ <field name="name">account.check.hreject.wizard.form</field>
+ <field name="model">account.check.hreject</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Reject Handed Check" col="2">
+ <field name="reject_date"/>
+ <field name="make_expense" string="Make Expense ?"/>
+ <field name="expense_account"/>
+ <field name="expense_amount"/>
+ <field name="invoice_expense"/>
+ <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+ <button type="object" name="action_hreject" string="Reject Handed Checks" icon="gtk-ok"/>
+ </form>
+ </field>
+ </record>
+
+ <act_window
+ name="Rejected Handed Checks"
+ res_model="account.check.hreject"
+ src_model="account.third.check"
+ view_mode="form"
+ target="new"
+ key2="client_action_multi"
+ id="action_check_hrejected"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/wizard_third/view_check_sold.xml'
--- l10n_ar_account_check_duo/wizard_third/view_check_sold.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/wizard_third/view_check_sold.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record model="ir.ui.view" id="account.check_sold_form_view">
+ <field name="name">account.check.sold.wizard.form</field>
+ <field name="model">account.check.sold</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Check Sold" col="2">
+ <field name="expense_account"/>
+ <field name="sold_date"/>
+ <field name="expense_amount"/>
+ <field name="bank_account_id"/>
+ <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+ <button type="object" name="action_sold" string="Checks sold" icon="gtk-ok"/>
+ </form>
+ </field>
+ </record>
+
+ <act_window
+ name="Check Sold"
+ res_model="account.check.sold"
+ src_model="account.third.check"
+ view_mode="form"
+ target="new"
+ key2="client_action_multi"
+ id="action_check_sold"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/workflow_issued.xml'
--- l10n_ar_account_check_duo/workflow_issued.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/workflow_issued.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="account_issued_checks" model="workflow">
+ <field name="name">Issued Checks Workflow</field>
+ <field name="osv">account.issued.check</field>
+ <field name="on_create">True</field>
+ </record>
+
+ <!-- Activities -->
+
+ <record id="actt_draft" model="workflow.activity">
+ <field name="wkf_id" ref="account_issued_checks"/>
+ <field name="flow_start">True</field>
+ <field name="name">draft</field>
+ </record>
+
+ <record id="actt_handed" model="workflow.activity">
+ <field name="wkf_id" ref="account_issued_checks"/>
+ <field name="name">handed</field>
+ <field name="kind">function</field>
+ <field name="action">wkfw_handed()</field>
+ </record>
+
+ <record id="actt_hrejected" model="workflow.activity">
+ <field name="wkf_id" ref="account_issued_checks"/>
+ <field name="name">hrejected</field>
+ <field name="flow_stop">True</field>
+ <field name="kind">function</field>
+ <field name="action">wkfw_hrejected()</field>
+ </record>
+
+
+ <record id="actt_cancel" model="workflow.activity">
+ <field name="wkf_id" ref="account_issued_checks"/>
+ <field name="name">cancel</field>
+ <field name="flow_stop">True</field>
+ <field name="kind">function</field>
+ <field name="action">wkfw_cancel()</field>
+ </record>
+
+ <!-- Transition -->
+
+ <record id="transs_draft_handed" model="workflow.transition">
+ <field name="act_from" ref="actt_draft"/>
+ <field name="act_to" ref="actt_handed"/>
+ <field name="signal">draft_handed</field>
+ </record>
+
+ <record id="transs_handed_hrejected" model="workflow.transition">
+ <field name="act_from" ref="actt_handed"/>
+ <field name="act_to" ref="actt_hrejected"/>
+ <field name="signal">handed_hrejected</field>
+ </record>
+
+
+ <record id="transs_draft_cancel" model="workflow.transition">
+ <field name="act_from" ref="actt_draft"/>
+ <field name="act_to" ref="actt_cancel"/>
+ <field name="signal">draft_cancel</field>
+ </record>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_check_duo/workflow_third.xml'
--- l10n_ar_account_check_duo/workflow_third.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_check_duo/workflow_third.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="account_third_checks" model="workflow">
+ <field name="name">Third Checks Workflow</field>
+ <field name="osv">account.third.check</field>
+ <field name="on_create">True</field>
+ </record>
+
+ <!-- Activities -->
+
+ <record id="act_draft" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="flow_start">True</field>
+ <field name="name">draft</field>
+ </record>
+
+ <record id="act_holding" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="name">holding</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_holding()</field>
+ </record>
+
+ <record id="act_deposited" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="name">deposited</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_deposited()</field>
+ </record>
+
+ <record id="act_drejected" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="name">drejected</field>
+ <field name="flow_stop">True</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_drejected()</field>
+ </record>
+
+ <record id="act_handed" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="name">handed</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_handed()</field>
+ </record>
+
+ <record id="act_hrejected" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="name">hrejected</field>
+ <field name="flow_stop">True</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_hrejected()</field>
+ </record>
+
+ <record id="act_sold" model="workflow.activity">
+ <field name="wkf_id" ref="account_third_checks"/>
+ <field name="name">sold</field>
+ <field name="flow_stop">True</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_sold()</field>
+ </record>
+
+ <!-- Transition -->
+
+ <record id="trans_check_holding" model="workflow.transition">
+ <field name="act_from" ref="act_draft"/>
+ <field name="act_to" ref="act_holding"/>
+ <field name="signal">draft_holding</field>
+ </record>
+
+ <record id="trans_holding_deposited" model="workflow.transition">
+ <field name="act_from" ref="act_holding"/>
+ <field name="act_to" ref="act_deposited"/>
+ <field name="signal">holding_deposited</field>
+ </record>
+
+ <record id="trans_deposited_drejected" model="workflow.transition">
+ <field name="act_from" ref="act_deposited"/>
+ <field name="act_to" ref="act_drejected"/>
+ <field name="signal">deposited_drejected</field>
+ </record>
+
+ <record id="trans_holding_handed" model="workflow.transition">
+ <field name="act_from" ref="act_holding"/>
+ <field name="act_to" ref="act_handed"/>
+ <field name="signal">holding_handed</field>
+ </record>
+
+ <record id="trans_handed_hrejected" model="workflow.transition">
+ <field name="act_from" ref="act_handed"/>
+ <field name="act_to" ref="act_hrejected"/>
+ <field name="signal">handed_hrejected</field>
+ </record>
+
+ <record id="trans_holding_sold" model="workflow.transition">
+ <field name="act_from" ref="act_holding"/>
+ <field name="act_to" ref="act_sold"/>
+ <field name="signal">holding_sold</field>
+ </record>
+
+
+ </data>
+</openerp>
=== added directory 'l10n_ar_account_checkbook'
=== added file 'l10n_ar_account_checkbook/__init__.py'
--- l10n_ar_account_checkbook/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/__init__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2012 Silvina Faner (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+import account_checkbook
+import check_duo
+
+
=== added file 'l10n_ar_account_checkbook/__openerp__.py'
--- l10n_ar_account_checkbook/__openerp__.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/__openerp__.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2012 Silvina Faner
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+ "name": "Account CheckBook",
+ "version": "1.0",
+ "depends": ['account', 'account_voucher','account_check_duo',],
+ "author": "Silvina Faner",
+ "category": "Generic Modules/Accounting",
+ "description": """
+
+ This module provides to manage checks (issued and third).
+ =========================================================
+ Add issued checks number (CheckBook)
+ Models of Issued Checks.
+ Add data in Accounting/configuration/Miscellaneous/CheckBook
+ """,
+ 'data': [
+ 'account_checkbook_view.xml',
+ 'check_duo_view.xml',
+ 'workflow_checkbook.xml',
+ ],
+
+ 'demo': [
+ #files containg demo data
+ ],
+ 'test': [
+ #files containg tests
+ ],
+ 'installable': True,
+ 'active': False,
+ # 'certificate': '',
+}
=== added file 'l10n_ar_account_checkbook/account_checkbook.py'
--- l10n_ar_account_checkbook/account_checkbook.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/account_checkbook.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,106 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2012 Silvina Faner.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields, osv
+import logging
+import time
+_logger = logging.getLogger(__name__)
+from tools.translate import _
+from datetime import datetime
+
+class account_checkbook(osv.osv):
+
+ _name = 'account.checkbook'
+ _description = 'Manage Checkbook'
+
+ _columns = {
+ 'name':fields.char('CheckBook Name', size=30, readonly=True,required=True,states={'draft': [('readonly', False)]}),
+ 'range_desde': fields.integer('Check Number Desde', size=8, readonly=True,required=True,states={'draft': [('readonly', False)]}),
+ 'range_hasta': fields.integer('Check Number Hasta', size=8,readonly=True, required=True,states={'draft': [('readonly', False)]}),
+ 'actual_number':fields.char('Next Check Number', size=8,readonly=True, required=True,states={'draft': [('readonly', False)]}),
+ 'account_bank_id': fields.many2one('res.partner.bank','Account Bank',readonly=True,required=True,states={'draft': [('readonly', False)]}),
+ 'user_id' : fields.many2one('res.users','User'),
+ 'change_date': fields.date('Change Date'),
+ 'state':fields.selection([('draft','Draft'),('active','In Use'),('used','Used')],
+ string='State',readonly=True),
+ }
+
+ _order = "name"
+ _defaults = {
+ 'state': 'draft',
+ }
+
+
+
+ def unlink(self, cr, uid, ids, context=None):
+ res= {}
+ for order in self.browse(cr,uid,ids,context=context):
+
+ if order.state not in ('draft'):
+ raise osv.except_osv(_('Error !'), _('You can drop the checkbook(s) only in draft state !'))
+ return False
+ return res
+
+ def onchange_desde(self, cr, uid, ids,range_desde,actual_number, context=None):
+ res = {}
+ range_desde_str = str(range_desde)
+ if len(range_desde_str) != 8:
+ res = {'value':{'range_desde': 0}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Ckeck range desde must be 8 numbers !')}})
+ else:
+
+ res = {'value':{'range_desde': range_desde}}
+ res = {'value':{'actual_number': range_desde_str}}
+ return res
+
+
+ def onchange_hasta(self, cr, uid, ids,range_desde,range_hasta, context=None):
+ res = {}
+ if int(range_hasta) < int(range_desde):
+ res = {'value':{'range_hasta': 0}}
+ res.update({'warning': {'title': _('Error !'), 'message': _('Range hasta must be greater than range desde')}})
+ return res
+
+
+ def wkf_active(self, cr, uid, ids,context=None):
+ if context is None:
+ context = {}
+ res= {}
+ check_obj= self.pool.get('account.checkbook')
+ for order in self.browse(cr,uid,ids,context=context):
+ res = check_obj.search(cr, uid, [('account_bank_id', '=', order.account_bank_id.id),
+ ('state', '=', 'active')],)
+
+ if res:
+ raise osv.except_osv(_('Error !'), _('You cant change the checkbook´s state, there is one active !'))
+ return False
+
+ else:
+ self.write(cr, uid, ids, { 'state' : 'active' })
+ return True
+
+
+ def wkf_used(self, cr, uid, ids,context=None):
+ self.write(cr, uid, ids, { 'state' : 'used' })
+ return True
+
+
+account_checkbook()
=== added file 'l10n_ar_account_checkbook/account_checkbook_view.xml'
--- l10n_ar_account_checkbook/account_checkbook_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/account_checkbook_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="view_account_checkbook_search" model="ir.ui.view">
+ <field name="name">account.checkbook.search</field>
+ <field name="model">account.checkbook</field>
+ <field name="type">search</field>
+ <field name="arch" type="xml">
+ <search string="Checkbooks">
+ <field name="name"/>
+ <field name="account_bank_id"/>
+ <field name="state"/>
+ </search>
+ </field>
+ </record>
+
+ <record id="view_account_checkbook_tree" model="ir.ui.view">
+ <field name="name">account.checkbook.tree</field>
+ <field name="model">account.checkbook</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree string="Checkbooks">
+ <field name="name"/>
+ <field name="range_desde"/>
+ <field name="range_hasta"/>
+ <field name="actual_number"/>
+ <field name="account_bank_id"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </record>
+
+
+ <record id="view_account_checkbook_form" model="ir.ui.view">
+ <field name="name">account.checkbook.form</field>
+ <field name="model">account.checkbook</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Checkbooks" >
+ <group col="2" colspan="2" >
+ <field name="name"/>
+ <field name="account_bank_id"/>
+ <separator string="Ranges" colspan="6" />
+ <field name="range_desde" on_change="onchange_desde(range_desde,actual_number)"/>
+ <field name="range_hasta" on_change="onchange_hasta(range_desde,range_hasta)"/>
+ <field name="actual_number"/>
+ </group>
+ <separator colspan="6" />
+ <field name="state" widget="statusbar" colspan="8"/>
+
+ <group colspan="4" col="3">
+ <button name="wkf_active" string="In Use" states="draft"/>
+ <button name="wkf_used" string="Used" states="active"/>
+ </group>
+
+ </form>
+ </field>
+ </record>
+
+
+ <record id="action_account_checkbook_form" model="ir.actions.act_window">
+ <field name="name">Checkbooks</field>
+ <field name="res_model">account.checkbook</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="search_view_id" ref="view_account_checkbook_search"/>
+ </record>
+
+ <menuitem action="action_account_checkbook_form" id="menu_action_account_checkbook_form" parent="account.menu_configuration_misc" sequence="100"/>
+
+ </data>
+</openerp>
=== added file 'l10n_ar_account_checkbook/check_duo.py'
--- l10n_ar_account_checkbook/check_duo.py 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/check_duo.py 2012-11-02 15:08:21 +0000
@@ -0,0 +1,98 @@
+# coding=utf-8
+# Copyright (C) 2012 Silvina Faner
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+###########################################################################
+
+from osv import osv, fields
+from tools.translate import _
+import netsvc
+from datetime import datetime
+import logging
+_logger = logging.getLogger(__name__)
+
+class account_issued_check(osv.osv):
+
+ def _get_checkbook_id(self, cr, uid, context=None):
+
+ if context is None:
+ context = {}
+ checkbook_pool = self.pool.get('account.checkbook')
+
+ res = checkbook_pool.search(cr, uid, [('state', '=', 'active')],)
+ return res[0] or False
+
+
+ _name = 'account.issued.check'
+ _inherit = 'account.issued.check'
+ _description = 'Add checkbook '
+ _columns = {
+ 'checkbook_id': fields.many2one('account.checkbook','Checkbook',readonly=True,required=True,states={'draft': [('readonly', False)]}),
+ }
+
+ _defaults = {
+ 'checkbook_id': _get_checkbook_id,
+ }
+
+
+ def create(self, cr, uid, vals, context={}):
+ order_obj= self.pool.get('account.voucher')
+
+ if not order_obj.browse(cr, uid, context.get('active_ids', []), context=context):
+ raise osv.except_osv(_('Error !'), _('The Check must be create on one payment !'))
+ return res
+
+
+ checkbook_obj = self.pool.get('account.checkbook')
+ num = vals['checkbook_id']
+ book = checkbook_obj.browse(cr, uid, num, context=context)
+
+ actual=0
+ hasta=0
+ actual= int(book.actual_number)
+ hasta= int(book.range_hasta)
+ if actual == hasta:
+ checkbook_obj.write(cr, uid, num, {'state': 'used',})
+ else:
+ if str(book.actual_number) < str(book.range_hasta):
+ sum_actual_number = int(book.actual_number) + 1
+ checkbook_obj.write(cr, uid, num, {'actual_number': str(sum_actual_number),
+ })
+
+ vals['account_bank_id'] = book.account_bank_id.id
+ res = super(account_issued_check, self).create(cr, uid, vals, context)
+ return res
+
+ def onchange_checkbook_id(self, cr, uid, ids, number, checkbook_id, context=None):
+ result = {}
+ checkbook_obj = self.pool.get('account.checkbook')
+ if checkbook_id:
+
+ res = checkbook_obj.browse(cr, uid, checkbook_id, context=context)
+
+ #Busca la chequera activa de acuerdo a la cuenta
+ if not res.id:
+ result = {'value':{'checkbook_id': None}}
+ result = {'value':{'number': None}}
+ result.update({'warning': {'title': _('Error !'), 'message': _('You must be create a checkbook or change state')}})
+ return result
+
+ if res.state != 'active':
+ result = {'value':{'checkbook_id': 0}}
+ result.update({'warning': {'title': _('Error !'), 'message': _('The Checkbook is not active')}})
+ else:
+ result = {'value':{'number': str(res.actual_number)}}
+
+ return result
+
+
+
+account_issued_check()
=== added file 'l10n_ar_account_checkbook/check_duo_view.xml'
--- l10n_ar_account_checkbook/check_duo_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/check_duo_view.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_check_duo_form" model="ir.ui.view">
+ <field name="name">check.duo.form</field>
+ <field name="model">account.issued.check</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="account_check_duo.view_account_issued_check_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="/form/field[@name='account_bank_id']" position="replace">
+ <field name="checkbook_id" on_change="onchange_checkbook_id(number,checkbook_id)" domain="[('state','=','active')]"/>
+ </xpath>
+ </field>
+ </record>
+
+ </data>
+</openerp>
=== added directory 'l10n_ar_account_checkbook/i18n'
=== added file 'l10n_ar_account_checkbook/i18n/en_AR.mo'
Binary files l10n_ar_account_checkbook/i18n/en_AR.mo 1970-01-01 00:00:00 +0000 and l10n_ar_account_checkbook/i18n/en_AR.mo 2012-11-02 15:08:21 +0000 differ
=== added file 'l10n_ar_account_checkbook/i18n/en_AR.po'
--- l10n_ar_account_checkbook/i18n/en_AR.po 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/i18n/en_AR.po 2012-11-02 15:08:21 +0000
@@ -0,0 +1,160 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * account_checkbook
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 6.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-10-31 00:36+0000\n"
+"PO-Revision-Date: 2012-10-31 09:38-0300\n"
+"Last-Translator: s <poyo.ar@xxxxxxxxx>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: \n"
+
+#. module: account_checkbook
+#: view:account.checkbook:0
+#: selection:account.checkbook,state:0
+msgid "In Use"
+msgstr "En Uso"
+
+#. module: account_checkbook
+#: field:account.issued.check,checkbook_id:0
+msgid "Checkbook"
+msgstr "Chequeras"
+
+#. module: account_checkbook
+#: model:ir.model,name:account_checkbook.model_account_checkbook
+msgid "Manage Checkbook"
+msgstr "Manage Checkbook"
+
+#. module: account_checkbook
+#: field:account.checkbook,range_hasta:0
+msgid "Check Number Hasta"
+msgstr "Rango Hasta"
+
+#. module: account_checkbook
+#: field:account.checkbook,range_desde:0
+msgid "Check Number Desde"
+msgstr "Rango Desde"
+
+#. module: account_checkbook
+#: field:account.checkbook,state:0
+msgid "State"
+msgstr "Estado"
+
+#. module: account_checkbook
+#: selection:account.checkbook,state:0
+msgid "Draft"
+msgstr "Borrador"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/check_duo.py:50
+#, python-format
+msgid "The Check must be create on one payment !"
+msgstr "El Cheque debe ser creado desde un pago!"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/account_checkbook.py:79
+#, python-format
+msgid "Range hasta must be greater than range desde"
+msgstr "El Rango Hasta debe ser mayor que Rango Desde"
+
+#. module: account_checkbook
+#: view:account.checkbook:0
+#: selection:account.checkbook,state:0
+msgid "Used"
+msgstr "Usado"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/account_checkbook.py:58
+#: code:addons/account_checkbook/account_checkbook.py:67
+#: code:addons/account_checkbook/account_checkbook.py:79
+#: code:addons/account_checkbook/account_checkbook.py:93
+#: code:addons/account_checkbook/check_duo.py:50
+#: code:addons/account_checkbook/check_duo.py:85
+#: code:addons/account_checkbook/check_duo.py:90
+#, python-format
+msgid "Error !"
+msgstr "Error !"
+
+#. module: account_checkbook
+#: view:account.checkbook:0
+msgid "Ranges"
+msgstr "Rangos"
+
+#. module: account_checkbook
+#: field:account.checkbook,user_id:0
+msgid "User"
+msgstr "Usuario"
+
+#. module: account_checkbook
+#: field:account.checkbook,account_bank_id:0
+msgid "Account Bank"
+msgstr "Cuenta Bancaria"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/check_duo.py:90
+#, python-format
+msgid "The Checkbook is not active"
+msgstr "La Chequera no está en uso!"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/account_checkbook.py:67
+#, python-format
+msgid "Ckeck range desde must be 8 numbers !"
+msgstr "El campo rango desde debe tener 8 dígitos !"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/account_checkbook.py:93
+#, python-format
+msgid "You cant change the checkbook´s state, there is one active !"
+msgstr "No se puede modificar el estado de la chequera, existe una chequera en uso asociada a esa cuenta bancaria!"
+
+#. module: account_checkbook
+#: field:account.checkbook,name:0
+msgid "CheckBook Name"
+msgstr "Nombre Chequera"
+
+#. module: account_checkbook
+#: model:ir.model,name:account_checkbook.model_account_issued_check
+msgid "Manage Checks Issued"
+msgstr "Manage Checks Issued"
+
+#. module: account_checkbook
+#: view:account.checkbook:0
+#: model:ir.actions.act_window,name:account_checkbook.action_account_checkbook_form
+#: model:ir.ui.menu,name:account_checkbook.menu_action_account_checkbook_form
+msgid "Checkbooks"
+msgstr "Chequeras"
+
+#. module: account_checkbook
+#: field:account.checkbook,change_date:0
+msgid "Change Date"
+msgstr "Fecha cambio"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/account_checkbook.py:58
+#, python-format
+msgid "You can drop the checkbook(s) only in draft state !"
+msgstr "Solo se puede eliminar la(s) chequera(s) en estado borrador!"
+
+#. module: account_checkbook
+#: code:addons/account_checkbook/check_duo.py:85
+#, python-format
+msgid "You must be create a checkbook or change state"
+msgstr "Deberá crear una nueva Chequera ó cambiarle de estado!"
+
+#. module: account_checkbook
+#: field:account.checkbook,actual_number:0
+msgid "Next Check Number"
+msgstr "Próximo número"
+
+#. module: account_checkbook
+#: sql_constraint:account.issued.check:0
+msgid "The number must be unique!"
+msgstr "El número debe ser único!"
+
=== added file 'l10n_ar_account_checkbook/workflow_checkbook.xml'
--- l10n_ar_account_checkbook/workflow_checkbook.xml 1970-01-01 00:00:00 +0000
+++ l10n_ar_account_checkbook/workflow_checkbook.xml 2012-11-02 15:08:21 +0000
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+
+ <record id="account_checkbook" model="workflow">
+ <field name="name">Account Checkbook</field>
+ <field name="osv">account.checkbook</field>
+ <field name="on_create">True</field>
+ </record>
+
+ <!-- Activities -->
+
+ <record id="act_draft" model="workflow.activity">
+ <field name="wkf_id" ref="account_checkbook"/>
+ <field name="flow_start">True</field>
+ <field name="name">draft</field>
+ </record>
+
+ <record id="act_active" model="workflow.activity">
+ <field name="wkf_id" ref="account_checkbook"/>
+ <field name="name">active</field>
+ <field name="kind">function</field>
+ <field name="action">wkf_active()</field>
+ </record>
+
+ <record id="act_used" model="workflow.activity">
+ <field name="wkf_id" ref="account_checkbook"/>
+ <field name="name">used</field>
+ <field name="kind">function</field>
+ <field name="flow_stop">True</field>
+ <field name="action">wkf_used()</field>
+ </record>
+
+ <!-- Transition -->
+
+ <record id="trans_draft_active" model="workflow.transition">
+ <field name="act_from" ref="act_draft"/>
+ <field name="act_to" ref="act_active"/>
+ <field name="signal">wkf_active</field>
+ </record>
+
+ <record id="trans_active_used" model="workflow.transition">
+ <field name="act_from" ref="act_active"/>
+ <field name="act_to" ref="act_used"/>
+ <field name="signal">wkf_used</field>
+ </record>
+
+ </data>
+</openerp>
Follow ups