Odoo Help

0

Testing setup - "reset" all confirmed invoices to draft state in order to revalidate again on same database [Closed]

By
Bole
on 7/11/14, 3:53 AM 1,200 views

The Question has been closed for reason: not relevant or out dated

by
Bole
on 01/14/2015 08:05:32

In order to test accounting and  taxes setup i have entered and confirmed dozen of purchase and sale invoices,
for every tax example and validated all of them. If the result is not satisfying i need to make some changes in setup of taxes or account chart or fiscal positions. I do not want to create new database for each testing circle, instead i need to "reset" all confirmed invoices back to draft state while preserving entered data (lines, fiscal positions, partner data etc)

I tried running this sql:


delete from account_move_line;
update account_invoice set
    state='draft',
    move_id=Null,
    number=Null,
    date_invoice=Null,
    date_due=Null,
    amount_tax=0,
    internal_number=Null,
    residual=0.0,
    move_name=Null,
    period_id = Null;
delete from account_invoice_tax;
delete from account_move;
delete from wkf_instance;

After runnig this sql i'm able to (re) validate sales invoice 
but purchase invoices are not validated (no number assigned, no moves created)

Am I missing something that needs to be cleared in order to validate purchase invoices?
any help would be appriciated

 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/11/14, 3:53 AM
Seen: 1200 times
Last updated: 3/16/15, 8:10 AM