Tryton - Issues

 

Issue4990

Title Merge account type and account kind
Priority feature Status resolved
Superseder Remove accounting from Products, Repeatable FEC order
View: 3805, 7983
Nosy List Timitos, ced, dave, jesteve, ohuisman, pokoli, resteve, reviewbot, risto3, roundup-bot, rvnovaes
Type feature request Components account
Assigned To ced Keywords review
Reviews 68401002
View: 68401002

Created on 2015-09-24.10:28:53 by ced, last changed by roundup-bot.

Messages
New changeset be3cbe938590 by Cédric Krier in branch 'default':
Remove deferral from chart of account
https://hg.tryton.org/tryton-env/rev/be3cbe938590
New changeset c1195cd97916 by Cédric Krier in branch 'default':
Remove deferral from chart of account
https://hg.tryton.org/modules/account_fr/rev/c1195cd97916
New changeset 56b405fa6fdf by Cédric Krier in branch 'default':
Remove deferral from minimal chart
https://hg.tryton.org/tryton-env/rev/56b405fa6fdf
New changeset 410b1e347efd by Cédric Krier in branch 'default':
Remove deferral from minimal chart
https://hg.tryton.org/modules/account/rev/410b1e347efd
New changeset 7a341c171d13 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/tryton-env/rev/7a341c171d13
New changeset fc685be2de64 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/stock_supply_day/rev/fc685be2de64
New changeset 50bbbd3df3a5 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/stock_supply/rev/50bbbd3df3a5
New changeset 7065789d1042 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/sale_credit_limit/rev/7065789d1042
New changeset 06d7525cf1af by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/sale_advance_payment/rev/06d7525cf1af
New changeset 3485bd651dbe by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/sale/rev/3485bd651dbe
New changeset aa640273fac1 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/purchase/rev/aa640273fac1
New changeset 7f2dd4dabec7 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/commission_waiting/rev/7f2dd4dabec7
New changeset f7646c044c62 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/analytic_account/rev/f7646c044c62
New changeset f726093955eb by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_tax_cash/rev/f726093955eb
New changeset 7add6271d38e by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_stock_continental/rev/7add6271d38e
New changeset 30279fbb27c4 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_stock_anglo_saxon/rev/30279fbb27c4
New changeset 947e3a574bbc by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_statement_rule/rev/947e3a574bbc
New changeset 085c6b32ab32 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_statement/rev/085c6b32ab32
New changeset eabea6829865 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_product/rev/eabea6829865
New changeset eccf33e00f99 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_payment_clearing/rev/eccf33e00f99
New changeset 8c1c6c2198fd by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_payment/rev/8c1c6c2198fd
New changeset b899d860c265 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_invoice/rev/b899d860c265
New changeset 275c840a4f06 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_fr/rev/275c840a4f06
New changeset f3bc08888e01 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_es/rev/f3bc08888e01
New changeset 3822de22a678 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_dunning_letter/rev/3822de22a678
New changeset 28a9b7525b90 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_dunning/rev/28a9b7525b90
New changeset 1a4cc0e6cabe by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_deposit/rev/1a4cc0e6cabe
New changeset 362a6c9495bd by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_de_skr03/rev/362a6c9495bd
New changeset df2a8be2a445 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_credit_limit/rev/df2a8be2a445
New changeset 95974ae80941 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_be/rev/95974ae80941
New changeset f77077488738 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account_asset/rev/f77077488738
New changeset 6b76c4de4813 by Cédric Krier in branch 'default':
Merge account kind and account type
https://hg.tryton.org/modules/account/rev/6b76c4de4813
msg47776 (view) Author: [hidden] (Timitos) (Tryton translator) Date: 2019-03-22.12:04:46
Unfortunately i had no time to look at the german chart this week. I would be able to do it next week. As an alternative i could create a new review to fix some things.
review68401002 updated at https://codereview.tryton.org/68401002/#ps251171002
msg47560 (view) Author: [hidden] (dave) Date: 2019-03-12.18:39:50
I don't know if this will be of any help, and this is a bit of a hack, but I ended up downloading and applying the patches for the individual files:


# Get a list of the patches
LINKS=$( \
    wget -q -O- "https://codereview.tryton.org/68401002/" \
    | grep '<a href.*download.*diff' \
    | sed -e 's/[^"]*"//' -e 's/"//' )

# Download the patches
mkdir /tmp/issue68401002
for LINK in $LINKS; do
   PATCH=$( echo $LINK | sed -e 's|.*/||' )
   echo "patch $PATCH... "
   wget -q -O "/tmp/issue68401002/$PATCH" "https://codereview.tryton.org/$LINK"
done

# Apply the patches
cd $YOUR_MODULES_DIRECTORY
for PATCH in $( ls "/tmp/issue68401002" ); do
    patch -p2 <"/tmp/issue68401002/$PATCH"
done


