From 1058ae9c8b3cf4b189fb30d72415dd88a1d8801c Mon Sep 17 00:00:00 2001 From: "ARA (OpenERP)" Date: Tue, 11 Jan 2011 10:49:52 +0530 Subject: [PATCH] [REF]account:Add constraint on account.account and account.account.template for type bzr revid: ara@tinyerp.com-20110111051952-8fscm1f9ia1mq2gh --- addons/account/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 3be44fd8edf..f5c9392723d 100755 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -428,7 +428,7 @@ class account_account(osv.osv): _constraints = [ (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']), - (_check_type, 'Internal type of parent account must be view.', ['parent_id']), + (_check_type, 'You cannot create a account! \nMake sure if the account has children it should be type "View"! ', ['parent_id']), ] _sql_constraints = [ ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') @@ -2313,7 +2313,7 @@ class account_account_template(osv.osv): _check_recursion = check_cycle _constraints = [ (_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id']), - (_check_type, 'Internal type of parent account template must be view.', ['parent_id']), + (_check_type, 'You cannot create a account template! \nMake sure if the account template has children it should be type "View"! ', ['parent_id']), ]