Ejemplo n.º 1
0
    def remove(invoice, payment):
        """
        Remove a Payment fom an Invoice

        :param invoice: account.invoice
        :param payment: account.payment

        :rtype: bool
        """
        try:
            # ==================================================================== #
            # Unit Tests - Ensure Invoice is Open (Default draft)
            if Framework.isDebugMode() and invoice.state == 'draft':
                invoice.action_invoice_open()
                invoice.refresh()
            # ====================================================================#
            # Unit Tests => Force Journal to Allow Update Posted
            if Framework.isDebugMode():
                payment.journal_id.update_posted = True
            # ====================================================================#
            # Cancel Payment
            if payment.state == "posted":
                payment.cancel()
            # ====================================================================#
            # Remove Payment
            invoice.payment_ids = [(3, payment.id, 0)]

            return True
        except Exception as exception:
            Framework.log().fromException(exception, False)
            return False
Ejemplo n.º 2
0
    def compare(price1, price2):
        """
        Compare Two Price Array
        :param price1: dict
        :param price2: dict
        :return: bool
        """
        # ==================================================================== #
        # Check Both Prices are valid
        if not PricesHelper.isValid(price1) or not PricesHelper.isValid(
                price2):
            Framework.log().error("Price Compare: Given Prices are invalid")
            if Framework.isDebugMode() and not PricesHelper.isValid(price1):
                Framework.log().dump(price1, " Price 1")
            if Framework.isDebugMode() and not PricesHelper.isValid(price1):
                Framework.log().dump(price2, " Price 2")

            return False
        # ==================================================================== #
        # Compare Base Price
        if bool(price1["base"]) != bool(price2["base"]):
            return False
        # ==================================================================== #
        # Compare Price Amounts
        return PricesHelper.compareAmounts(price1, price2)
Ejemplo n.º 3
0
def pack(rawdata, secured=True):
    """Package Splash Data before Transmission"""
    # Complete Message with System Information
    rawdata['debug'] = int(Framework.isDebugMode())
    rawdata['verbose'] = int(Framework.isDebugMode())
    # Complete Message with Log
    rawdata['log'] = Framework.log().export()
    # Encode Message to Xml
    xmlString = XmlManager.to_xml(rawdata)
    # Verify message is a string
    if not isinstance(xmlString, str):
        logging.error("Unable to convert Data to Xml")
        return False
    # Encode using correct method
    if secured is True:
        rawMessage = Encryption.encrypt(xmlString)
    else:
        rawMessage = str(base64.b64encode(xmlString.encode()), "UTF-8")

    # Verify message is a string
    if not isinstance(rawMessage, str):
        logging.error("Unable to Encrypt Xml String")
        return False

    return rawMessage
Ejemplo n.º 4
0
    def unlink_all_inventory_adjustment(product_id):
        """
        Delete All Product Inventory Adjustment so that it could be Deleted
        ONLY IN DEBUG MODE

        :param product_id: str|int
        :return: void
        """
        # ====================================================================#
        # Safety Check - ONLY In Debug Mode
        if not Framework.isDebugMode():
            return
        # ====================================================================#
        # Search for All Product Inventory Adjustments
        results = InventoryHelper.__get_inventory().search([("product_id", "=",
                                                             int(product_id))])
        # ====================================================================#
        # FORCED DELETE of All Product Inventory Adjustments
        for inventory in results:
            for inventory_move in inventory.move_ids:
                inventory_move.state = 'assigned'
                inventory_move._action_cancel()
                inventory_move.unlink()
            inventory.state = 'draft'
            inventory.action_cancel_draft()
            inventory.unlink()
        # ====================================================================#
        # Search for All Product Quantities
        results = InventoryHelper.__get_quants().sudo().search([
            ("product_id", "=", int(product_id))
        ])
        # ====================================================================#
        # FORCED DELETE of All Product Inventory Adjustments
        for quant in results:
            quant.unlink()
