Odoo Help

Welcome!

This community 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.

3

Import purchase history

By
Nikolaj
on 2/22/13, 6:28 AM 1,884 views

I am trying to import our purchase history using the built in .CSV import tool, however when I import purchase.order it sets the PO to a draft invoice. I do not see an option to set them as done - other than validating the invoice and receiving the products (which I do not want to do). I am not interested in having any accounting associated with this, I want the past POs in the system purely as reference.

-->

The user should be able to see the past purchases of a product (purchase.order.line) - This works fine.

The user should be able to view all historical purchase orders (purchase.order) set to done - at the moment when I import a PO it is always set to draft.

The user does not need to see the invoices, accounting or stock moves - these POs should be purely for reference.

How can this be done?

Edit - Should I be importing supplier invoices and lines rather than purchases?

(OE v7, Ubuntu 12.04)

1
arif
On 4/9/13, 7:07 AM

Since you need those purchase order only for reference, better to directly update its state to done by a invoking direct sql in database. You have to set 'done' for field 'state' in the table purchase_order.

This answer is to short for me. Can you be more specific or give an example?

ton123
on 4/9/13, 10:31 AM

If you use pgAdmin3 you can access the DB tables by opening your DB in the Object browser then navigating to Tables by expanding DB > Schemas > public > Tables. Find purchase_order in the list and edit away - I am just testing this method now. Thanks Arif!

Nikolaj
on 4/9/13, 1:19 PM

I ran an update script using pgAdmin3 which updated all states from 'draft' to 'done'. Here is a tutorial on SQL Update http://www.w3schools.com/sql/sql_update.asp

Nikolaj
on 4/9/13, 1:44 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/22/13, 6:28 AM
Seen: 1884 times
Last updated: 4/10/15, 5:59 AM