Odoo Help

Welcome!

This community 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.

2

Binary field size of the field

By
John
on 5/6/13, 7:02 AM 2,732 views

Hello,

When we select a file into a binary field, we only have a litle text zone to see the name of the file we just selected. Is it posible to increase the size of this?

thanks

Hello, I thinks I didn't explain how I should. When I said "size" I 'm talking about the view size, I 'd like to post a picture to explain it, but this stupid karma prevent me to post one ( -___- ).

So I have this for my binary field:

fname-Select-Save As-Clear and I 'd like to have this: fname spacespacespacespace-rest of button binary field

If someone understand I know how can I make this or if is it possible,

great thanks!

John
on 5/7/13, 5:32 AM
4

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/7/13, 5:42 AM

in __openerp__.py add line

'css':['static/src/css/field_binary_css.css',],

in directory my_module/static/src/css/ add a file field_binary_css.css

 .field_binary {
    width: 150px;//define the width here
   }

Thank you a lot! By chance, do you know how I could hide the "save as" and "clear" of this binary field? Actually I just need the "select" and it ll be great if it was possible

John
on 5/7/13, 5:55 AM

in file web/static/src/xml/base.xml comment lines : from line 1249 to 1262

Borni DHIFI
on 5/7/13, 6:13 AM
0
John
On 5/7/13, 5:20 AM

Hello, first thanks for your answer, i didn't know this and I always like learning new things. However I thinks I didn't explain how I should. When I said "size" I 'm talking about the view size, I 'd like to post a picture to explain it, but this stupid karma prevent me to post one ( -___- ).

So I have this for my binary field:

fname-Select-Save As-Clear and I 'd like to have this: fname spacespacespacespace-rest of button binary field

If someone understand I know how can I make this or if is it possible,

great thanks!

This should not be as an answer John ..it should be as a comment plus improvement on your question.

Naresh Soni (nch)
on 5/7/13, 5:29 AM
0

Naresh Soni (nch)

--Naresh Soni (nch)--
Tiny ERP Pvt Ltd
http://www.odoo.com
1281
| 2 2 4
India
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 5/7/13, 4:17 AM

Hi John,

The field (datas_fname) in ir.attachment model that stores the file name is of type char and has size 256 where as the content of the file is stored in db_datas which is of type binary in OpenERP and of type bytea in postgres.The storage size for such type are 4 bytes plus the actual binary string. A Good Documentation is here Bytea

Thanks,

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/6/13, 7:02 AM
Seen: 2732 times
Last updated: 3/16/15, 8:10 AM