Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
5061 Zobrazení

Hello buddy, In my custom module, i used the country dropdown box. Model is following.

class building(orm.Model): _name = 'building.building' _columns = { 'name': fields.char('Building Name', size=128, required=True), 'oname': fields.char('Owner Name', size=128, required=True), 'cat':fields.char('Category', size=128), 'flor':fields.char('Floor', size=128), 'num':fields.char('Number', size=128, required=True), 'street': fields.char('Street', size=128), 'street2': fields.char('Street2', size=128), 'block_id': fields.many2one("res.township.block", 'Block'), 'township_id': fields.many2one("res.city.township", 'Township'), 'zip': fields.char('Zip', change_default=True, size=24), 'city_id': fields.many2one("res.state.city", 'City'), 'state_id': fields.many2one("res.country.state", 'State'), 'country_id': fields.many2one('res.country', 'Country'), 'country': fields.related('country_id', type='many2one', relation='res.country', string='Country', deprecated="This field will be removed as of OpenERP 7.1, use country_id instead"),

        }
_defaults = {}

=====================================================================================

when i run the program, i click the Country drop downbox of Create and Edit fields. Show the follow picture. I don't know how to solve it.

Country Name : ----------------
Country Code : -------------------- Currency : ----------------

|--------------------------------------------------------------| |%(street)s | |%(street2)s | |%(city)s %(state_code)s %(zip)s | |%(country_name)s | |--------------------------------------------------------------|

Above Country name, Country code and Currency lines are showing the same in other modules. but my custom modules show the above.

Thank you.

Avatar
Zrušit
Autor

Sorry for your time. Now i solved the problem.