[IMP]on create of sale receipt add first sale account and display lable of bank name and number in customer accounting tab

bzr revid: sgo@tinyerp.com-20120911133015-24z0gr1mnwzk6fwh
This commit is contained in:
Sanjay Gohel (Open ERP) 2012-09-11 19:00:15 +05:30
parent 4ed16276ee
commit 54eac9c851
2 changed files with 10 additions and 2 deletions

View File

@ -93,8 +93,10 @@
</group>
<field name="bank_ids">
<form string="Bank account" version="7.0">
<field name="state"/>
<field name="acc_number"/>
<group>
<field name="state" class="oe_inline"/>
<field name="acc_number" class="oe_inline"/>
</group>
<group>
<group name="owner" string="Bank Account Owner">
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>

View File

@ -1373,8 +1373,14 @@ class account_voucher_line(osv.osv):
'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),
}
def _default_account_id(self, cr, uid, ids, context=None):
prop = self.pool.get('ir.property').get(cr, uid, 'property_account_income_categ', 'product.category', context=context)
return prop and prop.id or False
_defaults = {
'name': '',
'account_id':_default_account_id
}
def onchange_reconcile(self, cr, uid, ids, reconcile, amount, amount_unreconciled, context=None):