Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3126 Weergaven

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. 

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
7
aug. 20
6987
1
jan. 23
9114
0
apr. 20
4004
1
nov. 19
3040
8
mei 24
48437