Ejemplo n.º 5
0
 def buildFeaturesFields(self):
     from odoo.addons.splashsync.helpers import TransHelper
     # ====================================================================#
     # Set default System Language
     FieldFactory.setDefaultLanguage(TransHelper.get_default_iso())
     # ====================================================================#
     # Walk on Available Attributes
     for attribute in ProductsFeatures.find_all():
         # ====================================================================#
         # Walk on Available Languages
         for iso_code, lang_name in TransHelper.get_all().items():
             # ==================================================================== #
             # Product Feature Field
             FieldFactory.create(const.__SPL_T_VARCHAR__, self.encode(attribute), attribute.display_name)
             FieldFactory.group("Features")
             FieldFactory.microData("http://schema.org/Product", attribute.name)
             # ==================================================================== #
             # Add Language Params
             FieldFactory.description("["+lang_name+"] "+attribute.display_name)
             FieldFactory.setMultilang(iso_code)
             # ==================================================================== #
             # Filter Variants Attributes During Tests
             if Framework.isDebugMode() and attribute.name in AttributesHelper.attr_test:
                 FieldFactory.isNotTested()
             if iso_code != TransHelper.get_default_iso():
                 FieldFactory.association(self.encode(attribute))
Ejemplo n.º 6
0
    def get_payment_code_names():
        """
        Get List of Available Payment Methods

        :return: List of Available Payment Methods
        :rtype: dict
        """
        # ====================================================================#
        # Execute Domain Search with Filter
        results = []
        methods = http.request.env["account.journal"].search(
            InvoicePaymentsHelper.__sales_types_filter, limit=50)
        # ====================================================================#
        # Parse results
        for method in methods:
            results += [
                (method.name,
                 "[%s] %s (%s)" % (method.code, method.name, method.type))
            ]
        # ====================================================================#
        # Add Default Value
        if not Framework.isDebugMode():
            results += [("Unknown", "[Unknown] Use default payment method")]

        return results
Ejemplo n.º 7
0
    def getVariantsFields(self, index, field_id):
        # ==================================================================== #
        # Check if this Variant Field...
        base_field_id = ListHelper.initOutput(self._out, "variants", field_id)
        if base_field_id is None:
            return
        # ==================================================================== #
        # Check if Product has Variants
        if not AttributesHelper.has_attr(self.object):
            self._in.__delitem__(index)
            return
        # ==================================================================== #
        # List Product Variants Ids
        for variant in self.object.with_context(
                active_test=False).product_variant_ids:
            # ==================================================================== #
            # Debug Mode => Filter Current Product From List
            if Framework.isDebugMode() and variant.id == self.object.id:
                continue
            # ==================================================================== #
            # Read Variant Data
            if base_field_id == "id":
                value = ObjectsHelper.encode("Product", str(variant.id))
            elif base_field_id == "sku":
                value = str(variant.code)
            ListHelper.insert(self._out, "variants", field_id,
                              "var-" + str(variant.id), value)

        self._in.__delitem__(index)
Ejemplo n.º 8
0
 def buildAttributesFields():
     # ====================================================================#
     # Set default System Language
     FieldFactory.setDefaultLanguage(TransHelper.get_default_iso())
     # ==================================================================== #
     # Product Variation Attribute Code
     FieldFactory.create(const.__SPL_T_VARCHAR__, "code", "Attr Code")
     FieldFactory.inlist("attributes")
     FieldFactory.microData(
         "http://schema.org/Product", "VariantAttributeCode"
         if Framework.isDebugMode() else "VariantAttributeName")
     FieldFactory.isNotTested()
     # ==================================================================== #
     # Product Variation Attribute Name
     FieldFactory.create(const.__SPL_T_VARCHAR__, "name", "Attr Name")
     FieldFactory.inlist("attributes")
     FieldFactory.isReadOnly()
     FieldFactory.isNotTested()
     if Framework.isDebugMode():
         FieldFactory.microData("http://schema.org/Product",
                                "VariantAttributeName")
     # ====================================================================#
     # Walk on Available Languages
     for iso_code, lang_name in TransHelper.get_all().items():
         # ==================================================================== #
         # Product Variation Attribute Code
         FieldFactory.create(const.__SPL_T_VARCHAR__, "value", "Attr Value")
         FieldFactory.description("[" + lang_name + "] Attr Value")
         FieldFactory.microData("http://schema.org/Product",
                                "VariantAttributeValue")
         FieldFactory.setMultilang(iso_code)
         FieldFactory.inlist("attributes")
         FieldFactory.isNotTested()
     # ==================================================================== #
     # Product Variation Attribute Extra Price
     if not SettingsManager.is_prd_simple_prices():
         FieldFactory.create(const.__SPL_T_DOUBLE__, "price_extra",
                             "Extra Price")
         FieldFactory.inlist("attributes")
         FieldFactory.microData(
             "http://schema.org/Product", "VariantAttributeCode"
             if Framework.isDebugMode() else "VariantExtraPrice")
         FieldFactory.isNotTested()
