# Party/Country -\> automatically select tax rules?

**URL:** <https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198>\
**Category:** User\
**Created:** [May 11, 2021, 8:34pm UTC](https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198 "2021-05-11T20:34:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pocock](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pocock](https://discuss.tryton.org/u/pocock)\
**Post date:** [May 11, 2021, 8:34pm UTC](https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198/1 "2021-05-11T20:34:00Z")

</div>

I notice that it is necessary to set the tax rules for each party manually when creating the party.

Has anybody looked at linking default tax rules to the selected country?

For example, if I create a party and select any country that is outside the VAT zone, can Tryton automatically add the non-VAT tax rules for that party?

Some countries have tax-free zones, e.g. the [Samnaun valley in Switzerland](https://en.wikipedia.org/wiki/Samnaun#Geography). In this case, the correct tax rules can be applied using a combination of country+postcode.

---

<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:** [May 11, 2021, 8:51pm UTC](https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198/2 "2021-05-11T20:51:16Z")

</div>

> [@pocock](#):
>
> Has anybody looked at linking default tax rules to the selected country?
> 
> For example, if I create a party and select any country that is outside the VAT zone, can Tryton automatically add the non-VAT tax rules for that party?

There is the [account\_tax\_rule\_country](https://docs.tryton.org/projects/modules-account-tax-rule-country/en/latest/) module which is designed for your use case.

> [@pocock](#):
>
> In this case, the correct tax rules can be applied using a combination of country+postcode.

They module only accepts the subdivission as filter. Is that enough for your use case?

---

<div class="post-metadata">

**Author:** ![pocock](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/p/a88e57/32.png) [@pocock](https://discuss.tryton.org/u/pocock)\
**Post date:** [May 11, 2021, 9:08pm UTC](https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198/3 "2021-05-11T21:08:07Z")

</div>

For the [Samnaun valley in Switzerland](https://en.wikipedia.org/wiki/Samnaun#Geography), the subdivision is the Canton of Graubunden (Grisons in French).

Most of the Canton is not in the duty-free zone.

A specific post code is essential in this case.

There are similar cases in other countries too.

---

<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:** [May 12, 2021, 8:54am UTC](https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198/4 "2021-05-12T08:54:45Z")

</div>

Then the pattern should be extended, probably by [accepting a regular expression like the carrier\_subdivision](https://hg.tryton.org/modules/carrier_subdivision/file/f2c0835d6abc/carrier.py#l68) module does.

---

<div class="post-metadata">

**Author:** ![cman](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cman/32/1926_2.png) [@cman](https://discuss.tryton.org/u/cman)\
**Post date:** [October 21, 2022, 11:53am UTC](https://discuss.tryton.org/t/party-country-automatically-select-tax-rules/4198/5 "2022-10-21T11:53:54Z")

</div>

Added a proposal related to this discussion: [Add postal code to match account tax rule](https://discuss.tryton.org/t/add-postal-code-to-match-account-tax-rule/5631)
