Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3072 Представления

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. 

Аватар
Отменить
Related Posts Ответы Просмотры Активность
7
авг. 20
6945
1
янв. 23
9056
0
апр. 20
3958
1
нояб. 19
3026
8
мая 24
48412