Ejemplo n.º 9
0
 def _set_status(self, new_state):
     """
     Really set Invoice Status
     :rtype: bool
     """
     # ====================================================================#
     # IS Cancel
     if new_state == 'cancel' and self.object.state in ['draft', 'open', 'in_payment', 'paid']:
         if Framework.isDebugMode():
             self.object.journal_id.update_posted = True
         self.object.action_invoice_cancel()
         self.object.refresh()
     # ====================================================================#
     # NOT Cancel
     if self.object.state == 'cancel' and new_state in ['draft', 'open', 'in_payment', 'paid']:
         self.object.action_invoice_draft()
         self.object.refresh()
     # ====================================================================#
     # IS Draft
     if new_state == 'draft':
         # ====================================================================#
         # TRY Validated => Cancel (Require Journal Update)
         if self.object.state in ['open', 'in_payment', 'paid']:
             if Framework.isDebugMode():
                 self.object.journal_id.update_posted = True
             self.object.action_invoice_cancel()
             self.object.refresh()
         # ====================================================================#
         # Cancel => Draft
         if self.object.state in ['cancel']:
             self.object.action_invoice_draft()
             self.object.refresh()
     # ====================================================================#
     # Draft => Open
     if self.object.state == 'draft' and new_state in ['open', 'in_payment', 'paid']:
         self.object.action_invoice_open()
         self.object.refresh()
     # ====================================================================#
     # Open => Paid
     if self.object.state == 'open' and new_state in ['in_payment', 'paid']:
         self.object.action_invoice_paid()
         self.object.refresh()
Ejemplo n.º 10
0
    def set_values(invoice, payment, payment_data):
        """
        Set values of Payments Line

        :param invoice: account.invoice
        :param payment: None|account.payment
        :param payment_data: dict
        :rtype: None|int
        """
        # ====================================================================#
        # Check if Payment Data are Valid
        if not InvoicePaymentsHelper.validate(payment_data):
            Framework.log().warn("Payment Data are incomplete or invalid")
            return None
        # ====================================================================#
        # Check if Payment Data are Modified
        if payment is not None and InvoicePaymentsHelper.compare(
                invoice, payment, payment_data):
            Framework.log().warn("Payments are Similar >> Update Skipped")
            return payment.id
        # ====================================================================#
        # Check if Invoice is Open
        if invoice.state != 'open' and not Framework.isDebugMode():
            Framework.log().error(
                "Payments cannot be processed because the invoice is not open!"
            )
            return None

        # ====================================================================#
        # Recreate Payment
        # ====================================================================#
        try:
            # ====================================================================#
            # Remove Payment Item
            if payment is not None:
                if not InvoicePaymentsHelper.remove(invoice, payment):
                    return None
                # DEBUG
                # else:
                #     Framework.log().warn("Payments Deleted >> "+payment.name)
            # ====================================================================#
            # Add Payment Item
            payment = InvoicePaymentsHelper.add(invoice, payment_data)
            # DEBUG
            # if payment is not None:
            #     Framework.log().warn("Payments Created >> "+payment_data["name"])
        except Exception as ex:
            # ====================================================================#
            # Update Failed => Line may be protected
            Framework.log().error(ex)
            return None

        return payment.id if payment is not None else None
Ejemplo n.º 11
0
    def __get_status_choices():
        """
        Get List Of Possible Order Status Choices

        :rtype: dict
        """
        response = []
        for status, name in InvoiceStatus.__known_state.items():
            if Framework.isDebugMode() and status in ['in_payment', 'paid']:
                continue
            response.append((InvoiceStatus.__known_state_trans[status], name))

        return response
Ejemplo n.º 12
0
    def is_travis_mode(object_type, action=None):
        """
        Check if Commit we Are in Travis Mode

        :param object_type: str             Object Type Name
        :param action: str                  Action Type (SPL_A_UPDATE, or SPL_A_CREATE, or SPL_A_DELETE)

        :rtype: bool
        """
        # ====================================================================
        # Detect Travis from Framework
        if not Framework.isDebugMode():
            return False

        return True
