diff options
| author | Mantavya Gajjar <mga@tinyerp.com> | 2010-07-14 11:21:50 +0530 |
|---|---|---|
| committer | Mantavya Gajjar <mga@tinyerp.com> | 2010-07-14 11:21:50 +0530 |
| commit | cc9cc1b9233ce0c5b335d6d0f6734b2bde5dde8a (patch) | |
| tree | 773f487ada56d97ae6f2d327f4953469ac79d40f | |
| parent | c3bf1349b2c20aad996259e8ed01681873882140 (diff) | |
[FIX/IMP]: fix and improve the accounting entries through voucher
bzr revid: mga@tinyerp.com-20100714055150-6134qxfy7jwg1zza
| -rw-r--r-- | addons/account/account_invoice_view.xml | 2 | ||||
| -rw-r--r-- | addons/account_voucher/voucher.py | 12 | ||||
| -rw-r--r-- | addons/account_voucher/voucher_view.xml | 19 | ||||
| -rwxr-xr-x | addons/account_voucher_payment/account_voucher_payment.py | 3 |
4 files changed, 22 insertions, 14 deletions
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 99d1181fb7b..7c8f64ff659 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -147,7 +147,7 @@ <field name="number" readonly="1"/> <field name="type" invisible="1"/> <field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/> - <button name="%(action_account_change_currency)d" type="action" icon="gtk-apply" string="Change"/> + <button name="%(action_account_change_currency)d" type="action" icon="terp-stock_effects-object-colorize" string="Change"/> <newline/> <field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank,company_id)" context="{'default_customer': 0}"/> <field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/> diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index 47ff58a3226..fa0ecf07786 100644 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -116,10 +116,10 @@ class account_voucher(osv.osv): ('journal_pur_voucher','Journal Purchase'), ('journal_voucher','Journal Voucher'), ],'Entry Type', select=True , size=128, readonly=True, states={'draft':[('readonly',False)]}), - 'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}), + 'date':fields.date('Date', readonly=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"), 'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}), 'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}, domain=[('type','<>','view')]), - 'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'proforma':[('readonly',True)]}), + 'payment_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=False, states={'draft':[('readonly',True)]}), 'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'posted':[('readonly',True)]}), 'narration':fields.text('Narration', readonly=True, states={'draft':[('readonly',False)]}, required=False), 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}), @@ -137,9 +137,8 @@ class account_voucher(osv.osv): \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.'), 'amount':fields.float('Amount', readonly=True), - 'reference': fields.char('Voucher Reference', size=64), - 'reference_type': fields.selection(_get_reference_type, 'Reference Type', - required=True), + 'reference': fields.char('Reference', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Bank cheque number or payorder number"), + 'reference_type': fields.selection(_get_reference_type, 'Reference Type', required=True), 'number': fields.related('move_id', 'name', type="char", readonly=True, string='Number'), 'move_id':fields.many2one('account.move', 'Account Entry'), 'move_ids':fields.many2many('account.move.line', 'voucher_id', 'account_id', 'rel_account_move', 'Real Entry'), @@ -280,7 +279,8 @@ class account_voucher(osv.osv): 'journal_id': journal.id, 'type' : inv.type, 'narration' : inv.narration and inv.narration or inv.name, - 'date':inv.date + 'date':inv.date, + 'ref':inv.reference } if inv.period_id: diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 1a781c4cc34..cffa9baf683 100644 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -35,7 +35,7 @@ </group> <notebook colspan="4"> <page string="Journal Entries"> - <field name="payment_ids" colspan="4" nolabel="1" height="250"> + <field name="payment_ids" colspan="4" nolabel="1" height="200"> <tree string="Voucher Lines" editable="top"> <field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type, parent.currency_id)"/> <field name="account_id"/> @@ -46,14 +46,21 @@ <field name="ref"/> </tree> </field> - <separator string="Narration" colspan="4"/> - <field name="narration" colspan="4" nolabel="1" height="50"/> + <group col="2" colspan="3"> + <separator string="Narration" colspan="2"/> + <field name="narration" colspan="2" nolabel="1"/> + </group> + <group col="2" colspan="1"> + <separator string="Other Informtion" colspan="2"/> + <field name="reference" select="1"/> + <field name="date" select="1"/> + <field name="currency_id" select="1"/> + + </group> </page> - <page string="Other Info"> + <page string="Accounting Entries"> <field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/> - <field name="currency_id" select="1" /> <field name="period_id"/> - <field name="date" select="1"/> <separator string="General Entries" colspan="4"/> <field name="move_ids" colspan="4" nolabel="1" readonly="1"/> </page> diff --git a/addons/account_voucher_payment/account_voucher_payment.py b/addons/account_voucher_payment/account_voucher_payment.py index f2c6507181c..66ee2c75ce1 100755 --- a/addons/account_voucher_payment/account_voucher_payment.py +++ b/addons/account_voucher_payment/account_voucher_payment.py @@ -63,7 +63,8 @@ class account_voucher(osv.osv): 'journal_id': journal.id, 'type' : inv.type, 'narration' : inv.narration and inv.narration or inv.name, - 'date':inv.date + 'date':inv.date, + 'ref':inv.reference } if inv.period_id: |
