I don't think that current patch addresses the issue. I would rather remove on
saving the prefix, if there is no vat_country (like is done for correction of
prefix contained in vat_country).
With this patch:
Traceback (most recent call last):
File "/trytond/protocols/netrpc.py", line 47, in run
res = dispatch(host, port, 'NetRPC', *msg)
File "/trytond/protocols/dispatcher.py", line 126, in dispatch
res = getattr(obj, method)(cursor, user, *args, **kargs)
File "/trytond/modules/party/party.py", line 141, in write
return super(Party, self).write(cursor, user, ids, vals, context=context)
File "/trytond/model/modelsql.py", line 965, in write
self._validate(cursor, user, ids, context=context)
File "/trytond/model/modelsql.py", line 2199, in _validate
super(ModelSQL, self)._validate(cursor, user, ids, context=context)
File "/trytond/model/modelstorage.py", line 949, in _validate
if not getattr(self, field[0])(cursor, user, ids):
File "/trytond/modules/party/party.py", line 213, in check_vat
party.vat_country.lower())(vat_number):
File "/vatnumber.py", line 92, in check_vat_bg
if len(vat) == 9:
TypeError: object of type 'NoneType' has no len()
On 2010/04/01 09:19:15, yangoon wrote:
> I don't think that current patch addresses the issue. I would rather remove on
> saving the prefix, if there is no vat_country (like is done for correction of
> prefix contained in vat_country).
>
> With this patch:
> Traceback (most recent call last):
> File "/trytond/protocols/netrpc.py", line 47, in run
> res = dispatch(host, port, 'NetRPC', *msg)
> File "/trytond/protocols/dispatcher.py", line 126, in dispatch
> res = getattr(obj, method)(cursor, user, *args, **kargs)
> File "/trytond/modules/party/party.py", line 141, in write
> return super(Party, self).write(cursor, user, ids, vals, context=context)
> File "/trytond/model/modelsql.py", line 965, in write
> self._validate(cursor, user, ids, context=context)
> File "/trytond/model/modelsql.py", line 2199, in _validate
> super(ModelSQL, self)._validate(cursor, user, ids, context=context)
> File "/trytond/model/modelstorage.py", line 949, in _validate
> if not getattr(self, field[0])(cursor, user, ids):
> File "/trytond/modules/party/party.py", line 213, in check_vat
> party.vat_country.lower())(vat_number):
> File "/vatnumber.py", line 92, in check_vat_bg
> if len(vat) == 9:
> TypeError: object of type 'NoneType' has no len()
Should be fixed with Set 2
On 2010/04/01 09:19:15, yangoon wrote:
> I don't think that current patch addresses the issue. I would rather remove on
> saving the prefix, if there is no vat_country (like is done for correction of
> prefix contained in vat_country).
>
> With this patch:
> Traceback (most recent call last):
> File "/trytond/protocols/netrpc.py", line 47, in run
> res = dispatch(host, port, 'NetRPC', *msg)
> File "/trytond/protocols/dispatcher.py", line 126, in dispatch
> res = getattr(obj, method)(cursor, user, *args, **kargs)
> File "/trytond/modules/party/party.py", line 141, in write
> return super(Party, self).write(cursor, user, ids, vals, context=context)
> File "/trytond/model/modelsql.py", line 965, in write
> self._validate(cursor, user, ids, context=context)
> File "/trytond/model/modelsql.py", line 2199, in _validate
> super(ModelSQL, self)._validate(cursor, user, ids, context=context)
> File "/trytond/model/modelstorage.py", line 949, in _validate
> if not getattr(self, field[0])(cursor, user, ids):
> File "/trytond/modules/party/party.py", line 213, in check_vat
> party.vat_country.lower())(vat_number):
> File "/vatnumber.py", line 92, in check_vat_bg
> if len(vat) == 9:
> TypeError: object of type 'NoneType' has no len()
ok, this was first version of the patch
Issue 850043: Test empty vat_number if vat_country is set for issue1468
(Closed)
Created 16 years ago by ced
Modified 16 years ago
Reviewers: yangoon1
Base URL:
Comments: 0