Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
6751 Vistas

Right now I'm entering general information for my company (settings --> companies; click on company name and get http://localhost:8069/web?debug=assets#id=1&view_type=form&model=res.company&menu_id=69&action=51). 

It shows "field:state_id, object: res.company, relation: res.country.state" in debug info. 

When I create a new state it seems to be creating a new fed.state where I would enter state_name, state_code and country. 

So, I would simply like the field "state_id" to display state_code and not state_name from fed.state. 

When I enter customers and suppliers I will want to do the same thing. 

I had thought of deleting the fed.state records in question and creating new ones where both state_name and state_code were the abbreviations (since the constraints don't allow more than one record with the same state_code), or just edit the existing fed.state records and change the state_name to be the same value as in state_code (how would I do this?). 

I also would like to make ONE change to cover ALL situations where I enter address info (including headers and footers.)

Can anyone help? 

Thanks.

Avatar
Descartar

Don't you believe that a clearly formatted posting could people motivate better to help you? And did you realize that we have no access to your localhost? If you want to improve your chances to get help you should invest a minimum of efforts.

Why do you want to make this change (just curious because often knowing could help suggest a solution). Do you want this change in the User Interface? Reports?

Autor Mejor respuesta

OK, since no one answered my question I took a serious step of using PGAdmin III to expand the schema and found res.country.state table.  I modified the entry for Pennsylvania's row (ID 47) and changed the "name" column value to PA (the same as the value in the "code" column.  It allowed me to do it (no constraints) and now when I enter company info I can enter PA instead of the entire state name.  I don't know if this is a valid way to accomplish my wish because I don't yet know where else the full name would have been propagated and thus have an invalid backward link to this table, but I will keep working with it and see if anything falls out.

Avatar
Descartar
Autor

Well, I've seen no negative impact by changing the data, so I'll say it was a good idea.

Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 20
7821
0
may 20
3094
4
mar 24
11563
0
mar 15
5961