Error popup: The value of the field "Credit Note Account" on "Account Tax" is not valid according to its domain

I’m testing the new account_ch.xml and tax_ch.xml

When I get to the “Create Chart of Accounts from Template”, I select the template and click OK

After a few seconds, an error appears:

The value of the field "Credit Note Account" on "Account Tax" is not valid according to its domain.

I’m using a Debian system with tryton-server version 5.0.4-2

How do I resolve this?

Some more details from account_ch.xml:

                <record id="accttmpl_2200" model="account.account.type.template">
                        <field name="name">Sales Tax (VAT) owed</field>
                        <field eval="3090" name="sequence"/>
                        <field name="parent" ref="accttmpl_220"/>
                </record>


                <record id="2200" model="account.account.template">
                        <field name="name">Sales Tax (VAT) owed</field>
                        <field name="code">2200</field>
                        <field name="type" ref="accttmpl_2200"/>
                        <field name="parent" ref="220"/>
                </record>

and from tax_ch.xml there are various tax entries similar to this

        <!-- Sale, Normal 7.7% -->

        <record model="account.tax.template" id="vat_sale_goods_tax_normal">
            <field name="name">VAT Sale of goods Tax Normal</field>
            <field name="description">VAT Tax Normal</field>
            <field name="group" ref="group_vat_sale_goods"/>
            <field name="rate" eval="None"/>
            <field name="type">none</field>
            <field name="invoice_account" eval="None"/>
            <field name="credit_note_account" eval="None"/>
            <field name="account" ref="root"/>
        </record>

        <record model="account.tax.template" id="vat_sale_goods_7_7">
            <field name="name">VAT Sale of goods 7.7%</field>
            <field name="description">VAT 7.7%</field>
            <field name="parent" ref="vat_sale_goods_tax_normal"/>
            <field name="start_date" eval="datetime.date(2018, 1, 1)"/>
            <field name="rate" eval="Decimal('.077')"/>
            <field name="type">percentage</field>
            <field name="invoice_account" ref="2200"/>
            <field name="credit_note_account" ref="2200"/>
            <field name="account" ref="root"/>
        </record>

The problem is that there is some account set on the taxes that does not satisfy the restriction of this fields. The accounts of the taxes must be related to a type which is of balance statement and must not be closed.

You should check your chart of accounts to search for the wrong accounts and fix it’s values.

BTW: It will be great to have the CH chart as part of oficial tryton modules. If you are interested on working on this I offer myself as mentor to help the contribution.

Thanks for this feedback, I got it working. It was a combination of things, I changed the parent to balance and I had to add the field kind with value other as well.

Could you make the errors a little bit more verbose or is it possible to access debug level logging about this type of issue?

I spent some time looking at this last night, I put my progress in a Git repository here