Tryton - Issues

 

Issue6013

Title Add flat tax report based on formula
Priority feature Status resolved
Superseder Tax Report on Cash Basis
View: 7139
Nosy List Timitos, ced, pokoli, reviewbot, roundup-bot
Type feature request Components account, account_be, account_de_skr03, account_eu, account_fr, account_invoice, account_tax_cash
Assigned To ced Keywords review
Reviews 40171002, 41941002, 44181002, 44751002, 45281002, 44761002, 40221002
View: 40171002, 41941002, 44181002, 44751002, 45281002, 44761002, 40221002

Created on 2016-11-04.02:05:46 by ced, last changed by roundup-bot.

Messages
New changeset 08ea1ea4a567 by Cédric Krier in branch 'default':
Use tax code line for tax reporting
http://hg.tryton.org/modules/account_tax_cash/rev/08ea1ea4a567
New changeset 95d8e64d85f9 by Cédric Krier in branch 'default':
Update chart to new tax code definition
http://hg.tryton.org/modules/account_de_skr03/rev/95d8e64d85f9
New changeset 84c123a1318f by Cédric Krier in branch 'default':
Update chart to new tax code definition
http://hg.tryton.org/modules/account_fr/rev/84c123a1318f
New changeset fc45ef5806a1 by Cédric Krier in branch 'default':
Update chart to new tax code definition
http://hg.tryton.org/modules/account_be/rev/fc45ef5806a1
New changeset 995f1f901ceb by Cédric Krier in branch 'default':
Remove tax code
http://hg.tryton.org/modules/account_eu/rev/995f1f901ceb
New changeset f45f42b6b358 by Cédric Krier in branch 'default':
Remove tax code from invoice tax
http://hg.tryton.org/modules/account_invoice/rev/f45f42b6b358
New changeset 9135d0ac6abd by Cédric Krier in branch 'default':
Use tax code line for tax reporting
http://hg.tryton.org/modules/account/rev/9135d0ac6abd
New review40221002 at https://codereview.tryton.org/40221002/#ps1
review41941002 updated at https://codereview.tryton.org/41941002/#ps40001
review40171002 updated at https://codereview.tryton.org/40171002/#ps100001
review40171002 updated at https://codereview.tryton.org/40171002/#ps80001
msg39196 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-22.00:43:54
Ready for testing as we have decided to not wait for account_es [1] (for which this feature will help the rewrite)

[1] https://groups.google.com/d/msg/tryton/qZIRTarG14w/pvNhW5Z1BAAJ
review40171002 updated at https://codereview.tryton.org/40171002/#ps60001
review40171002 updated at https://codereview.tryton.org/40171002/#ps40001
review41941002 updated at https://codereview.tryton.org/41941002/#ps20001
New review44761002 at https://codereview.tryton.org/44761002/#ps1
review40171002 updated at https://codereview.tryton.org/40171002/#ps20001
New review45281002 at https://codereview.tryton.org/45281002/#ps1
New review44751002 at https://codereview.tryton.org/44751002/#ps1
New review44181002 at https://codereview.tryton.org/44181002/#ps2
msg39037 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-16.18:11:12
Those reviews contain some modification from issue7139. Indeed in order to be able to clean the previous duplicate tax lines with a SQL query, we can not have account_tax_cash module installed before. So the two issues will need to be pushed together to be in the same release.
New review41941002 at https://codereview.tryton.org/41941002/#ps1
New review40171002 at https://codereview.tryton.org/40171002/#ps1
msg38976 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-03-13.18:12:24
Indeed I think we should go with a more radical design.
There is no need to have a single tax code per tax as we already have the tax.
So I think we could have:

- remove tax code from the tax definition and tax line
- add on tax line selection: tax/base
- compute sum's per tax instead of tax code
- define an amount on tax code by summing a set of tax sum's

The sum's on taxes are all the combination of tax/base and credit.
The definition of the amount on tax code is a One2Many with:
- operation: +/-
- tax: many2one
- amount: tax/base
- type: any/debit/credit

The migration of existing will just need to look at the combination: tax/code in the account_tax to define if it is a tax or a base.
msg32918 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-03-30.10:44:48
Indeed I think the tax code should be completely redesigned.
For me, the tax report of some countries are too complex to be just computed with sum (see issue6404).
So I propose to create a new flat model which will contains a formula using the tax code values (using simpleeval). This way we could use a single tax code per taxes and reuse it in many formula without being tight by a tree structure.
For backward compatibility we could keep the tree structure of the tax code even if it is no more useful.
msg30177 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-11-04.02:05:45
Following the discussion on issue6001, I think we could implement a distribution tax code like we did for analytic on issue5908. This will keep the invoice tax code simple and reduce the complexity of tax definition (because often we just need to put the base/tax amount on two or more code).
History
Date User Action Args
2018-03-25 23:39:45roundup-botsetmessages: + msg39366
2018-03-25 23:38:47roundup-botsetmessages: + msg39365
2018-03-25 23:37:15roundup-botsetmessages: + msg39364
2018-03-25 23:36:07roundup-botsetmessages: + msg39363
2018-03-25 23:35:24roundup-botsetmessages: + msg39362
2018-03-25 23:34:48roundup-botsetmessages: + msg39361
2018-03-25 23:33:51roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg39360
2018-03-24 17:50:07reviewbotsetmessages: + msg39334
2018-03-24 17:50:06reviewbotsetreviews: 40171002, 41941002, 44181002, 44751002, 45281002, 44761002 -> 40171002, 41941002, 44181002, 44751002, 45281002, 44761002, 40221002
2018-03-24 17:50:02reviewbotsetmessages: + msg39333

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