diff --git a/__init__.py b/__init__.py index 6e02e439be..2a597bdc0d 100644 --- a/__init__.py +++ b/__init__.py @@ -28,5 +28,4 @@ from category import * from partner import * from country import * -from state import * from address import * diff --git a/__tryton__.py b/__tryton__.py index 5dc8d278aa..7091f89846 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -10,6 +10,7 @@ "xml" : [ "category.xml", "partner.xml", + "country.xml", "address.xml", ], } diff --git a/address.py b/address.py index 1244d0d794..e03b78600b 100644 --- a/address.py +++ b/address.py @@ -19,10 +19,10 @@ class Address(OSV): zip = fields.Char('Zip', change_default=True, size=24, states=STATES) city = fields.Char('City', size=128, states=STATES) - state = fields.Many2One("partner.state", 'State', - domain="[('country_id','=',country_id)]", states=STATES) country = fields.Many2One('partner.country', 'Country', states=STATES) + state = fields.Many2One("partner.country.state", 'State', + domain="[('country', '=', country)]", states=STATES) email = fields.Char('E-Mail', size=64, states=STATES) phone = fields.Char('Phone', size=64, states=STATES) fax = fields.Char('Fax', size=64, states=STATES) diff --git a/address.xml b/address.xml index ff0aeda1a5..22b68f2876 100644 --- a/address.xml +++ b/address.xml @@ -30,25 +30,30 @@