trytond-country_zip/country.py

19 lines
568 B
Python
Raw Normal View History

2012-06-12 10:49:05 +02:00
# -*- encoding: utf-8 -*-
2012-07-18 11:01:45 +02:00
#This file is part country_zip module for Tryton.
#The COPYRIGHT file at the top level of this repository contains
#the full copyright notices and license terms.
2012-06-12 10:49:05 +02:00
from trytond.model import ModelView, ModelSQL, fields
2012-10-09 08:52:39 +02:00
__all__ = ['CountryZip']
2012-06-12 10:49:05 +02:00
class CountryZip(ModelSQL, ModelView):
"Country Zip"
2012-10-09 08:52:39 +02:00
__name__ = "country.zip"
2012-06-12 10:49:05 +02:00
zip = fields.Char('Zip', required=True, select=1)
city = fields.Char('City', select=1)
subdivision = fields.Many2One('country.subdivision', 'Subdivision',
ondelete='CASCADE', select=1)