Odoo Help

0

0
7 Answers
4
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
25.08.16, 01:30

Try it

xml
<field name="picture" widget="image" class="Your_custom_class"/>
css
.openerp .Your_custom_class > img { 
    height: 90px; 
    width: 90px;
 }

Revised Answer (Forget above)

<style>
    .openerp .Your_custom_class > img { height: 6000px; width: 10000px; }
    .openerp .oe_form .oe_form_field_image img { max-width:656px; max-height: 1056px; }
</style>
<field name="picture" widget="image" class="Your_custom_class"/>



5 Comments
vx2008
25.08.16, 03:19

thank you for your help;

I have done according to your advice as below:

1. I create a file named "im.css" in /modules/static/src/css;

2. add the below code in "im.css"

.openerp .my_image > img {

height: 90px;

width: 90px;

}

3. open my .xml file and edit as below:

<field name="picture" widget="image" class="my_image"/>

4. restart my odoo-server;

I find nothing changed; maybe I do something wrong?

GLOBAL CREATIVE CONCEPTS TECH CO LTD, Shameem Babu @ iWesabe
25.08.16, 04:05

You should connect the css to your module in xml

<template id="assets_backend" inherit_id="web.assets_backend">

<xpath expr="." position="inside">

<link rel="stylesheet" href="/modules/static/src/css.im.css"/>

</xpath>

</template>

Then upgrade the module.

Or try following

<style>

.openerp .my_image > img {

height: 90px;

width: 90px;

}

</style>

vx2008
25.08.16, 04:50

Thank you very much, Shameem PKS;

I have done it according to your guiding;

But I still have a little problem about it as below:

if I set as "height: 90px;width: 90px;", the figure is very small; and so I set it as: "height: 600px;width:800px;", the picture is bigger; and then I set ti as: "height: 6000px;width: 10000px;", I find the picture is almost the same big as before( "height: 600px;width: 800px;",); in the fact I want to the picture can be in larger size; shall I?

GLOBAL CREATIVE CONCEPTS TECH CO LTD, Shameem Babu @ iWesabe
25.08.16, 05:38

You can solve your problem by adding few lines

.openerp .Your_custom_class > img {

height: 6000px;

width: 10000px;

}

.openerp .oe_form .oe_form_field_image img {

max-width:656px;

max-height: 1056px;

}

It is working in odoo9.

Note that it may be effected to other image fields.

vx2008
25.08.16, 08:36

Thank you very much; it is perfect!

good job, happy life!

0
Ruturaj Chavda
29.01.19, 23:53

Use the odoo inbuilt class 'oe_avatar'.

i.e., <field name="image" widget="image" class="oe_avatar"/>
(recommanded version 11.0)
 

Ask a Question
Writer
Tags
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