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.

0

how to add dynamically a field into a model through form?

By
ayda
on 10/4/16, 10:43 AM 155 views

Hi i am building a form with basic fields but i need to add dynamically other fields. How to ensure that the new fields will be updated in the concerned model. does an existing ORM api can ensure that??

Do you want to add a field (a table column in your database) or to hide/unhide an existed field?

It is possible to add a field dynamically through python code called by a form action but I suppose if you ask about it this will be too complicated for you.

Artem
on 10/4/16, 12:41 PM

I do not try it but the possibility exist due to python flexibility.

Artem
on 10/4/16, 12:42 PM
0

Bejaoui Souheil

--Bejaoui Souheil--
808
| 2 1 4
Sousse, Tunisia
--Bejaoui Souheil--

Odoo developer,  functional and technical consultant

souheil_bejaoui@hotmail.fr

Bejaoui Souheil
On 10/4/16, 1:38 PM

Hi,

Take a look at Settings -> Technical -> Database Structure -> Models. You will find all the models and you can add fields directly (with some limitation).

You can reproduce this on a other specific form view.

The source : https://github.com/odoo/odoo/blob/9.0/openerp/addons/base/ir/ir_model.py

Best regards

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

1 follower(s)

Stats

Asked: 10/4/16, 10:43 AM
Seen: 155 times
Last updated: 10/4/16, 1:38 PM