c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #25384
[Bug 790245] [NEW] (account_voucher) Same name account is already present, Annoying Error
Public bug reported:
This Exception is annoying, It was deleted in version 6, but still
remain in version5,
When account_voucher is installed you are not allowed to make editions
to an account without at least changing a letter to the name of the
account, not doing so will raise the forementioned exception,
please, could someone, of the committers, validated this bug and take
into account the suggestion of deleting this piece of code to avoid
that,
Thanks a lot,
121 def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
122
res_temp={}
123
if vals.has_key('name'):
124
if not vals.has_key('company_id'):
125
vals['company_id']=self.browse(cr,uid,ids)[0].company_id.id
126
name=self.search(cr,uid,[('name','ilike',vals['name']),('company_id','=',vals['company_id'])])
127
if name:
128
raise osv.except_osv('Error', 'Same Account Name is Already present !')
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/790245
Title:
(account_voucher) Same name account is already present, Annoying Error
Status in OpenERP Modules (addons):
New
Bug description:
This Exception is annoying, It was deleted in version 6, but still
remain in version5,
When account_voucher is installed you are not allowed to make editions
to an account without at least changing a letter to the name of the
account, not doing so will raise the forementioned exception,
please, could someone, of the committers, validated this bug and take
into account the suggestion of deleting this piece of code to avoid
that,
Thanks a lot,
121 def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
122
res_temp={}
123
if vals.has_key('name'):
124
if not vals.has_key('company_id'):
125
vals['company_id']=self.browse(cr,uid,ids)[0].company_id.id
126
name=self.search(cr,uid,[('name','ilike',vals['name']),('company_id','=',vals['company_id'])])
127
if name:
128
raise osv.except_osv('Error', 'Same Account Name is Already present !')
Follow ups
References