# Add subdivisions to match account tax rule

**URL:** <https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290>\
**Category:** Ideas\
**Tags:** accounting\
**Created:** [April 3, 2019, 7:47am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290 "2019-04-03T07:47:19Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![resteve](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/resteve/32/823_2.png) [@resteve](https://discuss.tryton.org/u/resteve)\
**Post date:** [April 3, 2019, 7:47am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/1 "2019-04-03T07:47:19Z")

</div>

## Rational

`account_tax_rule_country` adds from/to country to apply some account tax rule. In some countries there are rule against subdivisions to apply other taxes. For example, in Spain and Canaries Islands.

## Proposal

Four criteria fields:

- From Country: The country of origin
- To Country: The country of destination
- From Subdivision: The subdivision of origin
- To Subdivision: The subdivision of origin

## Implementation

> **[Add subdivisions to match account tax rule (#8252) · Issues · Tryton / Tryton...](https://foss.heptapod.net/tryton/tryton/-/issues/8252)**
>
> From https://discuss.tryton.org/t/add-subdivisiions-to-match-account-tax-rule/1290 Files Download Creator Timestamp

---

<div class="post-metadata">

**Author:** ![resteve](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/resteve/32/823_2.png) [@resteve](https://discuss.tryton.org/u/resteve)\
**Post date:** [April 3, 2019, 7:49am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/2 "2019-04-03T07:49:20Z")

</div>

> **[Add subdivisions to match account tax rule (#8252) · Issues · Tryton / Tryton...](https://foss.heptapod.net/tryton/tryton/-/issues/8252)**
>
> From https://discuss.tryton.org/t/add-subdivisiions-to-match-account-tax-rule/1290 Files Download Creator Timestamp

---

<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:** [April 3, 2019, 8:09am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/3 "2019-04-03T08:09:43Z")

</div>

I do not see the point to add this to the `account_tax_rule_country`. A subdivision is not a country. So it should be a new module.  
How is the tree nature of subdivision managed?  
Is it really the right way to implement it? Does it really depend on the shipping address? Can it not be managed with a different tax rule on the party?  
What about local business, do the same rule applies than for non-local business? What about other country business?

---

<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:** [April 3, 2019, 8:54am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/4 "2019-04-03T08:54:40Z")

</div>

> [@ced](#):
>
> How is the tree nature of subdivision managed?

In the case of Spain, sending goods to the Canary Islands is treated as an export operation.

The Canary Islands is an “Autonomous Community” which is divided into two “Provinces”:

- Santa Cruz de Tenerife
- Las Palmas

> [@ced](#):
>
> Is it really the right way to implement it? Does it really depend on the shipping address? Can it not be managed with a different tax rule on the party?

It really depends on the shipping address.

> [@ced](#):
>
> What about local business, do the same rule applies than for non-local business?

Not sure what you mean. If you mean what happens when a Business from the Canary Islands sends goods to another business in the Canary Islands the answer is that they apply a regional VAT named “IGIC”.

Sending goods from the Peninsula to the Peninsula we apply a VAT (21%, 10% or 4%)

Sending goods from the Peninsula to the Islands we apply 0% - Export.

Sending goods from the Islands to the Islands we apply IGIC (lower than Peninsula VAT: 3%, 7%…)

Sending goods from teh Islands to the Peninsula we apply 0% - Import.

> [@ced](#):
>
> What about other country business?

Not sure about what you mean here. Do you mean services?

Here’s what appears to be a good summary of several use cases:

[http://www.grupobelmar.onored.com/news/Year\_2014/News\_20140212.html](http://www.grupobelmar.onored.com/news/Year_2014/News_20140212.html)

---

<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:** [April 3, 2019, 9:24am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/5 "2019-04-03T09:24:37Z")

</div>

> [@albert](#):
>
> The Canary Islands is an “Autonomous Community” which is divided into two “Provinces”:
> 
> - Santa Cruz de Tenerife
> - Las Palmas

Well this brings the problem of subdivision tree structure.

> [@albert](#):
>
> If you mean what happens when a Business from the Canary Islands sends goods to another business in the Canary Islands the answer is that they apply a regional VAT named “IGIC”.

Then a tax rule will not be enough for a local business. Or they need a way to define what is the default subdivision when none is provided.

> [@albert](#):
>
> Not sure about what you mean here. Do you mean services?

I mean when one of the business is outside the country.

---

<div class="post-metadata">

**Author:** ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)\
**Post date:** [April 3, 2019, 9:29am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/6 "2019-04-03T09:29:37Z")

</div>

Hi

We worked on a similar module (which I have not yet had time to publish).  
We have also added the article accounting category as possible selector for the rule (see a discussion thread in French unfortunately : [https://discuss.tryton.org/t/french-vat-substitution/1194](https://discuss.tryton.org/t/french-vat-substitution/1194))  
Do you want me to publish it to make it a work base?

Regard

---

<div class="post-metadata">

**Author:** ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)\
**Post date:** [April 3, 2019, 9:45am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/7 "2019-04-03T09:45:42Z")

</div>

> [@2cadz](#):
>
> Do you want me to publish it to make it a work base?

You can find here our work: [Modules for Tryton of Adiczion / Account Tax Rule Subdivision · GitLab](https://gitlab.com/ate_modules/a4t-account_tax_rule_subdivision)  
(the test and doc isn’t writing for now)

---

<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:** [April 3, 2019, 9:47am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/8 "2019-04-03T09:47:54Z")

</div>

For me, it does not solve the tree structure of subdivision and account\_category should be in another module.

---

<div class="post-metadata">

**Author:** ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)\
**Post date:** [April 3, 2019, 9:58am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/9 "2019-04-03T09:58:53Z")

</div>

Yes, maybe, it’s always possible to separate it …

In our case, the tax rules depended on the subdivision and the products we put everything together.

We can write 2 differents modules a proposal of name for the second module ?

---

<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:** [April 3, 2019, 10:15am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/10 "2019-04-03T10:15:01Z")

</div>

> [@2cadz](#):
>
> In our case, the tax rules depended on the subdivision and the products we put everything together.

Does it require to set a tax rule for specifc product or using categories is enought? Does it depend on accounting or all categories should be used?

Please note that for categories you should also take in account the category tree.

> [@2cadz](#):
>
> We can write 2 differents modules a proposal of name for the second module ?

account\_tax\_rule\_product sounds as a good name

---

<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:** [April 3, 2019, 10:15am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/11 "2019-04-03T10:15:43Z")

</div>

> [@ced](#):
>
> > The Canary Islands is an “Autonomous Community” which is divided into two “Provinces”:
> > 
> > - Santa Cruz de Tenerife
> > - Las Palmas
> 
> Well this brings the problem of subdivision tree structure.

For me children subdivisions should match also the parents subdivisions. Like we do for price\_lists.

---

<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:** [April 3, 2019, 10:46am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/12 "2019-04-03T10:46:26Z")

</div>

I’m wondering if we should not have just one `account_tax_rule_extended` module that will include a common sets of criteria. (Of course it should replace `account_tax_rule_country`).

---

<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:** [April 3, 2019, 1:25pm UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/13 "2019-04-03T13:25:38Z")

</div>

> [@ced](#):
>
> I’m wondering if we should not have just one `account_tax_rule_extended` module that will include a common sets of criteria. (Of course it should replace `account_tax_rule_country` ).

For the specific case of the subdivision, for me it should go into the account\_tax\_rule\_country module. After all, the “country” module also includes subdivisions. We do not have a “subdivision” module for them.

I’m not very fond of appending “extended” to a module name. At NaN-tic we used to have things like that in OpenERP and we tried to avoid it in Tryton to give it a better, more specific, name.

---

<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:** [April 4, 2019, 9:48am UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/14 "2019-04-04T09:48:48Z")

</div>

> [@albert](#):
>
> For the specific case of the subdivision, for me it should go into the account\_tax\_rule\_country module. After all, the “country” module also includes subdivisions. We do not have a “subdivision” module for them.

OK that sounds rational.

So now there are still the question on how to deal when there is no country or subdivision defined on the address. And how such subdivision related tax rules works for importations.  
Then we can have someone to write a proper blueprint.

---

<div class="post-metadata">

**Author:** ![2cadz](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/2cadz/32/130_2.png) [@2cadz](https://discuss.tryton.org/u/2cadz)\
**Post date:** [June 4, 2019, 2:35pm UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/15 "2019-06-04T14:35:02Z")

</div>

Done here: [https://discuss.tryton.org/t/conditional-tax-rule/1435](https://discuss.tryton.org/t/conditional-tax-rule/1435)

---

<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:** [July 30, 2019, 1:17pm UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/16 "2019-07-30T13:17:10Z")

</div>

I have uploaded on [Add subdivisions to match account tax rule (#8252) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue8252) a full implementation of this idea.

---

<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:** [September 1, 2019, 4:00pm UTC](https://discuss.tryton.org/t/add-subdivisions-to-match-account-tax-rule/1290/17 "2019-09-01T16:00:01Z")

</div>

This topic was automatically closed after 13 days. New replies are no longer allowed.
