Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
6761 Tampilan

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
Buang

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?

Penulis Jawaban Terbai

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
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
1
Mar 20
7822
0
Mei 20
3097
4
Mar 24
11569
0
Mar 15
5971