Odoo Help

1

0
2 Answers
1
Avatar

Shameem Babu @ iWesabe

--Shameem Babu @ iWesabe--
GLOBAL CREATIVE CONCEPTS TECH CO LTD
http://www.iwesabe.com
1520
| 6 3 9
KHOBAR, Saudi Arabia
--Shameem Babu @ iWesabe--

  

 iWesabe - ODOO ERP IMPLEMENTATION & CUSTOMIZATION SAUDI ARABIA.



For Queries : pks.shameem@gmail.com ,shameem@iwesabe.com

Activities     :    Youtube

                           Stackoverflow 

Experience

           iWesabe                                ◉

           Axon Communications        ❍

           Cybrosys Technologies        ❍


Shameem Babu @ iWesabe
10/27/16, 2:48 AM
You can solve your problem using following steps

Step 1: Create a Javascript File and call a python function when document is ready.

$(document).ready(function () {
//Call a Python function
//
});

Use what I explained you earlier  : https://www.odoo.com/forum/help-1/question/odoo-9-website-js-help-109603#answer-109604

Step 2: Return value of Image field in python function 

Step 3: Set Background image using JQuery.

Example

(new Model('your.model')).call('your_function').then(function (your_return_value) { 
     var image_format = 'url("data:image/gif;base64,'+ your_return_value +'")'
     //SET BACKGROUND IMAGE LIKE
     $(".oe_leftbar").css("background-image", image_format);
 });

All the Best  ! 


Ask a Question
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now