Note: YMMV, this seemed to work for all the files except a two of csv ones, where the patches were rejected, but for me as I wasn't interested in those files I didn't look into why.
msg47558 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-03-12.16:48:48
Thanks for your work. Patch set is too large for download, could you upload the changes on some repository so we can test the patch before committing it?
msg47556 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-03-12.16:18:15
I have added account_es but:

* I found that some account types have expense, revenue and stock flags. This is strange. expense, revenue should only be set for account allowed to be on invoices.
* I found that income tax accounts are marked as expense. I think it is wrong.
* I found many accounts have the reconcile flag, I think it should be set very carefully
* It miss the new flags: fixed_asset, deposit and unearned_revenue
* I had tom remove some incompatible flags like revenue on balance statement.

So I will wait 1 week to get feed-backs for all charts and after that I will push the change.
review68401002 updated at https://codereview.tryton.org/68401002/#ps255131003
review68401002 updated at https://codereview.tryton.org/68401002/#ps249081002
review68401002 updated at https://codereview.tryton.org/68401002/#ps60001
msg47296 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-03-01.18:20:46
I have added account_de_skr03 but:

* I found there are a lot of expense/revenue checks which I suspect should not be activated. Those checks should be reserved for account used on invoices.
* I do not know which account type should have: assets, stock, fixed_asset, deposit and unearned_revenue

Could someone with German knowledge check it?
review68401002 updated at https://codereview.tryton.org/68401002/#ps50001
review68401002 updated at https://codereview.tryton.org/68401002/#ps40001
msg46099 (view) Author: [hidden] (risto3) Date: 2019-01-20.08:15:22
>  - balance_type: payable, receivable, cash, income, other
>  - income_type (when balance_type is income)

I'm rather lost at this breakdown...

Any way to simply use the basics of accounting?
https://en.wikipedia.org/wiki/Chart_of_accounts
https://en.wikipedia.org/wiki/Debits_and_credits

I'd be amazed if there were accountants who don't understand these basics...
review68401002 updated at https://codereview.tryton.org/68401002/#ps30001
review68401002 updated at https://codereview.tryton.org/68401002/#ps20001
New review68401002 at https://codereview.tryton.org/68401002/#ps1
msg40444 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-28.11:43:56
I think it is even better to remove the kind field completely.
We added it to ease non-accountant user to fill form like product. But indeed with issue3805, this can be eliminated as only accountant will be allowed to manage accounting categories.
The second usage is to compute the receivable/payable for a party. issue5565 shows that nobody use the design of one account per party. So I think we simply rely on the account type being payable or receivable.

Also removing the kind constraint will solve issue3229 and issue7204.

Following msg23169, the deferral property will be derived from the account type.

Here is the model proposal:

Account:

  - name
  - code
  - parent
  - type
  - reconcile
  - party required
  - GL balance
  - second currency
  - taxes
  - deferral: computed from account type (true: balance sheet, off-balance; false: income statement)

Account Type:

  - name
  - parent
  - statement: balance sheet; income statement; off-balance (constraint same as parent)
  - balance_type: payable, receivable, cash, income, other
  - income_type (when balance_type is income)
msg23169 (view) Author: [hidden] (rvnovaes) Date: 2015-11-16.19:45:55
After discussing the case, we (rvnovaes and ced) have found out that account deferral should also be moved to the type of the account. We would also like to know if there is a direct (one to one) correspondence between non-deferral-->Income Statement and deferral-->Balance Sheet and Off Balance Sheet. If so, maybe the check boxes on the account could be supressed, because all the information needed would be if the account is deferral or not. Is there a case where the deferral information does not correspond to the reports? Would it restrict too much the configuration possibilities? It would mean that the 'other' kind would always be on the Balance Sheet.
msg22525 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-25.11:41:54
Discussion: https://groups.google.com/d/topic/tryton/glkVbPNG-eY/discussion
msg22513 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-24.20:25:08
On 2015-09-24 20:08, Jordi Esteve wrote:
> >>> Could you point me to example (I will not read all the chart of
> >>> account).
> >> For example, there is an account kind named "Deterioration and results
> >> on disposal of fixed assets". There are 6 accounts related to this kind
> >> of type revenue and 6 accounts of type expense, for example:
> >>
> >> Profits on investment property -> revenue
> >> Loses on investment property -> expense
> > Better to create to children kinds for each kind.
> >
> 
> If we create children kinds, the profit and loss report or the balance 
> report will be a mess. The accountants will not understand them, the 
> authorities will not accept them.

I don't understand the rational here.
So having two children type will explode the mind of accountant while in
the same time you said that accountant understand in a minute the double
usage of kind and type. All this seems only based on your own opinions.

> So, if this issue is implemented, the work of Spanish accountants will 
> be harder instead of helping them.

So for one type that needs to be split and this split will absolutly not
be done by accountant, their work is harder.
Please you have to explain much more in details because your thinking
can not be followed.
msg22511 (view) Author: [hidden] (jesteve) Date: 2015-09-24.20:08:47
>>> Could you point me to example (I will not read all the chart of
>>> account).
>> For example, there is an account kind named "Deterioration and results
>> on disposal of fixed assets". There are 6 accounts related to this kind
>> of type revenue and 6 accounts of type expense, for example:
>>
>> Profits on investment property -> revenue
>> Loses on investment property -> expense
> Better to create to children kinds for each kind.
>

