[IMP]: account: Added icons on wizard buttons
bzr revid: rpa@openerp.co.in-20100302101728-03qbgh5xy7c8ti61
This commit is contained in:
committed by
rpa (Open ERP)
parent
194bcd8ab8
commit
3394daefc5
@@ -16,9 +16,10 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button string="Open Charts" name="_account_chart_open_window" type="object"/>
|
||||
</group>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="gtk-open" string="Open Charts"
|
||||
name="_account_chart_open_window" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -35,6 +36,5 @@
|
||||
<menuitem icon="STOCK_INDENT" action="action_account_chart"
|
||||
id="menu_action_account_tree2"
|
||||
parent="account.menu_finance_charts" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button string="Close states" name="_data_save" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-close" string="Close states" name="_data_save" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button string="Refund Invoice" name="_invoice_refund" type="object"/>
|
||||
<button string="Cancel Invoice" name="_invoice_cancel" type="object"/>
|
||||
<button string="Modify Invoice" name="_invoice_modify" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-redo" string="Refund Invoice" name="_invoice_refund" type="object"/>
|
||||
<button icon="gtk-ok" string="Cancel Invoice" name="_invoice_cancel" type="object"/>
|
||||
<button icon="gtk-undo" string="Modify Invoice" name="_invoice_modify" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button string="Open for bank reconciliation" name="_action_open_window" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-open" string="Open for bank reconciliation" name="_action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button string="Open Journal" name="_action_open_window" type="object"/>
|
||||
<button icon="gtk-open" string="Open Journal" name="_action_open_window" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -13,8 +13,10 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button string="Open for reconciliation" name="_action_open_window" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="gtk-open"
|
||||
string="Open for reconciliation" name="_action_open_window"
|
||||
type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel"/>
|
||||
<button string="Close Period" name="_data_save" type="object"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-close" string="Close Period" name="_data_save" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import wizard
|
||||
import netsvc
|
||||
import time
|
||||
import osv
|
||||
import pooler
|
||||
from datetime import datetime
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
import osv
|
||||
import pooler
|
||||
import time
|
||||
import wizard
|
||||
|
||||
_transaction_form = '''<?xml version="1.0"?>
|
||||
<form string="Reconciliation">
|
||||
@@ -39,10 +39,10 @@ _transaction_form = '''<?xml version="1.0"?>
|
||||
</form>'''
|
||||
|
||||
_transaction_fields = {
|
||||
'trans_nbr': {'string':'# of Transaction', 'type':'integer', 'readonly':True},
|
||||
'credit': {'string':'Credit amount', 'type':'float', 'readonly':True},
|
||||
'debit': {'string':'Debit amount', 'type':'float', 'readonly':True},
|
||||
'writeoff': {'string':'Write-Off amount', 'type':'float', 'readonly':True},
|
||||
'trans_nbr': {'string':'# of Transaction', 'type':'integer', 'readonly':True},
|
||||
'credit': {'string':'Credit amount', 'type':'float', 'readonly':True},
|
||||
'debit': {'string':'Debit amount', 'type':'float', 'readonly':True},
|
||||
'writeoff': {'string':'Write-Off amount', 'type':'float', 'readonly':True},
|
||||
}
|
||||
|
||||
def _trans_rec_get(self, cr, uid, data, context=None):
|
||||
@@ -83,12 +83,12 @@ def _trans_rec_reconcile(self, cr, uid, data, context=None):
|
||||
journal_id = form.get('journal_id', False)
|
||||
context['comment'] = form.get('comment', False)
|
||||
context['analytic_id'] = form.get('analytic_id', False)
|
||||
account_move_line_obj.reconcile(cr, uid, data['ids'], 'manual', account_id,
|
||||
account_move_line_obj.reconcile(cr, uid, data['ids'], 'manual', account_id,
|
||||
period_id, journal_id, context=context)
|
||||
return {}
|
||||
|
||||
def _partial_check(self, cr, uid, data, context):
|
||||
if _trans_rec_get(self,cr,uid, data, context)['writeoff'] == 0:
|
||||
if _trans_rec_get(self, cr, uid, data, context)['writeoff'] == 0:
|
||||
return 'init_full'
|
||||
return 'init_partial'
|
||||
|
||||
@@ -104,11 +104,11 @@ _transaction_add_form = '''<?xml version="1.0"?>
|
||||
</form>'''
|
||||
|
||||
_transaction_add_fields = {
|
||||
'journal_id': {'string': 'Write-Off Journal', 'type': 'many2one', 'relation':'account.journal', 'required':True},
|
||||
'writeoff_acc_id': {'string':'Write-Off account', 'type':'many2one', 'relation':'account.account', 'required':True},
|
||||
'date_p': {'string':'Date','type':'date'},
|
||||
'comment': {'string':'Comment','type':'char', 'size': 64, 'required':True},
|
||||
'analytic_id': {'string':'Analytic Account', 'type': 'many2one', 'relation':'account.analytic.account'},
|
||||
'journal_id': {'string': 'Write-Off Journal', 'type': 'many2one', 'relation':'account.journal', 'required':True},
|
||||
'writeoff_acc_id': {'string':'Write-Off account', 'type':'many2one', 'relation':'account.account', 'required':True},
|
||||
'date_p': {'string':'Date', 'type':'date'},
|
||||
'comment': {'string':'Comment', 'type':'char', 'size': 64, 'required':True},
|
||||
'analytic_id': {'string':'Analytic Account', 'type': 'many2one', 'relation':'account.analytic.account'},
|
||||
}
|
||||
|
||||
def _trans_rec_addendum(self, cr, uid, data, context={}):
|
||||
@@ -119,27 +119,27 @@ def _trans_rec_addendum(self, cr, uid, data, context={}):
|
||||
class wiz_reconcile(wizard.interface):
|
||||
states = {
|
||||
'init': {
|
||||
'actions': [],
|
||||
'actions': [],
|
||||
'result': {'type': 'choice', 'next_state': _partial_check}
|
||||
},
|
||||
},
|
||||
'init_full': {
|
||||
'actions': [_trans_rec_get],
|
||||
'result': {'type': 'form', 'arch':_transaction_form, 'fields':_transaction_fields, 'state':[('end','Cancel'),('reconcile','Reconcile')]}
|
||||
},
|
||||
'actions': [_trans_rec_get],
|
||||
'result': {'type': 'form', 'arch':_transaction_form, 'fields':_transaction_fields, 'state':[('end', 'Cancel'), ('reconcile', 'Reconcile')]}
|
||||
},
|
||||
'init_partial': {
|
||||
'actions': [_trans_rec_get],
|
||||
'result': {'type': 'form', 'arch':_transaction_form, 'fields':_transaction_fields, 'state':[('end','Cancel'),('addendum','Reconcile With Write-Off'),('partial','Partial Reconcile')]}
|
||||
},
|
||||
'actions': [_trans_rec_get],
|
||||
'result': {'type': 'form', 'arch':_transaction_form, 'fields':_transaction_fields, 'state':[('end', 'Cancel'), ('addendum', 'Reconcile With Write-Off'), ('partial', 'Partial Reconcile')]}
|
||||
},
|
||||
'addendum': {
|
||||
'actions': [_trans_rec_addendum],
|
||||
'result': {'type': 'form', 'arch':_transaction_add_form, 'fields':_transaction_add_fields, 'state':[('end','Cancel'),('reconcile','Reconcile')]}
|
||||
},
|
||||
'actions': [_trans_rec_addendum],
|
||||
'result': {'type': 'form', 'arch':_transaction_add_form, 'fields':_transaction_add_fields, 'state':[('end', 'Cancel'), ('reconcile', 'Reconcile')]}
|
||||
},
|
||||
'reconcile': {
|
||||
'actions': [_trans_rec_reconcile],
|
||||
'actions': [_trans_rec_reconcile],
|
||||
'result': {'type': 'state', 'state':'end'}
|
||||
},
|
||||
},
|
||||
'partial': {
|
||||
'actions': [_trans_rec_reconcile_partial],
|
||||
'actions': [_trans_rec_reconcile_partial],
|
||||
'result': {'type': 'state', 'state':'end'}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user