Community mailing list archives

community@mail.odoo.com

Re: User defined fields on v9 don& amp; amp; amp; amp; #39; t show up in fields_get()

by
Mustafa Babiker El-Siddig Mustafa Hamad
- 01/05/2016 10:23:56

I had a similar issue therefore sticked to adding them to model in source code. You should have no issues that way

On Jan 5, 2016 6:07 PM, "Karlis Dreizis" <karlisdreizis@gmail.com> wrote:
Can you elaborate a bit please?
What would I do to get all the fields in the model? 
I intend to generate a view in the fields_view_get function, but it doesn't work fields_get doesn't return all the fields.

Karlis

On Tue, Jan 5, 2016 at 4:54 PM, Mustafa Hamad <mustafajava@gmail.com> wrote:

Hi

You guessed right. It is due to a change in api. A lot of other things changed as well from V8 to V9.

Mustafa

On Jan 5, 2016 5:43 PM, "Karlis Dreizis" <karlisdreizis@gmail.com> wrote:
It seems there is some inconsistent behavior between v8 and v9 custome defined fields

If you add fields to a model from the interface on v9.

Settings -> Database Structures -> Models -> Choose one -> Add field 

The new ir.mode.fields record is created with state base rather than manual. As consequence the fields_get() or self._columns, self, self_fields don't return said fields. 

Is this a bug? Or is there a change in API?

​Regards, 
Karlis.

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Ar cieņu,
Kārlis

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe