Skip to Content
Menu
This question has been flagged
2 Replies
3033 Views

I'm trying to import customer invoice with the template I've received with an export.


Here is my xls file :

partner_id/id                                __export__.res_partner_403

payment_term_id/id                    account.account_payment_term_net

invoice_line_ids/quantity               95

invoice_line_ids/product_id/id        __export__.product_product_3380_27c18c87

invoice_line_ids/id                            __export__.account_invoice_line_36206_0837b668

name                                                période test 5


I'm able to create a new invoice with it but with the field invoice_line_ids/id that use an existing id, it overwrites an existing invoice.

When I use the same file without importing invoice_line_ids/id, I get this error message: null value in column "name" violates not-null constraint DETAIL: Failing row contains (36221, 58, 2019-08-22 10:05:16.037967, 2019-08-22 10:05:16.037967, 58, null, null, null, null, 14877, null, null, null, null, 0.00, null, null, 3380, 10, 95.000, null, null, null, null, f, null). à la ligne 2


What is wrong in the file ? How can I import a new invoice ?

Avatar
Discard
Author Best Answer

But the name field is not required as it is not underlined in the export.. So why it as for it ?

It is ok to import  with those values and a line ID (that exists). Without the line ID, it is not ok anymore...

Do you have example of import file ?

Avatar
Discard
Best Answer

Hi,

The issue here is that for many of the required fields in the model you haven't supplied the value in the sheet, if just take an example name field is required in the account.invoice model and if you haven't given value for this field inside the file you will get the error messages.


So to fix this, you can do one thing, export all the fields which have required attribute in the corresponding model and use that file as template for the import. In the export screen you can see an underline for the required fields.


Thanks

Avatar
Discard
Related Posts Replies Views Activity
4
May 24
4863
2
Jan 23
3852
2
Jul 22
3249
1
Jul 21
2822
2
Mar 21
1638