If we create children kinds, the profit and loss report or the balance 
report will be a mess. The accountants will not understand them, the 
authorities will not accept them.

So, if this issue is implemented, the work of Spanish accountants will 
be harder instead of helping them.
msg22510 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-24.19:45:08
On 2015-09-24 19:14, Jordi Esteve wrote:
> >> In Spanish chart of accounts [1] there are a lot of accounts with same type but different kind. For example, accounts with the same profit and loss type they could have revenue or expense kind.
> >>
> >> IMHO I think is not difficult for an account understand the account kind, in few minutes they understand perfectly the seven different kinds of accounts.
> > So you mean that in Spain, in your profit and lost report, you don't
> > make the distinction between the profit and the lost?
> Yes, but some account kinds are related only to revenues, some account 
> kinds related only to expenses and other account kinds have both types.

This sounds crazy (but I start to be used by Spanish craziness).
Any way, I don't see problem in creating two children kinds for each
types.

> > Could you point me to example (I will not read all the chart of
> > account).
> 
> For example, there is an account kind named "Deterioration and results 
> on disposal of fixed assets". There are 6 accounts related to this kind 
> of type revenue and 6 accounts of type expense, for example:
> 
> Profits on investment property -> revenue
> Loses on investment property -> expense

Better to create to children kinds for each kind.
msg22509 (view) Author: [hidden] (jesteve) Date: 2015-09-24.19:14:24
>> In Spanish chart of accounts [1] there are a lot of accounts with same type but different kind. For example, accounts with the same profit and loss type they could have revenue or expense kind.
>>
>> IMHO I think is not difficult for an account understand the account kind, in few minutes they understand perfectly the seven different kinds of accounts.
> So you mean that in Spain, in your profit and lost report, you don't
> make the distinction between the profit and the lost?
Yes, but some account kinds are related only to revenues, some account 
kinds related only to expenses and other account kinds have both types.

> Could you point me to example (I will not read all the chart of
> account).

For example, there is an account kind named "Deterioration and results 
on disposal of fixed assets". There are 6 accounts related to this kind 
of type revenue and 6 accounts of type expense, for example:

Profits on investment property -> revenue
Loses on investment property -> expense
msg22508 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-24.18:10:10
On 2015-09-24 17:51, Jordi Esteve wrote:
> In Spanish chart of accounts [1] there are a lot of accounts with same type but different kind. For example, accounts with the same profit and loss type they could have revenue or expense kind.
> 
> IMHO I think is not difficult for an account understand the account kind, in few minutes they understand perfectly the seven different kinds of accounts.

So you mean that in Spain, in your profit and lost report, you don't
make the distinction between the profit and the lost?
Could you point me to example (I will not read all the chart of
account).
msg22506 (view) Author: [hidden] (jesteve) Date: 2015-09-24.17:51:57
In Spanish chart of accounts [1] there are a lot of accounts with same type but different kind. For example, accounts with the same profit and loss type they could have revenue or expense kind.

IMHO I think is not difficult for an account understand the account kind, in few minutes they understand perfectly the seven different kinds of accounts.

[1]
https://bitbucket.org/trytonspain/trytond-account_es
https://bitbucket.org/trytonspain/trytond-account_pyme_es
msg22496 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-24.12:45:09
No because currently a view kind account can not have a type.
But the big question is more is all accounts of the same type are also of the same kind.
msg22495 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2015-09-24.12:20:06
Yes a selection which has a "view" value. I'm talking about this value. Sorry for the confusion.
msg22492 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-24.11:58:24
Which view are you talking? kind is a selection field.
msg22490 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2015-09-24.11:32:33
Will the view kind be removed or it will be also available on types?
msg22487 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2015-09-24.10:28:52
I saw that Odoo has done this merge by simply put the account kind to the account type.
At first sight, it seems to work except for the view kind but this could be fixed if we consider account without type as a view.
The main advantage I see is that accountant understand the account type but not always the account kind as it is something specific to Tryton. So if kind is defined on the type, the account will not have to care about as creating account can happen often but creating type is much more rare.
History
Date User Action Args
2019-03-27 09:10:29roundup-botsetmessages: + msg48061
2019-03-27 09:10:26roundup-botsetmessages: + msg48060
2019-03-27 01:02:30roundup-botsetmessages: + msg48057
2019-03-27 01:02:22roundup-botsetmessages: + msg48056
2019-03-24 18:02:30roundup-botsetmessages: + msg48000
2019-03-24 18:02:27roundup-botsetmessages: + msg47999
2019-03-24 18:02:23roundup-botsetmessages: + msg47998
2019-03-24 18:02:19roundup-botsetmessages: + msg47997
2019-03-24 18:02:16roundup-botsetmessages: + msg47996
2019-03-24 18:02:13roundup-botsetmessages: + msg47995

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