Ejemplo n.º 13
0
 def buildSupplierFields(self):
     # ==================================================================== #
     # Safety Check
     if "seller_ids" not in self.getModel().fields_get():
         return
     # ====================================================================#
     # First Supplier Name
     FieldFactory.create(const.__SPL_T_VARCHAR__, "supplier_name",
                         "Supplier Name")
     FieldFactory.microData("http://schema.org/Product", "supplierName")
     FieldFactory.addChoices(
         M2OHelper.get_name_values(SupplierHelper.vendorDomain,
                                   SupplierHelper.filter))
     FieldFactory.isNotTested()
     # ====================================================================#
     # First Supplier Price as Double
     FieldFactory.create(const.__SPL_T_DOUBLE__, "supplier_price_dbl",
                         "Supplier Price (Float)")
     FieldFactory.microData("http://schema.org/Product", "supplierPriceDbl")
     FieldFactory.association("supplier_name")
     # ==================================================================== #
     # First Supplier Price
     FieldFactory.create(const.__SPL_T_PRICE__, "supplier_price",
                         "Supplier Price")
     FieldFactory.microData("http://schema.org/Product", "supplierPrice")
     FieldFactory.isWriteOnly(Framework.isDebugMode())
     FieldFactory.isNotTested()
     # ====================================================================#
     # First Supplier SKU
     FieldFactory.create(const.__SPL_T_VARCHAR__, "supplier_sku",
                         "Supplier SKU")
     FieldFactory.microData("http://schema.org/Product", "mpn")
     FieldFactory.association("supplier_name", "supplier_price_dbl")
     # ====================================================================#
     # First Supplier MOQ
     FieldFactory.create(const.__SPL_T_INT__, "supplier_min_qty",
                         "Supplier MOQ")
     FieldFactory.microData("http://schema.org/Product", "supplierMinQty")
     FieldFactory.association("supplier_name", "supplier_price_dbl")
     # ====================================================================#
     # First Supplier Currency
     FieldFactory.create(const.__SPL_T_CURRENCY__, "supplier_currency",
                         "Supplier Currency")
     FieldFactory.microData("http://schema.org/Product", "supplierCurrency")
     FieldFactory.isNotTested()
Ejemplo n.º 14
0
    def delete(self, object_id):
        """Delete Odoo Object with Id"""
        try:
            invoice = self.load(object_id)
            if invoice is False:
                return True
            # ====================================================================#
            # Debug Mode => Force Order Delete
            if Framework.isDebugMode():
                if invoice.state not in ['draft', 'cancel']:
                    invoice.journal_id.update_posted = True
                    invoice.action_invoice_cancel()
                    invoice.action_invoice_draft()
                invoice.move_name = False
            invoice.unlink()
        except MissingError:
            return True
        except Exception as exception:
            return Framework.log().fromException(exception, False)

        return True
Ejemplo n.º 15
0
    def __create_for_debug(tax_rate, type_tax_use):
        """
        Create an Odoo Tax Rate For Debug

        :param tax_rate: float
        :param type_tax_use: str
        :rtype: account.tax
        """
        from splashpy import Framework
        if not Framework.isDebugMode():
            return None
        tax_data = {
            "amount": tax_rate,
            "amount_type": "percent",
            "company_id":
            http.request.env['res.company']._get_main_company().id,
            "name": "UNIT TESTS " + str(tax_rate) + "%",
            "type_tax_use": type_tax_use,
            "sequence": 1,
            "tax_group_id": 1,
        }
        return TaxHelper.getModel().create(tax_data)
Ejemplo n.º 16
0
    def set_binary_data(self, field_id, field_data, target):
        # ====================================================================#
        # Empty Value Received
        if not isinstance(field_data, dict) or field_data is None:
            self.setSimple(field_id, None, target)

            return
        # ====================================================================#
        # Compare Md5
        if field_data['md5'] == FilesHelper.md5(getattr(target, field_id), True):
            self._in.__delitem__(field_id)

            return
        # ====================================================================#
        # Read File from Server
        new_file = Files.getFile(
            field_data['file'] if not Framework.isDebugMode() else field_data['path'],
            field_data['md5']
        )
        if isinstance(new_file, dict) and "raw" in new_file:
            self.setSimple(field_id, new_file["raw"], target)
        else:
            Framework.log().error("Unable to read file from Server")
