Skip to Content

Contributors

How to import old invoices from legacy system

Hello,

I would kindly ask if there is some guide on how to import old invoices from a legacy system. These were processed and paid long time ago so I just need them to be able to see customers' history. However accounting features get in my way when I attempt to import Journal Items (account.move.line) saying "Cannot create unbalanced entry". I guess this has to do with Journal Entries (not) being created as they'd normally do.

Is there a way to do this somewhat easily? Or should I better map the data into Sale Orders? Any advice is greatly welcomed.

Thank you. Best regards

	Radovan Skolnik



by Radovan Skolnik - 11:25 - 9 Jun 2022

Follow-Ups

  • Re: How to import old invoices from legacy system
    I dealt with importing at scale and it did not work well. Though I was able to import and get all the lines, etc. but then balancing tax ids and numbers was a really a challenge and we gave up at the end. I like David's approach of creating your own model and just move the meta data for reporting purposes and not use account.move.

    Regards,
    Vishal Mehra

    cell: (972) 853-1805

    BizAlytics Consulting
    Analyzing Your Business for Success


    On Thu, Jun 9, 2022 at 11:22 AM David Beal <david.beal@akretion.com> wrote:
    Hi Radovan,

    I think that a good approach to bring legacy data in Odoo is to create a model like in your case account.move.imported or account.invoice.imported.
    In this table you'll create some of important fields to use for comparison with new data.
    Don't set too many constraints on these fields even if you can setup many2one.

    After imported data, you can create sql views (query in init function of the new model including the 2 previous ones) in which you can aggregate the two models with Union sql

    With this you can have real statistics on whole history without too many headaches on import

    You may customize functions used in Smart Buttons to have a real count or create new ones to have the 2 stats

    My 2 cents.

    Regards

    David BEAL
    Consultant ERP Odoo


    Le jeu. 9 juin 2022 à 14:02, Dominique k <dominique.k@elico-corp.com.sg> a écrit :
    importing old and paid invoices is complicated.

    you need to import invoices
    and the payment entries. then you would need to reconcile them. consequently, they won't appear any longer in your list of unpaid invoices

    next you need to reverse them: let me explain. as you enter old invoices, they would generate revenue and the yearly balance will go to accumulated profit on the balance sheet. But this will be double counted when you will import your actual opening accounting balances. so.. the easiest method would be to reverse (to zero-ise) the entries so that you start with a clean balance sheet.

    hope this helps

    On Thu, 9 Jun 2022 at 6:27 PM, Radovan Skolnik <radovan@skolnik.info> wrote:
    That makes sense but I guess this will enter into "accounting" and affect many 
    things (accounting-wise). These are invoices spanning more than 15 years and 
    have been "processed" (for the lack of better term on my side). Also not sure 
    I am able to create those balanced entries. So I guess I'd stick with Sale 
    Orders.
    
    Best regards
    
    	Radovan
    
    On štvrtok 9. júna 2022 12:17:26 CEST Pedro M. Baeza (Tecnativa) wrote:
    
    
    
    
    > You have to create the whole `account.move` with `line_ids` one2many totally
    
    
    
    
    > filled and balanced.
    
    
    
    
    > 
    
    
    
    
    > 
    
    
    
    
    > Regards.
    
    
    
    
    > 
    
    
    
    
    > 
    
    
    
    
    > _______________________________________________
    
    
    
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15
    
    
    
    
    > Post to: mailto:contributors@odoo-community.org
    
    
    
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    --
    Dominique KON-SUN-TACK  [Project Manager]
    Odoo Gold Partner, best Odoo Partner 2014 for APAC

    Mobile: + 65 8502 2399
    Skype: dominique_elico


    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Vishal Mehra - 12:51 - 9 Aug 2022
  • Re: How to import old invoices from legacy system
    Hi Radovan,

    I think that a good approach to bring legacy data in Odoo is to create a model like in your case account.move.imported or account.invoice.imported.
    In this table you'll create some of important fields to use for comparison with new data.
    Don't set too many constraints on these fields even if you can setup many2one.

    After imported data, you can create sql views (query in init function of the new model including the 2 previous ones) in which you can aggregate the two models with Union sql

    With this you can have real statistics on whole history without too many headaches on import

    You may customize functions used in Smart Buttons to have a real count or create new ones to have the 2 stats

    My 2 cents.

    Regards

    David BEAL
    Consultant ERP Odoo


    Le jeu. 9 juin 2022 à 14:02, Dominique k <dominique.k@elico-corp.com.sg> a écrit :
    importing old and paid invoices is complicated.

    you need to import invoices
    and the payment entries. then you would need to reconcile them. consequently, they won't appear any longer in your list of unpaid invoices

    next you need to reverse them: let me explain. as you enter old invoices, they would generate revenue and the yearly balance will go to accumulated profit on the balance sheet. But this will be double counted when you will import your actual opening accounting balances. so.. the easiest method would be to reverse (to zero-ise) the entries so that you start with a clean balance sheet.

    hope this helps

    On Thu, 9 Jun 2022 at 6:27 PM, Radovan Skolnik <radovan@skolnik.info> wrote:
    That makes sense but I guess this will enter into "accounting" and affect many 
    things (accounting-wise). These are invoices spanning more than 15 years and 
    have been "processed" (for the lack of better term on my side). Also not sure 
    I am able to create those balanced entries. So I guess I'd stick with Sale 
    Orders.
    
    Best regards
    
    	Radovan
    
    On štvrtok 9. júna 2022 12:17:26 CEST Pedro M. Baeza (Tecnativa) wrote:
    
    
    
    > You have to create the whole `account.move` with `line_ids` one2many totally
    
    
    
    > filled and balanced.
    
    
    
    > 
    
    
    
    > 
    
    
    
    > Regards.
    
    
    
    > 
    
    
    
    > 
    
    
    
    > _______________________________________________
    
    
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15
    
    
    
    > Post to: mailto:contributors@odoo-community.org
    
    
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    --
    Dominique KON-SUN-TACK  [Project Manager]
    Odoo Gold Partner, best Odoo Partner 2014 for APAC

    Mobile: + 65 8502 2399
    Skype: dominique_elico


    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by David BEAL - 06:20 - 9 Jun 2022
  • Re: How to import old invoices from legacy system
    importing old and paid invoices is complicated.

    you need to import invoices
    and the payment entries. then you would need to reconcile them. consequently, they won't appear any longer in your list of unpaid invoices

    next you need to reverse them: let me explain. as you enter old invoices, they would generate revenue and the yearly balance will go to accumulated profit on the balance sheet. But this will be double counted when you will import your actual opening accounting balances. so.. the easiest method would be to reverse (to zero-ise) the entries so that you start with a clean balance sheet.

    hope this helps

    On Thu, 9 Jun 2022 at 6:27 PM, Radovan Skolnik <radovan@skolnik.info> wrote:
    That makes sense but I guess this will enter into "accounting" and affect many 
    things (accounting-wise). These are invoices spanning more than 15 years and 
    have been "processed" (for the lack of better term on my side). Also not sure 
    I am able to create those balanced entries. So I guess I'd stick with Sale 
    Orders.
    
    Best regards
    
    	Radovan
    
    On štvrtok 9. júna 2022 12:17:26 CEST Pedro M. Baeza (Tecnativa) wrote:
    
    
    > You have to create the whole `account.move` with `line_ids` one2many totally
    
    
    > filled and balanced.
    
    
    > 
    
    
    > 
    
    
    > Regards.
    
    
    > 
    
    
    > 
    
    
    > _______________________________________________
    
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15
    
    
    > Post to: mailto:contributors@odoo-community.org
    
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe

    --
    Dominique KON-SUN-TACK  [Project Manager]
    Odoo Gold Partner, best Odoo Partner 2014 for APAC

    Mobile: + 65 8502 2399
    Skype: dominique_elico



    by dominique.k - 02:00 - 9 Jun 2022
  • Re: How to import old invoices from legacy system
    That makes sense but I guess this will enter into "accounting" and affect many 
    things (accounting-wise). These are invoices spanning more than 15 years and 
    have been "processed" (for the lack of better term on my side). Also not sure 
    I am able to create those balanced entries. So I guess I'd stick with Sale 
    Orders.
    
    Best regards
    
    	Radovan
    
    On štvrtok 9. júna 2022 12:17:26 CEST Pedro M. Baeza (Tecnativa) wrote:
    
    > You have to create the whole `account.move` with `line_ids` one2many totally
    
    > filled and balanced.
    
    > 
    
    > 
    
    > Regards.
    
    > 
    
    > 
    
    > _______________________________________________
    
    > Mailing-List: https://odoo-community.org/groups/contributors-15
    
    > Post to: mailto:contributors@odoo-community.org
    
    > Unsubscribe: https://odoo-community.org/groups?unsubscribe
    
    
    
    
    

    by Radovan Skolnik - 12:26 - 9 Jun 2022
  • Re: How to import old invoices from legacy system
    You have to create the whole `account.move` with `line_ids` one2many totally filled and balanced.

    Regards.

    by Pedro M. Baeza - 12:16 - 9 Jun 2022