From: Marko Luther Date: Sun, 10 Mar 2024 15:33:29 +0000 (+0100) Subject: Add SpecifiedLegalOrganization (#28) X-Git-Tag: 2.4.0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3171067e2fe9cc9bc7c8f7536b6e0b81b49d9e22;p=thirdparty%2Fpython-drafthorse.git Add SpecifiedLegalOrganization (#28) * adds SpecifiedLegalOrganization * fixes typo * adjusted the documentation of LegalOrganization fit for sellers and buyers * LegalOrganization.id needs to be an IDField * black * updates descriptions * fixes sequence order * Update drafthorse/models/party.py * Update drafthorse/models/party.py --------- Co-authored-by: Raphael Michel --- diff --git a/drafthorse/models/party.py b/drafthorse/models/party.py index efc96bc..c6ae5a7 100644 --- a/drafthorse/models/party.py +++ b/drafthorse/models/party.py @@ -59,6 +59,22 @@ class EmailURI(Element): tag = "EmailURIUniversalCommunication" +class LegalOrganization(Element): + id = IDField(NS_RAM, "ID", required=False, profile=BASIC) + trade_name = StringField( + NS_RAM, + "TradingBusinessName", + required=False, + profile=BASIC, + _d="Firmenname, sofern abweichend vom Namen", + ) + trade_address = Field(PostalTradeAddress, required=False, profile=EXTENDED) + + class Meta: + namespace = NS_RAM + tag = "SpecifiedLegalOrganization" + + class TradeContact(Element): person_name = StringField(NS_RAM, "PersonName", required=False, profile=EXTENDED) department_name = StringField( @@ -75,31 +91,42 @@ class TradeContact(Element): class TradeParty(Element): id = StringField( - NS_RAM, "ID", required=False, profile=COMFORT, _d="Identifier des Verkäufers" + NS_RAM, "ID", required=False, profile=COMFORT, _d="Kennung des Handelspartners" ) global_id = MultiIDField( NS_RAM, "GlobalID", required=False, profile=COMFORT, - _d="Globaler Identifier des Verkäufers", + _d="Globale Kennung des Handelspartners", ) name = StringField(NS_RAM, "Name", required=False, profile=BASIC) - # TODO: SpecifiedLegalOrganization description = StringField( NS_RAM, "Description", required=True, profile=COMFORT, - _d="Freitext der Zahlungsbedingungen", + _d="Zusätzliche rechliche Informationen des Handelspartners", + ) + legal_organization = Field( + LegalOrganization, + required=False, + profile=BASIC, + _d="Handelsinformationen des Handelspartners", ) contact = Field( - TradeContact, required=False, profile=EXTENDED, _d="Ansprechpartner des Käufers" + TradeContact, + required=False, + profile=EXTENDED, + _d="Ansprechpartner des Handelspartners", ) address = Field( - PostalTradeAddress, required=False, profile=BASIC, _d="Anschrift des Käufers" + PostalTradeAddress, + required=False, + profile=BASIC, + _d="Anschrift des Handelspartners", ) - electronic_adress = MultiField( + electronic_address = MultiField( URIUniversalCommunication, required=False, profile=BASIC ) tax_registrations = MultiField(TaxRegistration, required=False, profile=BASIC)