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

values = {

            'name': 'sample.txt',

            'datas_fname': 'sample.txt',

            'res_model': 'ir.ui.view',

            'res_id': False,

            'type': 'binary',

            'public': True,

            'datas': file_data.encode('utf8').encode('base64'),

        }


All the data are in one line even when I put \n on each line. someone suggested to decode it but I don't know how to decode.

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

Please tell me when you got the answer for this

الصورة الرمزية
إهمال
الكاتب

Hello! I got an answer to this, if your using linux, use \r\n instead of \n only. Because there are different way of doing next line depending on OS you use.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 17
5649
2
يونيو 16
9973
0
سبتمبر 17
5373
0
فبراير 16
5154
9
نوفمبر 19
11640