Ejemplo n.º 17
0
    def delete(self, object_id):
        """Delete Odoo Object with Id"""
        try:
            model = self.load(object_id)
            if model is False:
                return True
            # ====================================================================#
            # Safety Check - Order Delete Allowed
            if model.state != 'cancel':
                if Framework.isDebugMode():
                    model.state = 'cancel'
                else:
                    Framework.log().warn(
                        'You can not delete a sent quotation or a confirmed sales order. You must first cancel it.'
                    )
                    return True
            model.unlink()
        except MissingError:
            return True
        except Exception as exception:
            return Framework.log().fromException(exception)

        return True
Ejemplo n.º 18
0
    def add(invoice, payment_data):
        """
        Add a New Payment to an Invoice

        :param invoice: account.invoice
        :param payment_data: str

        :return: account.payment
        """
        # ====================================================================#
        # Detect Payment Method
        journal_id = InvoicePaymentsHelper.__detect_journal_id(
            payment_data["journal_code"])
        if journal_id is None:
            Framework.log().error(
                "Unable to detect Journal Id (Payment Method)")
            return None
        # ====================================================================#
        # Detect Payment Method Id
        payment_type = "inbound" if float(
            payment_data["amount"]) > 0 else 'outbound'
        payment_method_id = InvoicePaymentsHelper.__detect_payment_type(
            payment_type)
        if payment_method_id is None:
            Framework.log().error("Unable to detect manual payments method")
            return None
        # ====================================================================#
        # Detect Payment Date
        try:
            payment_date = datetime.strptime(payment_data["payment_date"],
                                             const.__SPL_T_DATECAST__).date()
        except:
            Framework.log().error("Unable to format payment date.")
            return None
        # ====================================================================#
        # Adjust Payment Amount
        payment_amount = InvoicePaymentsHelper.__adjust_payment_amount(
            invoice, payment_data["amount"])
        # ====================================================================#
        # Prepare Minimal Payment Data
        req_fields = {
            "invoice_ids": [invoice.id],
            "partner_id": invoice.partner_id.id,
            "partner_type": 'customer',
            "journal_id": journal_id,
            "name": payment_data["name"],
            "communication": payment_data["name"],
            "amount": payment_amount,
            "payment_date": payment_date,
            "payment_type": payment_type,
            "payment_method_id": payment_method_id,
            "state": "draft"
        }
        # ====================================================================#
        # Create Payment
        try:
            # ==================================================================== #
            # Unit Tests - Ensure Invoice is Open (Default draft)
            if Framework.isDebugMode() and invoice.state == 'draft':
                invoice.action_invoice_open()
                invoice.refresh()
            # ====================================================================#
            # Create Raw Payment
            payment = http.request.env["account.payment"].create(req_fields)
            # ====================================================================#
            # Add Payment to Invoice
            invoice.payment_ids = [(4, payment.id, 0)]
            # ====================================================================#
            # Validate Payment
            payment.post()

            return payment
        except Exception as exception:
            Framework.log().error(
                "Unable to create Payment, please check inputs.")
            Framework.log().fromException(exception, False)

            return None
