Skip to main content
Pending validationOdoo 20.0Community and Enterprise

How to look up the history from the previous program

What is it for?​

When a company changes program, the documents from previous years must remain available for consultation during the legal retention period, which is 10 years. fiscaldoo keeps that past in three places, all for consultation only:

  • Migrated history: the journal entries from the previous program, exactly as they came.
  • Previous system archive: the record of how the history is kept (file imported or old program kept accessible) and the old files, such as the SAF-T files, with their fingerprint.
  • Receipts and guides of the previous system: the list of receipts and delivery notes from the previous program, with the PDF of each one when it exists.

None of these records creates journal entries, uses series or goes into the invoicing SAF-T of the new system.

When to use it?​

  • To answer “what was the journal entry for …?” or “where is receipt no. …?” from before the migration.
  • To record, during the migration, where and until when the previous program's history is kept.
  • To correct a value in the history without touching the original (see “Correct a journal entry in the history”).
  • Do not use it to bring journal entries into the history: that is done in Import journal entries, with the Migrated history option. Certified documents (invoices, credit notes) are brought in through Migrate the series and certified documents.

Where to find it?​

  • Accounting › Configure › Migration and imports › Migrated history. This menu only appears when there are already migrated journal entries in the database; at that point, Accountant, Certified accountant and Auditor see it.
  • Accounting › Configure › Other settings › Archive › Previous system archive and, in the same folder, Receipts and guides of the previous system. Both entries are in the menu without developer mode (seen with the Administrator, the Certified accountant, the Accountant and the Auditor).

Before you start​

  • Your profile is Accountant, Certified accountant or Auditor to look things up. Administrative sees none of the three menus. To record the archive and load receipts and delivery notes you need the Certified accountant profile (or Administrator); Accountant and Auditor only read. Pending validation by a certified accountant: who should be able to record the previous system archive.

  • The history has already been imported with the Migrated history option in Import journal entries. Without any migrated journal entry in the database, the menu does not appear for these profiles.

  • To load receipts and delivery notes, you have a CSV file with a header first line and the columns numero, data and valor (required) and, optionally, tipo, atcud, nif, cliente, origem, estado and hash; or a ZIP of PDFs with names like RG A_15.pdf. Example, with made-up data (each table row is one line of the file; save it with semicolons between columns):

    numerotipodatavaloratcudnifclienteorigemestado
    RG A 15RG15/03/20251230,00JJ4KQ7W9-15599999993Cliente Alfa, LdaFT A 101N
    RG A 16RG20/04/2025500,00JJ4KQ7W9-16599999993Cliente Alfa, LdaFT A 105N
    GT A 7GT02/05/2025100,00JJ4KQ7W9-7599999993Cliente Alfa, LdaN

    The accepted types are RG (receipt), RC (receipt under cash-accounting VAT), GT (delivery note, transport document), GR (delivery note, remessa), GA, GC (consignment) and GD (return). Without the tipo column, the type is the first word of the number.

How to use it​

  1. Open Migrated history. The list shows the journal entries that came from the previous program, with the date, the HMIG/… number, the Migrated history journal, the reference, the partner, the total and the Posted state. Search by date, reference or account as in any journal entry list. If it is empty, there are none in this company.
  2. Open a journal entry to see the lines, notes and attachments. There are only two buttons, Save as template and Actions (with PDF da fatura and Share): there is no Reset to draft, Cancel or Delete, for any profile.
  3. To record how the history is kept, open Previous system archive and click New. Fill in the Previous system (the name of the program), the Period from and the Period to, and choose How it is kept: Ficheiro importado para este sistema (file imported into this system) or Previous system kept accessible. With the second, also fill in Accessible until and Who keeps it and how to access; without them, on saving, you get “When the previous system is kept accessible, say until when it stays available and who keeps it and how to open it. Without it nobody could find the history during an inspection.” Save. The Keep until field is calculated on its own: with the period ending on 31/12/2025, it became 31/12/2035. Without the period, it will not save (“Some required fields are empty.”). Attach the previous program's SAF-T files in Old SAF-T and files: each one gets a fingerprint (SHA-256) and cannot be deleted before the deadline.
  4. To bring in receipts and delivery notes, click Load receipts and guides. In What to load, choose CSV file, choose the file and click Load. The other two choices are SAF-T of the previous system and PDF files only.
  5. The window reports on the load: “Rows read: 6. Added: 4. Already loaded (skipped): 0. … Invalid (left out): 2.” and lists each invalid line and the repeated numbers. Click Open the load to see what came in. Nothing is corrected: what the previous program had stays as it was. If the same file is loaded again, the 4 lines are “Already loaded (skipped): 4” and nothing is duplicated.
  6. To link the PDFs, repeat step 4 with PDF files only and a ZIP with files named by type and number (RG A_15.pdf). In the demo, a ZIP with 3 PDFs gave “PDFs received: 3. Linked to a line: 2. Not linked: 1. GT A_99.pdf: no line with this type and number”.
  7. Open Receipts and guides of the previous system to look them up: type, number, ATCUD, date, customer tax number (NIF) and name, value, PDF, and the Repeated number and Repeated ATCUD flags. The filters separate receipts, delivery notes, repeated ones and those without a PDF.

