Tryton - Issues

 

Issue7862

Title Tax base amount are not decreased when using tax with update_unit_price option and child tax
Priority bug Status resolved
Superseder Nosy List ced, flangevin, reviewbot, roundup-bot
Type behavior Components account
Assigned To ced Keywords review
Reviews 251911002
View: 251911002

Created on 2018-11-16.13:31:30 by flangevin, last changed by roundup-bot.

Messages
New changeset efcb620fadc9 by Cédric Krier in branch 'default':
Increase unit price also with amount of children taxes
https://hg.tryton.org/tryton-env/rev/efcb620fadc9
New changeset b6a3a2f48fbd by Cédric Krier in branch 'default':
Increase unit price also with amount of children taxes
https://hg.tryton.org/modules/account/rev/b6a3a2f48fbd
review251911002 updated at https://codereview.tryton.org/251911002/#ps285651002
msg50939 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-27.22:54:54
Here is review251911002
msg50354 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-06-21.10:16:25
Yes please: http://www.tryton.org/develop
msg50353 (view) Author: [hidden] (flangevin) Date: 2019-06-21.10:02:31
Thanks !!!
We made a fix on our version to update unit_price_variation. 
If you want i can send teh code
msg50352 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-06-21.09:41:33
I reread and check the code. Now I think I understand the issue.
In _unit_compute when _unit_compute is called recursively on the childs, the unit_price_variation is not added to the parent. I think it makes sense to push up the variation.
msg44923 (view) Author: [hidden] (flangevin) Date: 2018-11-19.09:19:49
Thanks for the answer.

So is there a way to configure the following requirement:

I have a tax CSG. The tax change the 2018/01/01 from 4.2% to 5.9%.

I have a second tax call 'Pasrau' with a 10% rate. This second tax must apply on the invoice line unit_price deduct by the CSG amount tax.

For now i configure CSG tax with two childs tax (one effective until 2017-12-31 and the second effective since 2018-01-01) with the update_unit_price set to True.

However it's not working (see previous post). Is there a way to configure this taxes in tryton.
msg44889 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-16.15:31:42
Yes it is the expected behavior. The update flag is between taxes not inside a tax.
msg44888 (view) Author: [hidden] (flangevin) Date: 2018-11-16.13:31:29
I have one tax with the option update_unit_price set to True and sequence set to 1. Tax rate is 0
I have defined two versions of this tax: one prior 2018 (tax rate 5%) and one after (6%)
I have another tax with sequence to 2.
I was expected that the base amount of second tax decrease with the tax amount of the first tax. But it's not working.

When looking to the code _unit_compute in account.tax.py: unit_price_variation is not updated with childs taxes amount.

Is it the expected behavior?
History
Date User Action Args
2019-08-07 19:27:27roundup-botsetmessages: + msg51096
2019-08-07 19:27:20roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg51095
2019-07-27 22:57:37reviewbotsetnosy: + reviewbot
messages: + msg50940
2019-07-27 22:54:54cedsetstatus: chatting -> testing
reviews: 251911002
messages: + msg50939
keyword: + review
assignedto: ced
2019-06-21 10:16:26cedsetmessages: + msg50354
2019-06-21 10:02:31flangevinsetmessages: + msg50353
2019-06-21 09:41:47cedsetpriority: feature -> bug
component: + account
2019-06-21 09:41:33cedsetstatus: unread -> chatting
messages: + msg50352
2018-11-25 10:42:40cedsetpriority: bug -> feature
2018-11-19 09:19:49flangevinsetstatus: closed -> unread
messages: + msg44923

Showing 10 items. Show all history (warning: this could be VERY long)