コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
1421 ビュー

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.

アバター
破棄
関連投稿 返信 ビュー 活動
0
11月 23
2458
1
1月 22
6809
0
4月 24
4054
0
3月 15
4423
0
3月 15
3449