Trying to configure tryton for UK accounts


Speaking for me personally, I am utilising the micro accounts discussed here for a services company, so I like the last option you mention ->

That said, I don’t fully know the differences between full accounts and micro/ its hard to comment more than that.

I am guessing after seeing previous company corp accounts its the level of detail required and the need to be audited.

I am not aware (but may be wrong) of differences between service lines, as isn’t it about the overall profit and loss + balance sheet, which might have different revenue/income lines but they are all still income.

I would be fine with one account that can have items removed if it is a micro or small business, but I’d really appreciate knowing that these type of options are available, so I don’t get swamped with detail of a full company account that I do not need to know at that point.

For non limited companies I guess it is again down to the differences, but I understood it is differences in tax bands and the classes of national insurance that are applicable. As well as different reporting requirements but they are not financial.

(David Harper) #22

Thanks for the feedback.

There is no official chart of accounts defined, so it is possible to create a chart of accounts that does not have duplicated codes.

From what I can see, the differences in the balance sheet and income statement for Small Companies and Groups, and Large and Medium-sized Companies are only in the arabic numbered items, and furthermore general rule 4 states that these numbered items should be adapted where the nature of the business requires it. Also, it looks like small companies could use the the formats defined for large and medium-sized companies - See 3. (3). So I see no obstacle for having a single module here.

However, for Banking Companies, and Insurance Companies, the allowed formats for the balance sheet and income statement are quite different.

If there was a single module then it is possible to deactivate items that you are not interested in. Accounts and account types can be updated to have an end date sometime in the past, this would then mean you would not see them. Then if in the future you needed them, you could re-activate them.

I would be great to get an idea of what kinds of revenue/income lines you would be expecting to see for a service company, so I can compare it with what I have found out so far.

(Cédric Krier) #23

To summarize there are 4 types: small, large and medium, banking and insurance companies.
So I seems that 4 charts of account are required (but banking and insurance could probably be skipped for now). And as small can use the large and medium, I think the best is to implement the last one.

(David Harper) #24

There are also sole traders and partnerships, but these do not have to file accounts with a public body, only maintain proper accounting records. They could also use the same chart of accounts and format of balance sheet and income statement.

So, I agree its probably best to base the module on the Large and Medium-sized company formats.


Sure, but it may be some time.

Those service lines would depend on the service being offered wouldn’t they. Perhaps Service 1,2, 3 etc

There would also be the addition of partial payments as its unlikely you would be paid for all of the service in advance and you would want payment on milestones to ease your cashflow for example.

(David Harper) #26

I have a question that I hope someone can help me with.

On the balance sheet formats there are several “payments on account” items. From what I understand a payment on account is a payment where there is no invoice to allocate it to. This payment is then allocated to an invoice at a later date.

In Tryton I expected payments without an invoice would be posted to the appropriate payables or receivables account, and then at a later date simply reconciled using the Reconcile Accounts wizard? If this is the case then on the balance sheet these payments would show up as part of the amount from that payables or receivables account.

So how should these payments on account be split out? Is it best to have some “payment on account” accounts, which any outstanding payments on account can be moved to at year/period end, and then moved back at the next year/period start?

(Cédric Krier) #27

I would say do not use those accounts if it is not strictly required.
Tryton manages payable and receivable through reconciliation which is a much more powerful way.

(David Harper) #28

I’ve now got an initial module that can be tested. It includes a chart of accounts, balance sheet and income statement. It also includes UK taxes.

There are some things that I have not included (yet) such as reports to output the balance sheet and income statement in an appropriate format for filing, or a model to show the data that must go in each of the boxes on the VAT Return, or any support for MTDfVAT.

However I have created issue7770 so I can hopefully get some feedback before I do too much more.


Congrats on getting to this point. It sounds very promising.

Is it at a point to have a try and if so what is the best way of installing?


(Sergi Almacellas Abellana) #30

You should download the proposed review and install the module from sources. Something like:

mkdir account_uk
cd account_uk
hg init . 
hg import
python install

Note that you need to have mercurial installed in order to execute the hg commands.

Hope it helps

(David Harper) #31

Yes, it is definately at a point where it can be tested. There are a few different ways of installing it, but Sergi’s suggested method works well (although you might want to also run cd account_uk, just after the mkdir account_uk line :slight_smile: ).

It would be good to get any comments, suggestions, or questions about it, so I can improve it as required.


Yes it does help thank you.

I am only using your official docker image, so I am hoping it has the necessary deps for me to do it?

Edit: Just checked and mercurial is not installed, so i will look for the Dockerfile so I can add the deps to a test docker.


Thanks for the additional input :slight_smile: I will give it a try.

I have submitted my accounts with Freeagent this time, but I am keen to see if the calcs all come out the same with this too.

(Sergi Almacellas Abellana) #34

The review is not present on the oficial Docker image, so you need to build one derivate image installing it.

Indeed if you don’t want to install some packages on the Trytond image you should use the root user and pip3 to install it on python3 (as the default python is python2)

Here is some example:

FROM tryton/tryton
USER root
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    mercurial \
  && rm -rf /var/lib/apt/lists/*
# Install module
RUN mkdir account_uk && cd account_uk
RUN hg init .  && hg import
RUN pip3 install --process-dependency-links . \
  && rm -rf /root/.cache
# Use trytond user
USER trytond


Thanks @pokoli very helpful.


So I managed to install the uk accounts manually inside of a running docker image but I cannot get a docker image to build with the above additions.

I’ve tried various options and they all result in a continuously ‘building’ docker that never errors out or stops, which I have never seen before.

At what point could the changes be incorporated into a module that can be loaded normally into the system?

Can it be noted as a beta or whatever the usual process is in these instances…thanks in advance

(David Harper) #37


I think the Dockerfile from @pokoli might be trying to install the development version (5.1) of trytond as well as the account_uk module on the RUN pip3 ... line. It is probably just taking ages to try and do that.

Try this Dockerfile to see if this is any better:

FROM tryton/tryton
USER root

# Install the patch command
RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    patch \
  && rm -rf /var/lib/apt/lists/*

# Manually install the account_uk module
ARG MODULE_PATH=/usr/local/lib/python3.5/dist-packages/trytond/modules
RUN mkdir $MODULE_PATH/account_uk \
  && cd $MODULE_PATH/account_uk \
  && curl \
  | patch -p1

USER trytond


Thanks, that seems to be building now.