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

Hey Guys hope you all doing well,

So what im trying to do by this code is to add attachements (Mainly multiple images) to records of my custom module through Odoo's API .

$models->execute_kw(
    $db, $uid, $password,
    'ir.attachment',
    'create', // Function name
    array( // Values-array
    array( // First record
        'res_model'=>'edm_app.fuite',
        'name' => 'image.png',
        'datas_fname' => 'image.png',
        'res_id'=> 11,
        'res_name' => 'Fuite 5',
        'type' => 'binary',
        'datas' => 'iVBORw0KGgoAAAA... ' // base 64 string of the image
        )
    )
);

 

The image gets inserted to the postgreDb but i can't see it in the record form view. 

アバター
破棄
関連投稿 返信 ビュー 活動
7
8月 20
6947
1
1月 23
9063
0
4月 20
3962
1
11月 19
3027
8
5月 24
48417