Commit 79807059 authored by Florian Duguet's avatar Florian Duguet Committed by Vincent A

CapProfile: Add PostalAddress to Profile to return a more detailed address

parent 9d24974a
......@@ -17,8 +17,8 @@
# You should have received a copy of the GNU Lesser General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from .base import Capability, BaseObject, DecimalField, StringField, UserError
from .address import PostalAddress, compat_field
from .base import Capability, BaseObject, DecimalField, StringField, UserError, Field
from .date import DateField
__all__ = ['Profile', 'Person', 'Company', 'CapProfile']
......@@ -35,7 +35,7 @@ class Profile(BaseObject):
Profile.
"""
name = StringField('Full name or company name')
address = StringField('Full Address')
postal_address = Field('Postal address of owner', PostalAddress)
country = StringField('Country of owner')
phone = StringField('Phone number')
professional_phone = StringField('Professional phone number')
......@@ -43,6 +43,8 @@ class Profile(BaseObject):
professional_email = StringField('Professional email of owner')
main_bank = StringField('Main bank of owner')
address = compat_field('postal_address', 'full_address')
class Person(Profile):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment