Closing and opening entry in Odoo 17: what Odoo does and how to solve it in Spain
Odoo 17 does not generate the closing entry or the opening entry, and the OCA module that does is not migrated to 17. What Spanish regulations require and what options you have in Community.
'In Odoo 17 you no longer need the closing and opening entry, right?'
It is one of the most recurring questions among those who keep their accounting with Odoo 17 Community in Spain: the advisor asks to 'do the closing entry and the opening entry', and from inside Odoo it feels like that is no longer necessary. The short answer is that you are both right, but about different things. Odoo does not need those entries to work; the accounting books that get legalised do expect to see them. They are two different layers, and confusing them is precisely what sparks the argument.
Let's take it step by step, with the verified sources next to each statement.
What Odoo 17 does when closing the year: no entry at all
Odoo 17 generates neither a closing entry nor an opening entry. The official documentation itself says so literally: the year-end closing entry is optional, because the reports are calculated in real time from the journal items.
«A specific year-end closing entry is optional in order to close out the profit and loss statement. The reports are created in real-time…» — Odoo 17 official documentation, year-end closing
And where does the year's result go? To a special-type account, equity_unaffected ('current year result'), which Odoo calculates dynamically, without any journal entry. In Odoo's Spanish chart of accounts, that account is 129 (verifiable in the l10n_es templates: it appears in 'PYMEs', 'completo' and 'asociaciones', not in the common plan). That is why, from the accounting engine's point of view, the feeling that 'it is no longer needed' is correct.
Careful: locking the year is not closing it
This is where many people trip up. The fiscal year lock date (fiscalyear_lock_date) does not create any entry: it only checks that there are no draft entries or unreconciled bank statements left, and locks the period so no one can alter it. Closing the accounts and locking dates are independent things. And if you do both, the order matters: first the entry dated 31/12, and then the lock. The other way around, Odoo will not let you post.
What your accountant is really asking you for
Before setting anything up, it is worth clarifying what 'closing' means in each mouth, because it is used for two very different operations:
- The regularisation: moving the balances of groups 6 (expenses) and 7 (income) to account 129 dated 31/12. It is a manual entry and that's it. It is exactly what the PGC describes in the movement of account 129, and it solves most cases.
- The three full entries: profit and loss + balance sheet closing + opening of the following year. This does require a tool, because Odoo does not do it natively.
The practical recommendation: ask your advisor which of the two things they need. Often the regularisation is enough.
What Spanish regulations require (and what they do not)
Let's be honest about what the rule says and about what is custom. What is in the law:
- The Código de Comercio (arts. 25 to 28) requires keeping a book of Inventories and Annual Accounts and a Journal, and that the Inventories one 'open with a detailed initial balance sheet'.
- The PGC (RD 1514/2007) describes, in account 129, the regularisation: debiting/crediting the accounts of groups 6 and 7 against 129 to determine the result. That is the P&L entry.
Now the part worth stating transparently: there is no rule that literally requires a 'closing entry' and an 'opening entry' in the Journal. What the rule describes is the regularisation against 129; the closing and opening of the balance sheet are consolidated accounting practice, very widespread and expected by anyone reviewing the books, but not a mandate written in those words. If your advisor has the exact reference, we would be glad to know it.
And a nuance that causes confusion: the Instrucción of the DGRN of 12 February 2015 on the electronic legalisation of books speaks of a «diligencia de cierre» (closing endorsement) — but that is an endorsement of the book's file, not an accounting entry, and in fact for books submitted electronically it states that it is not required. It is not the same as a closing entry.
The OCA module that does it — and why on 17 it leaves you in the gap
If you really need the three entries, the community (OCA) module that generates them is account_fiscal_year_closing. First warning: it is not where you would look for it. It does not live in OCA/l10n-spain nor in account-financial-tools, but in OCA/account-closing. It generates the three entry types (closing, opening, loss_profit), with configurable templates, preview before posting and the option to cancel (it unreconciles and deletes the journal items).
Second warning, and this is the big one: it is not migrated to 17.0. The repository's 17.0 branch exists and is alive, but that module jumped from 16.0 straight to 18.0. If you are on Odoo 17, you are right in the gap:
| Odoo version | Is account_fiscal_year_closing available? |
|---|---|
| 14.0 | Yes |
| 15.0 | No |
| 16.0 | Yes |
| 17.0 | No — never migrated |
| 18.0 | Yes |
| 19.0 | Yes |
And there is a third detail: the Spanish PGC template for this engine (l10n_es_account_fiscal_year_closing, by Tecnativa) has not been migrated since Odoo 10. It existed in 8.0 and 10.0, and in no later version. So, even if you port the engine to 17, the closing configuration for the Spanish plan would have to be rebuilt by hand.
Extra warning for Community: you do not have a Balance Sheet or Profit and Loss out of the box
Related, because you will need it when closing: Odoo 17 Community does not include the native Balance Sheet or Profit and Loss statement. The dynamic financial reports are Enterprise. In Community they are solved with OCA:
- account_financial_report (17.0 branch available), or
- l10n_es_mis_report (17.0 branch available).
We point it out because much of what you will read about 'checking that the result ends up at zero in the balance sheet' assumes you have that report, and in Community you do not have it out of the box.
So, what do I do if I am on Odoo 17 CE?
- Ask your advisor whether they need only the regularisation (groups 6 and 7 against 129) or the three full entries. The first is usually enough.
- If the regularisation is enough: a manual entry dated 31/12 moving 6xx and 7xx to 129. It is what Odoo's own documentation recommends.
- If you need full closing + opening, in order of cost: port the module from 16.0 (or 18.0) to 17.0 —it is small and only depends on account, and it would be a useful contribution to the community—, or plan the jump to Odoo 18, where it already exists.
- At the very end, set the lock date to 31/12. That is the step that provides unalterability, and it is independent of the entries.
Summary
| Statement | True? |
|---|---|
| Odoo 17 generates only the closing and opening entry | No: it generates none; the result goes dynamically to 129 |
| Locking the year is the same as closing it | No: the lock does not create journal items, it only validates and protects the period |
| The OCA closing module works on 17 | No: account_fiscal_year_closing is not migrated to 17.0 |
| Community ships a Balance Sheet and P&L | No: they are Enterprise; in Community it is solved with OCA |
| The regularisation against 129 solves the usual case | Yes, in most cases |
Are you on Odoo 17 and need to close the year or plan the jump to 18?
At Skanndar we migrate and provide Odoo accounting support for Spanish companies, including the OCA part and the fiscal localisation. If you have been left in the 17 gap or want to do the closing right the first time, we'll look at it with you.