Skip to Content
Menu
This question has been flagged
5 Replies
10984 Views

Hi,

I am using Odoo 10 and struggling to automate purchase orders. Our purchase orders typically have very many order lines such that manually adding items to an order would be too time consuming. I have tried importing a csv and xlsx file, matching import fields correctly but the process fails when it comes to validation. I keep getting the error "null value in column "product_uom" violates non-null constraint DETAIL: Failing row contains"

Initially, I had not specified the "unit  of measure", only the quantities and was getting the error above. I added a column with Unit of measure indicated for each product but I am still getting the same error message.

How would this be resolved? Is there a template for importing purchase orders?

Avatar
Discard
Best Answer

 I have used the below columns in Odoo 11 and its working with me.



Avatar
Discard
Author Best Answer

Thanks for getting back to me!

That's a brilliant idea. I tried doing that but seems to fail. During the export of a sample purchase order, I select to produce an "import compatible export", select the order line fields I would need eg. product name, quantity, units, unit price, etc and export. The export files looks good with the different line items defined. 

I have tried editing the products and quantities but it fails. Even using the same products in the export with different quantities and date details fails. I keep getting the message that null value in column "price_unit" violates not-null constraint DETAIL: Failing row contains.

Have you experienced this before? I keep getting the same null value error message for different fields. Including the fields in the export/import is not resolving the problem.

Avatar
Discard
Author

I am able to import a previously exported purchase order. However, it is not quite intuitive as I cannot use our internal product codes. Is there any way I could just have a table of our internal product codes, quantities and product vendor and import this?

Best Answer

To import in any object (ex. sales, purchase,...) best way is first create one sample Sales order , Purchase order,... export it and then start your changes in that template. While exporting try to export required field to avoid this kind of situation.

Avatar
Discard

Eric,

i agree with @Pinakin, because i do the same thing and successfully imported the data to module.