Closed happilymarrieddad closed 5 years ago
Hi @happilymarrieddad !
All fields name have been "reworked" since Golang good practices says to use CamelCase (here fields are public so first letter as uppercase).
Odoo is python, so all is coded with snake_case, here ParentName
is parent_name
in Odoo.
So, when we call api, we have to use odoo rule (snake_case).
=> The fourth choice was good :-)
For your case:
If you want to modify parent_name
, you first got to link the partner with the parent of your choice (with parent_id
field), then parent_name
will appear with the parent_id.name
value ! (I've checked btw and it works this way :) )
Also, what is the point in the relations object? It doesn't seem to do anything. Thanks!
Relations is the representation in golang for more complicated objects like Many2One,Many2Many,One2Many etc...
Closing it ! Have a good day !
Antoine
@antony360 Hey thanks! I was able to get it to work by just exploring the db and using the column names. Not sure if that's helpful to anyone but I thought I would add that in case. Thanks again!
Hey guys,
I can create a partner with the API but I can't seem to create certain fields. Anytime there is a field with more than 1 word in it's name I can't ever get that field to be added. For example, if I want to create a partner then I can easily assign "name" to the map and that works but if I try
ParentName
then no matter what case I try it never works. Here are the cases I've triedIs there an example of a create with one of these fields that has more than 1 word in it? Thanks!
Here is the script I've been using (I removed my credentials... didn't see a point in including those)
Also, what is the point in the relations object? It doesn't seem to do anything. Thanks!