Odoo Hilfe

5

2
4 Antworten
5

Hi there,

With Odoo V8, you could use the class "oe_read_only" to display your label in read mode, and "oe_edit_only" in edit mode...

This is what I use and it's working fine.

13
Avatar

Parth Gajjar Indien

--Parth Gajjar--

3575
| 4 4 7
Gandhinagar, Indien
--Parth Gajjar--


Parth Gajjar Indien
17.04.13, 05:02

There is no inverse of oe_edit_only

But if you really needs to do that then you need to edit in css file

append this to in base.css file

.openerp .oe_form_editable .oe_save_only, .openerp .oe_form_editable .oe_form_field:empty {
  display: none !important;
}

then use class oe_save_only exactly like you use oe_edit_only

Hope This will Help :)

7 Kommentare
Attila Tatár Rumänien
17.04.13, 07:40

Thank you Parth, is working!

René Schuster Deutschland
17.12.13, 06:41

Thank you!!

This is really an important feature!

Soukaina SBITTI Marokko
10.03.14, 11:28

Please, could someone explain to me how to add a class to a field.i tried it but it shows me an XML architecture error.do i have to do something before using it?Thank you

Parth Gajjar Indien
11.03.14, 09:48

Add given css in base.css file of web and then just add class oe_save_only on field exactly like oe_edit_only

Soukaina SBITTI Marokko
11.03.14, 09:53

my problem is even the basic classes in base.css aren't recognized. when i write for example: <field name="somefield" class="oe_edit_only"> it gives me an error.i've tried everything i don't know what to do

Luis Filipe Castanheira Portugal
08.04.14, 09:19

Great answer! I was looking for this for a long time!

Parth Gajjar Indien
02.05.14, 08:57

@Soukaina Use version="7.0" on view declaration

0
Soukaina SBITTI Marokko
10.03.14, 11:28

Please, could someone explain to me how to add a class to a field.i tried it but it shows me an XML architecture error.do i have to do something before using it?Thank you

1 Kommentar
Sascha Pfeiffer Deutschland
03.11.14, 01:14

Like mentioned in the above comments, simply use version="7.0" before so something like:

0
Sascha Pfeiffer Deutschland
03.11.14, 01:16

Couldnt post a multiline comment so here is your solution @Soukaina SBITTI:


                <form string="Test" version="7.0">
                        <field name="a"/>
                        <field name="b"/>
                        <field name="c" class="oe_edit_only"/>
                </form>

Fragen Sie
Writer
Stichwörter
Keep Informed
1 Verfolger
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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now