trytond-country_zip/configuration.py

24 lines
860 B
Python
Raw Permalink Normal View History

2018-01-23 17:18:06 +01: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.
2017-12-12 10:30:52 +01:00
from trytond.model import ModelSQL, fields
from trytond.model import ValueMixin
2013-03-21 17:54:19 +01:00
from trytond.pool import PoolMeta
2017-12-12 10:30:52 +01:00
from trytond.modules.party.configuration import _ConfigurationValue
2013-03-21 17:54:19 +01:00
2017-12-12 10:30:52 +01:00
__all__ = ['Configuration', 'ConfigurationCountry']
default_country = fields.Many2One('country.country', 'Default Country')
2013-03-21 17:54:19 +01:00
2013-04-30 13:45:14 +02:00
2018-09-15 18:09:06 +02:00
class Configuration(metaclass=PoolMeta):
2013-03-21 17:54:19 +01:00
__name__ = 'party.configuration'
2017-12-12 10:30:52 +01:00
default_country = fields.MultiValue(default_country)
class ConfigurationCountry(_ConfigurationValue, ModelSQL, ValueMixin):
'Party Configuration Country'
__name__ = 'party.configuration.default_country'
default_country = default_country
_configuration_value_field = 'default_country'