Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1260 มุมมอง

I have a file named test.txt  and it is workspace Finance view under BSI\Inbox.

I want Python to move it to Finance BSI\Backups.

The file has id 220.



After much digging I see there is folder_id field in documents.document that shows as data [31, 'BSI / Inbox']

I attempted to move this file to another view folder with this code:


BUFLDR = '[33, \'BSI / Backups\']'


models.execute_kw(db, uid, password, 'documents.document', 'update', [[220],{'folder_id': (BUFLDR)}])

If I do a print BUFLDR I get:

[33, 'BSI / Backups']

Running the update I get an error saying Wrong Value and BUFLDR is processes as:

[33, \'BSI / Backups\']


How can I pass on the value in the correct format in order to move the file to another folder.



อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

I want to add if I remove the \ in front of the ' the line does not process with error cannot Marshall null value.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 23
1786
1
ม.ค. 22
6357
0
เม.ย. 24
3519
0
มี.ค. 15
3991
0
มี.ค. 15
3059