[IMP] account : Improved the code.
bzr revid: mdi@tinyerp.com-20120817055639-sc5c9awb2h8d59zl
This commit is contained in:
parent
811466be2f
commit
32201e2860
|
@ -1362,7 +1362,7 @@ class account_invoice_line(osv.osv):
|
|||
'partner_id': fields.related('invoice_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True)
|
||||
}
|
||||
|
||||
def default_account_id(self, cr, uid, ids, context=None):
|
||||
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
|
||||
|
||||
|
@ -1370,7 +1370,7 @@ class account_invoice_line(osv.osv):
|
|||
'quantity': 1,
|
||||
'discount': 0.0,
|
||||
'price_unit': _price_unit_default,
|
||||
'account_id': default_account_id,
|
||||
'account_id': _default_account_id,
|
||||
}
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
|
|
Loading…
Reference in New Issue