[FIX] account: invoice: add the journal and type in the constraints more flexible

bzr revid: stw@openerp.com-20120206135724-e013l6jwwnf4b17q
This commit is contained in:
Stephane Wirtel 2012-02-06 14:57:24 +01:00
parent 433b98f832
commit 0c3f58cb87
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ class account_invoice(osv.osv):
'user_id': lambda s, cr, u, c: u,
}
_sql_constraints = [
('number_uniq', 'unique(number, company_id)', 'Invoice Number must be unique per Company!'),
('number_uniq', 'unique(number, company_id, journal_id, type)', 'Invoice Number must be unique per Company!'),
]
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):