تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
3723 أدوات العرض

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 ?

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

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 ?

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 25
117
4
مايو 24
7035
2
يناير 23
5819
2
يوليو 22
4472
1
يوليو 21
4224