Ejemplo n.º 19
0
    def buildPaymentsFields(self):
        """Build Invoice Payments Fields"""
        from odoo.addons.splashsync.helpers import InvoicePaymentsHelper

        # ==================================================================== #
        # [CORE] Invoice Payments Fields
        # ==================================================================== #

        # ==================================================================== #
        # Payment Method Code
        FieldFactory.create(const.__SPL_T_VARCHAR__, "journal_code", "Method")
        FieldFactory.inlist("payments")
        FieldFactory.microData("http://schema.org/Invoice", "PaymentMethod")
        FieldFactory.addChoices(InvoicePaymentsHelper.get_payment_code_names())
        FieldFactory.association("product_id@lines", "name@lines",
                                 "quantity@lines", "price_unit@lines",
                                 "journal_code@payments",
                                 "payment_date@payments", "name@payments",
                                 "amount@payments")
        # ==================================================================== #
        # Payment Journal Name
        FieldFactory.create(const.__SPL_T_VARCHAR__, "journal_name", "Journal")
        FieldFactory.inlist("payments")
        FieldFactory.isReadOnly()
        # ==================================================================== #
        # Payment Journal Type
        FieldFactory.create(const.__SPL_T_VARCHAR__, "journal_type",
                            "Journal Type")
        FieldFactory.inlist("payments")
        FieldFactory.isReadOnly()
        # ==================================================================== #
        # Payment Type
        FieldFactory.create(const.__SPL_T_VARCHAR__, "payment_type", "Type")
        FieldFactory.inlist("payments")
        FieldFactory.isReadOnly()
        # ==================================================================== #
        # Payment State
        FieldFactory.create(const.__SPL_T_VARCHAR__, "state", "Status")
        FieldFactory.inlist("payments")
        FieldFactory.isReadOnly()
        # ==================================================================== #
        # Payment Date
        FieldFactory.create(const.__SPL_T_DATE__, "payment_date", "Date")
        FieldFactory.inlist("payments")
        FieldFactory.microData("http://schema.org/PaymentChargeSpecification",
                               "validFrom")
        FieldFactory.association("product_id@lines", "name@lines",
                                 "quantity@lines", "price_unit@lines",
                                 "journal_code@payments",
                                 "payment_date@payments", "name@payments",
                                 "amount@payments")
        # ==================================================================== #
        # Payment Transaction Id
        FieldFactory.create(const.__SPL_T_VARCHAR__, "name", "Number")
        FieldFactory.inlist("payments")
        FieldFactory.microData("http://schema.org/Invoice", "paymentMethodId")
        FieldFactory.association("product_id@lines", "name@lines",
                                 "quantity@lines", "price_unit@lines",
                                 "journal_code@payments",
                                 "payment_date@payments", "name@payments",
                                 "amount@payments")
        # ==================================================================== #
        # Payment Amount
        FieldFactory.create(const.__SPL_T_DOUBLE__, "amount", "Amount")
        FieldFactory.inlist("payments")
        FieldFactory.microData("http://schema.org/PaymentChargeSpecification",
                               "price")
        FieldFactory.association("product_id@lines", "name@lines",
                                 "quantity@lines", "price_unit@lines",
                                 "journal_code@payments",
                                 "payment_date@payments", "name@payments",
                                 "amount@payments")
        if Framework.isDebugMode():
            FieldFactory.addChoice(1.0, 1)
            FieldFactory.addChoice(2.0, 2)
            FieldFactory.addChoice(3.0, 3)
Ejemplo n.º 20
0
    def get_configuration():
        """Get Hash of Fields Overrides"""
        configuration = {
            "function": {
                "group": "",
                "itemtype": "http://schema.org/Person",
                "itemprop": "jobTitle"
            },
            "email": {
                "type": const.__SPL_T_EMAIL__,
                "group": "",
                "itemtype": "http://schema.org/ContactPoint",
                "itemprop": "email"
            },
            "mobile": {
                "type": const.__SPL_T_PHONE__,
                "group": "",
                "itemtype": "http://schema.org/Person",
                "itemprop": "telephone"
            },
            "phone": {
                "type": const.__SPL_T_PHONE__,
                "group": "",
                "itemtype": "http://schema.org/PostalAddress",
                "itemprop": "telephone"
            },
            "name": {
                "required": False,
                "write": False
            },
            "type": {
                "required": False
            },
            "street": {
                "group": "Address",
                "itemtype": "http://schema.org/PostalAddress",
                "itemprop": "streetAddress"
            },
            "zip": {
                "group": "Address",
                "itemtype": "http://schema.org/PostalAddress",
                "itemprop": "postalCode"
            },
            "city": {
                "group": "Address",
                "itemtype": "http://schema.org/PostalAddress",
                "itemprop": "addressLocality"
            },
            "country_name": {
                "group": "Address"
            },
            "country_code": {
                "group": "Address"
            },
            "state_id": {
                "group": "Address"
            },
            "active": {
                "group": "Meta",
                "itemtype": "http://schema.org/Person",
                "itemprop": "active"
            },
            "create_date": {
                "group": "Meta",
                "itemtype": "http://schema.org/DataFeedItem",
                "itemprop": "dateCreated"
            },
            "write_date": {
                "group": "Meta",
                "itemtype": "http://schema.org/DataFeedItem",
                "itemprop": "dateModified"
            },
            "website": {
                "group": "",
                "type": const.__SPL_T_URL__,
                "itemtype": "http://schema.org/Organization",
                "itemprop": "url"
            },
            "activity_summary": {
                "write": False
            },
            "additional_info": {
                "notest": True
            },
            "image": {
                "group": "Images",
                "notest": True
            },
        }

        # ====================================================================#
        # Type Configuration for DebugMode
        if Framework.isDebugMode():
            configuration["type"]["choices"] = {
                "contact": "Contact",
                "delivery": "Delivery Address",
                "invoice": "Invoice Address",
                "other": "Other Address"
            }

        return configuration