From 4e866232b257ad24a94feb8347265a5035cc013c Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 26 May 2010 23:30:17 +0530 Subject: [PATCH] [IMP]: improve account voucher by migrating account_vouche_workflow bzr revid: mga@tinyerp.com-20100526180017-qg4aoukc7nljab9f --- addons/account_voucher/__openerp__.py | 6 ++++- addons/account_voucher/voucher.py | 24 ++++++++++++------ addons/account_voucher/voucher_view.xml | 13 +++++----- addons/account_voucher/voucher_wizard.xml | 31 +++++++++++------------ 4 files changed, 43 insertions(+), 31 deletions(-) diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 14265e3403a..57d2ce1ab96 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -36,7 +36,10 @@ """, "category" : "Generic Modules/Accounting", "website" : "http://tinyerp.com", - "depends" : ["base", "account"], + "depends" : [ + "base", + "account" + ], "init_xml" : [ ], @@ -50,6 +53,7 @@ "voucher_view.xml", "voucher_wizard.xml", "wizard/account_voucher_open_view.xml", + "account_voucher_workflow.xml" ], 'certificate': '0037580727101', "active": False, diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 140442aa02e..cc10dde8294 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -36,6 +36,13 @@ class ir_sequence_type(osv.osv): } ir_sequence_type() +class account_journal(osv.osv): + _inherit = "account.journal" + _columns = { + 'max_amount': fields.float('Verify Transection Above', digits=(16, int(config['price_accuracy']))), + } +account_journal() + class account_voucher(osv.osv): def _get_period(self, cr, uid, context): periods = self.pool.get('account.period').find(cr, uid) @@ -110,16 +117,17 @@ class account_voucher(osv.osv): 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True), 'state':fields.selection( - [('draft','Draft'), - ('proforma','Pro-forma'), - ('posted','Posted'), - ('cancel','Cancel') - ], 'State', - readonly=True, - help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \ + [('draft','Draft'), + ('proforma','Pro-forma'), + ('posted','Posted'), + ('recheck','Waiting for Re-checking'), + ('cancel','Cancel'), + ('audit','Audit Complete') + ], 'State', readonly=True, size=32, + help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \ \n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \ \n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \ - \n* The \'Cancelled\' state is used when user cancel voucher.'), + \n* The \'Cancelled\' state is used when user cancel voucher.'), 'amount':fields.float('Amount', readonly=True), 'number':fields.char('Number', size=32, readonly=True), 'reference': fields.char('Voucher Reference', size=64), diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 956d9e533a0..5105844d899 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -37,7 +37,7 @@ - + @@ -49,13 +49,14 @@ - + -