Expected result​

  • The history's journal entries can be looked up at any time and stay exactly as they came. Each one has the number HMIG/AAAA/nnnnn, the Migrated history journal and is not a certified document: it gets no new ATCUD or new signature and does not go into the invoicing SAF-T (only into the accounting one).
  • The archive has the retention deadline (10 years after the end of the period) and the list of old files with their fingerprint.
  • In the demo, the CSV load left 4 documents (2 receipts and 2 delivery notes) and the two receipts got a PDF. The two GT A 7 delivery notes were flagged as Repeated number, without change: “Repeated numbers (same type and number as another line; all kept, none corrected)”.
  • What loading a SAF-T file leaves in the list Pending validation on screen: loading a SAF-T from the previous system (reading Payments and MovementOfGoods and checking the schema) was not proven in this demo for lack of a test SAF-T.

Correct a journal entry in the history​

A journal entry in the history cannot be changed, reset to draft, cancelled or deleted, not even by the Administrator. Anyone who tries another way gets, for example: “O lançamento HMIG/2025/00001 (SEG-2025-06) não pode voltar a rascunho. Faz parte do histórico migrado do programa anterior e fica exatamente como veio, para todos os utilizadores, administradores incluídos (conservação legal de 10 anos, CIVA art. 52.º). Para o corrigir, estorne-o ou lance uma regularização nova; o original mantém-se.” (the entry cannot be reset to draft; it is part of the migrated history and stays exactly as it came, for every user including administrators, under the 10-year legal retention of VAT Code (CIVA), art. 52; to correct it, reverse it or post a new adjustment; the original remains). The same sentence says “não pode ser anulado” (cannot be cancelled) or “não pode ser alterado” (cannot be changed). When deleting: “The document "HMIG/2025/00001 (SEG-2025-06)" must be kept until 31/12/2035 …”.

What the message asks for (reversing) is done through the import: in Import journal entries, with the Reversal of (HMIG/2025/00001) and Reversal reason (for example price_error) columns, with the reversal date in an open period. In the demo, the file created a new draft journal entry of €240.00 and the original stayed intact. Alternatively, post a new adjustment with today's date. Pending validation by a certified accountant: the SAF-T reversal reason to use to correct a history journal entry.

Important notes​

  • This archive is for consultation only. It does not replace the copy of the original SAF-T files and PDFs, which the certified accountant must keep for the legal period.
  • Without permission: Administrative does not find the menus. Accountant and Auditor only have read access to these records (checked in the permissions, not on screen with those profiles).

Common problems​

I do not see the Migrated history menu​

  • Cause: the database has no migrated journal entries yet, or your profile is not one of the three that see it (Accountant, Certified accountant and Auditor).
  • What to do: import the history in Import journal entries.

The Migrated history list is empty​

  • Symptom: no journal entry appears.
  • Cause: the migrated journal entries are in another company (the list follows the active company), or this company has not yet imported any with the Migrated history option.
  • What to do: check the company in the top right corner and, if needed, import the history in Import journal entries.

“Some required fields are empty”​

  • Symptom: when saving a Previous system archive, the screen says “Some required fields are empty. Fill in the fields marked in red to be able to save.” and highlights Period from and Period to.
  • What to do: fill in both dates, which determine Keep until.

Invalid lines in the receipts and delivery notes load​

  • Symptom: “Invalid (left out): 2” with “linha 5 (CSV line 6): amount “abc” is not a number” and “linha 6 (CSV line 7): type “XX” is not a receipt or a guide”. The number in brackets is the line in the file, counting the header.
  • What to do: correct those lines in a new file, containing only them, and load it: those that already went in are “Already loaded (skipped)”.

PDF “not linked”​

  • Symptom: “Not linked: 1. GT A_99.pdf: no line with this type and number”.
  • What to do: check the PDF name against the type and number in the receipts and delivery notes list (GT A_7.pdf for delivery note GT A 7).