# Adding more company identifiers

**URL:** https://discuss.tryton.org/t/adding-more-company-identifiers/659
**Category:** User
**Tags:** party
**Created:** [August 16, 2018, 7:38pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659 "2018-08-16T19:38:48Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![noosanon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/noosanon/32/213_2.png) [@noosanon](https://discuss.tryton.org/u/noosanon)
#### Post date: [August 16, 2018, 7:38pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/1 "2018-08-16T19:38:48Z")

</div>

Hey guys,  
I’m new to the community and Tryton, so I need a little help on how to add more types of identifiers in companies.  
The problem is that, I’m Angolan and the VAT numbers in here do not pass on Check VIES when I try to add a VAT identifier. So I thought of adding a new identifier so I can add our VAT number but I cannot find the place to add a new identifier.  
Can someone please help me with this.

Thank you so much for everything

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [August 16, 2018, 8:46pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/2 "2018-08-16T20:46:56Z")

</div>

Hi and welcome to the community,  
you should create a new module and extend the type field of party identifier. It should look something like this:

```
class PartyIdentifier:
    __name__ = 'party.identifier'
    __metaclass__ = PoolMeta
    
    @classmethod
    def __setup__ (cls):
        super(PartyIdentifier, cls). __setup__ ()
        cls.type.selection.append(('ao_vat', 'Angolan VAT'))

```

---

<div class="post-metadata">

### Author: ![noosanon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/noosanon/32/213_2.png) [@noosanon](https://discuss.tryton.org/u/noosanon)
#### Post date: [August 17, 2018, 9:29am UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/3 "2018-08-17T09:29:45Z")

</div>

Hey albert,  
Thanks for your fast reply, I will try to add a new module as you explained and see ;)…  
Is there another way of doing this? I was thinking that I could just deactivate the Check VIES wizard, and if some day I need it I could just activate it again. I’ve tried to deactivate it and it does not work, tryton still does the check and I couldn’t add the VAT identifier.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2018, 9:40am UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/4 "2018-08-17T09:40:43Z")

</div>

I think your issue is not with the check of the wizard but with the validation of the identifier itself. If the type is ‘eu\_vat’, it validate the checksum of the number for European VAT. If you set the type to empty, there will be no validation.

> [@noosanon](#):
>
> Thanks for your fast reply, I will try to add a new module as you explained and see ;)…

Indeed the validation is based on python-stdnum and there was an idea to provide all the types from the libraries by default. This would prevent to have to create new module as this library has almost all the existing VAT number.

---

<div class="post-metadata">

### Author: ![noosanon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/noosanon/32/213_2.png) [@noosanon](https://discuss.tryton.org/u/noosanon)
#### Post date: [August 17, 2018, 9:52am UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/5 "2018-08-17T09:52:47Z")

</div>

> [@ced](#):
>
> I think your issue is not with the check of the wizard but with the validation of the identifier itself. If the type is ‘eu\_vat’, it validate the checksum of the number for European VAT. If you set the type to empty, there will be no validation.
> 
> ![](https://discuss.tryton.org/letter_avatar_proxy/v2/letter/n/e495f1/40.png) noosanon:

Yeah, when I set the type to empty, and save the VAT number there is no validation but the VAT number does not appear in the invoices or any other documents that I want the VAT number to appear.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2018, 12:49pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/6 "2018-08-17T12:49:02Z")

</div>

> [@noosanon](#):
>
> the VAT number does not appear in the invoices or any other documents that I want the VAT number to appear.

Indeed the invoice allows only the type returned by Ìnvoice.\_tax\_identifier\_types`. So until we have a generic solution to include all type from pyton-stdnum, you must add your own type.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [August 17, 2018, 3:40pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/7 "2018-08-17T15:40:02Z")

</div>

> [@ced](#):
>
> Indeed the invoice allows only the type returned by Ìnvoice.\_tax\_identifier\_types`. So until we have a generic solution to include all type from pyton-stdnum, you must add your own type.

Won’t be better to include all the types in the party module so they are available for everyone?

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2018, 3:48pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/8 "2018-08-17T15:48:27Z")

</div>

> [@pokoli](#):
>
> Won’t be better to include all the types in the party module so they are available for everyone?

Not all type of identifiers are valid as tax identifier.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [August 17, 2018, 4:05pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/9 "2018-08-17T16:05:46Z")

</div>

> [@ced](#):
>
> > Won’t be better to include all the types in the party module so they are available for everyone?
> 
> Not all type of identifiers are valid as tax identifier.

Yes I know, but for now we had requests for Australian VAT and for Angolan VAT. So I’m wondering if it’s not better to include both identifiers instead of waiting for including all.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [August 17, 2018, 5:13pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/10 "2018-08-17T17:13:44Z")

</div>

> [@pokoli](#):
>
> So I’m wondering if it’s not better to include both identifiers instead of waiting for including all.

I think we should have this configurable by the user. So we would need the list of all available in python-stdnum and define which one are used in identifier and which one are used for tax.

---

<div class="post-metadata">

### Author: ![noosanon](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/noosanon/32/213_2.png) [@noosanon](https://discuss.tryton.org/u/noosanon)
#### Post date: [August 17, 2018, 5:49pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/11 "2018-08-17T17:49:45Z")

</div>

Thank you so much guys.  
I got it to work. After creating a new module called party\_ao\_identifier, I could install it on the tryton server and then activate the module in the tryton client.  
Now I have the option of choosing the Angolan identifier, which it’s called NIF, as it is called as well in Portugal and other European countries.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [August 18, 2018, 5:49am UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/12 "2018-08-18T05:49:57Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [March 15, 2020, 7:06pm UTC](https://discuss.tryton.org/t/adding-more-company-identifiers/659/13 "2020-03-15T19:06:13Z")

</div>

> [@noosanon](#):
>
> After creating a new module called party\_ao\_identifier

Is the module available somewhere? One ours customers had request us to add angolan identifiers on tryton.
