[IMP]account: account bank statement - usability
bzr revid: ara@tinyerp.com-20110105061706-ac8ottk7uylvmafz
This commit is contained in:
parent
c54d6b1d7a
commit
dd88dc5dd5
|
@ -416,7 +416,7 @@ class account_bank_statement_line(osv.osv):
|
|||
type = 'supplier'
|
||||
if part.customer == True :
|
||||
type = 'customer'
|
||||
return type
|
||||
return {'value': {'type': type}}
|
||||
|
||||
def onchange_type(self, cr, uid, line_id, partner_id, type, context=None):
|
||||
res = {'value': {}}
|
||||
|
@ -428,7 +428,7 @@ class account_bank_statement_line(osv.osv):
|
|||
account_id = False
|
||||
line = self.browse(cr, uid, line_id, context=context)
|
||||
type=self.onchange_partner_id(cr, uid, partner_id=partner_id, type=type)
|
||||
res.update({'value': {'type':type}})
|
||||
res.update({'value': {'type':type['value']['type']}})
|
||||
if not line or (line and not line[0].account_id):
|
||||
part = obj_partner.browse(cr, uid, partner_id, context=context)
|
||||
if type == 'supplier':
|
||||
|
|
|
@ -574,12 +574,12 @@
|
|||
<form string="Statement lines">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_type(partner_id, type)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field name="amount"/>
|
||||
<field name="ref"/>
|
||||
<field name="sequence" readonly="0"/>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field colspan="4" name="note" nolabel="1"/>
|
||||
|
|
Loading…
Reference in New Issue