summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Wirtel <stw@openerp.com>2012-02-06 14:57:24 +0100
committerStephane Wirtel <stw@openerp.com>2012-02-06 14:57:24 +0100
commit0c3f58cb87b28c5c5cc4ec8c545eb0c8377ec610 (patch)
tree61caad9c470d29b57399ecbe22f2a7247f445ce1
parent433b98f8321c491f0337c37f4aadcbce05e35afe (diff)
[FIX] account: invoice: add the journal and type in the constraints more flexible
bzr revid: stw@openerp.com-20120206135724-e013l6jwwnf4b17q
-rw-r--r--addons/account/account_invoice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index f2e3e35e047..8f7c0fd65b5 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -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):