def buildParentFields(self): FieldFactory.create( ObjectsHelper.encode("ThirdParty", const.__SPL_T_ID__), "parent_id", "Parent") FieldFactory.microData("http://schema.org/Organization", "ID") if self.name is "Address": FieldFactory.isRequired()
def buildNameFields(self): FieldFactory.create(const.__SPL_T_VARCHAR__, "legal", "Legal Name") FieldFactory.microData("http://schema.org/Organization", "legalName") FieldFactory.isRequired() # ==================================================================== # FieldFactory.create(const.__SPL_T_VARCHAR__, "last", "Last Name") FieldFactory.microData("http://schema.org/Person", "givenName") FieldFactory.association('first') # ==================================================================== # FieldFactory.create(const.__SPL_T_VARCHAR__, "first", "First Name") FieldFactory.microData("http://schema.org/Person", "familyName")
def buildBinaryFields(self): # Walk on Model Binary Fields Definitions for fieldId, field in self.get_binary_fields_list().items(): # Build Splash Field Definition FieldFactory.create(self.__BinaryTypes__[field["type"]], fieldId, field["string"]) FieldFactory.group("Others") FieldFactory.isReadOnly() if field["required"] or fieldId in self.get_required_fields(): FieldFactory.isRequired() if field["readonly"]: FieldFactory.isReadOnly() if 'help' in field: FieldFactory.description(field["help"])
def buildOrderCoreFields(self): # ==================================================================== # # Order Final Customer FieldFactory.create( ObjectsHelper.encode("ThirdParty", const.__SPL_T_ID__), "partner_id", "Customer") FieldFactory.microData("http://schema.org/Organization", "ID") FieldFactory.group("General") FieldFactory.isRequired() # ==================================================================== # # Order Billing Address FieldFactory.create( ObjectsHelper.encode("Address", const.__SPL_T_ID__), "partner_invoice_id", "Invoice Address") FieldFactory.microData("http://schema.org/Order", "billingAddress") FieldFactory.group("General") FieldFactory.isRequired() # ==================================================================== # # Order Shipping Address FieldFactory.create( ObjectsHelper.encode("Address", const.__SPL_T_ID__), "partner_shipping_id", "Shipping Address") FieldFactory.microData("http://schema.org/Order", "orderDelivery") FieldFactory.group("General") FieldFactory.isRequired() # ==================================================================== # # Order Date FieldFactory.create(const.__SPL_T_DATE__, "date_order", "Order Date") FieldFactory.microData("http://schema.org/Order", "orderDate") FieldFactory.group("General") FieldFactory.isRequired()