From 040a9e861e2ac0236af7451c712b6d499a94e42c Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Sat, 14 Aug 2010 02:42:34 +0530 Subject: [PATCH] [IMP]: add audit fieild to voucher, to convert workflow audit functionality to field, to make workflow simple bzr revid: mga@tinyerp.com-20100813211234-sr5w1jebaw6rceon --- addons/account_voucher/voucher.py | 4 +++- addons/account_voucher/voucher_view.xml | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 644d0b70148..3bf9453b453 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -136,7 +136,8 @@ class account_voucher(osv.osv): 'move_id':fields.many2one('account.move', 'Account Entry'), 'move_ids': fields.related('move_id','line_id', type='many2many', relation='account.move.line', string='Real Entry'), #'move_ids':fields.many2many('account.move.line', 'voucher_id', 'account_id', 'rel_account_move', 'Real Entry', readonly=True, states={'draft':[('readonly',False)]}), - 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}) + 'partner_id':fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}), + 'audit':fields.boolean('Audit Complete ?', required=False), } _defaults = { @@ -147,6 +148,7 @@ class account_voucher(osv.osv): 'state': lambda *a: 'draft', 'date' : lambda *a: time.strftime('%Y-%m-%d'), 'reference_type': lambda *a: "none", + 'audit': lambda *a: False, 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.voucher',context=c), } diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index f5978970cc6..780d20d3ebb 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -59,8 +59,11 @@ - - + + + + +