479
484
partner = self.pool.get('res.partner').browse(cr, uid, [partner_id])
480
485
if partner and partner[0] and not partner[0].active:
481
486
raise osv.except_osv(_('Warning'), _("Partner '%s' is not active.") % (partner[0] and partner[0].name or '',))
482
488
return super(account_invoice, self).create(cr, uid, vals, context)
484
490
def write(self, cr, uid, ids, vals, context=None):