Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find custom fields in object #143

Open
Juanchote opened this issue Aug 11, 2016 · 2 comments
Open

cannot find custom fields in object #143

Juanchote opened this issue Aug 11, 2016 · 2 comments

Comments

@Juanchote
Copy link

Hi i have created this ir.model.field:

#<IrModelFields:0x007f12abc66c08 @associations= {"write_uid"=>[1, "Administrator"], "create_uid"=>[1, "Administrator"], "model_id"=>[157, "Información de un proveedor de producto"], "groups"=>[], "serialization_field_id"=>false}, @attributes= {"domain"=>"[]", "select_level"=>true, "create_date"=>"2016-08-11 09:41:08", "write_date"=>"2016-08-11 09:41:08", "on_delete"=>"set null", "selection"=>nil, "relation"=>nil, "id"=>6271, "size"=>0, "display_name"=>"supplier cost price", "__last_update"=>"2016-08-11 09:41:08", "readonly"=>false, "state"=>"manual", "complete_name"=>nil, "relation_field"=>nil, "ttype"=>"float", "translate"=>false, "selectable"=>true, "name"=>"x_supplier_cost_price", "required"=>true, "modules"=>nil, "model"=>"product.supplierinfo", "field_description"=>"supplier cost price"},

and added the field into odoo forms and added some test value but when accessing the object i cannot find the custom field or any relation associated with that..

#<ProductSupplierinfo:0x007f12a719a7b0 @associations= {"create_uid"=>[1, "Administrator"], "pricelist_ids"=>[], "name"=>[27, "(test) Petsonline.com"], "product_uom"=>[1, "Unidad(es)"], "write_uid"=>[1, "Administrator"], "company_id"=>[1, "Simply EELP SL"], "product_tmpl_id"=>[4, "Cuidar Animales raros"]}, @attributes= {"create_date"=>"2016-07-21 14:53:35", "sequence"=>1, "__last_update"=>"2016-08-11 10:34:48", "qty"=>0.0, "id"=>4, "delay"=>1, "write_date"=>"2016-08-11 10:34:48", "display_name"=>"(test) Petsonline.com", "min_qty"=>0.0, "product_code"=>nil, "product_name"=>nil}, @changed_attributes={}, @ir_model_data_id=nil, @lazy=false, @loaded_associations={}, @marked_for_destruction=false, @persisted=true, @previously_changed={}, @skip=false>

is this an issue? i am missing anything from the doc?
:\

regards,
juanma.

@hachpai
Copy link

hachpai commented Jun 16, 2020

Same issue here. If i do a xmlrpc request in row I can get the field:
models.execute_kw(db, uid, password,'project.task', 'read', [5758],{'fields': ['x_what_ever']})
This is running on odoo 7.

@hachpai
Copy link

hachpai commented Jun 17, 2020

Just found a way to get my custom fields, you've to call reload_fields_definition on the model:
ProjectTask.reload_fields_definition(true)
Should be cool to document it ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants