*bugfixed

bzr revid: qdp@tinyerp.com-20080923132807-4gnt09yhvi7opnb2
This commit is contained in:
qdp 2008-09-23 15:28:07 +02:00
parent ac351807de
commit 004e883f9f
1 changed files with 3 additions and 1 deletions

View File

@ -142,10 +142,12 @@ class account_invoice_line(osv.osv):
'sequence': fields.integer('Sequence Number'),
'functional_field': fields.function(_fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type='char', fnct_search=None, obj=None, method=True, store=False, string="Source Account"),
}
def _default_account(self, cr, uid, context=None):
cr.execute("select id from account_account where code = 0 LIMIT 1")
cr.execute("select id from account_account where parent_id IS NULL LIMIT 1")
res=cr.fetchone()
return res[0]
_defaults = {
'state': lambda *a: 'article',
# 'account_id': _default_account