OdooWiki OCA HUB

Sale Insurance Caser

sale_insurance_caser folder_open OCA/l10n-spain open_in_new
Sales/Sales License: AGPL-3

Integration module with Caser insurance API to automate insurance policy issuance for electronic device sales.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Automate the sale of Caser insurance policies for mobile phones and tablets. When a delivery is validated, Odoo sends the policy request to Caser and stores the policy number and price on the sales order line.

This module connects Odoo Sales to the Caser insurance service so that insurance policies for electronic devices (mobile phones and tablets) can be issued automatically.

  • Configure Caser connection details (production/test environment, username, agency, agent and SICA codes) in Sales settings. A button opens the list of Caser price ranges.
  • Define price ranges per asset type (mobile or tablet) with a minimum and maximum price, a code, and an insurance product. A button fetches current insurance prices from Caser and creates or updates the matching insurance product.
  • On product brands, add Caser codes for mobile and tablet. On product categories, set the Caser asset type; the protocol code is computed automatically.
  • On a sales order line, set how many units to insure. Odoo automatically adds separate insurance lines (one per unit) using the insurance product that matches the price and asset type. The insured quantity cannot exceed the product quantity, and insurance line quantities cannot be changed manually.
  • When the delivery is validated, lots are assigned to the insurance lines and a background job sends the policy request to Caser. The policy number, insurance price, request and response are stored on the line. If Caser returns a different price, an error is flagged.
  • The sales order shows an insurance status (No insurance, Pending, Error, Insured) and any error messages. A retry button is available on insurance lines, and a mark-reviewed button clears errors.
  • Required customer and company data (VAT, address, city, zip, province) and product data (brand code, asset type, protocol) are checked before sending; missing data blocks the request with a clear message.

Depends on

Models and fields (8)
  • sale.order · extends an existing modelcaser_error (Caser Insurance Errors), caser_has_error (Caser Insurance Error), caser_insurance_state, caser_insurance_line_ids (Caser Insurance Lines)
  • product.brand · extends an existing modelcaser_mobile_code (Caser Code (Mobile)), caser_tablet_code (Caser Code (Tablet))
  • stock.picking · new model
  • caser.api.mixin · new model
  • sale.order.line · extends an existing modelcaser_lot_id (Insured Lot), caser_request_xml, caser_response_xml, is_caser_insurance, caser_error_message, caser_policy_number, caser_insurance_price (Insurance Price), caser_insure_quantity (Quantity to Insure), caser_insured_line_id (Insured Product Line)
  • product.category · extends an existing modelcaser_protocol, caser_asset_type
  • caser.price.range · new modelcode, max_price (Maximum Price), min_price (Minimum Price), product_id (Insurance Product), insurance_price, caser_asset_type (Asset Type), insurance_price_notax (Insurance Price (No Tax)), last_tarification_date (Last Tarification)
  • res.config.settings · extends an existing modelcaser_username (Caser Web Username), caser_sica_code (Caser SICA Code), caser_agent_code, caser_agency_code, caser_is_production (Caser Production Environment)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/l10n-spain.

terminal Installation and usage

OCA documentation · Odoo 18.0

Go to Settings > Sales > Caser Insurance and configure:

  • Caser Production Environment: Enable for production, disable for test environment
  • Caser Web Username: Your Caser API username
  • Caser Agency Code: Your agency code (e.g., "9999")
  • Caser Agent Code: Your agent code (e.g., "9999999")
  • Caser SICA Code: Your SICA code (e.g., "9999")

Tarification (Get Insurance Prices)

  • Go to Settings > Sales > Caser Insurance
  • Click on Configure Price Ranges button
  • Select one or more price ranges and click Get Prices from Caser button (or use Action > Get Tarification Prices)
  • Insurance products will be created/updated automatically with prices from Caser API

Sale Order Flow

Step 1: Create Sale Order

  • Create a sale order with products that support insurance
  • In each order line, set Quantity to Insure field
  • Insurance lines are automatically created based on price ranges

Step 2: Validate Delivery

  • Confirm the sale order
  • In the delivery order, assign serial numbers to products
  • Click Validate
  • Insurance requests are sent to Caser asynchronously via queue jobs

Step 3: Review Insurance Status

After validation, check the insurance lines in the sale order:

  • Is Caser Insurance: Identifies insurance product lines
  • Insured Lot: The serial number that was insured
  • Policy Number: Caser policy number (if successful)
  • Insurance Price: Final price charged by Caser
  • Error Message: Any error from Caser API (if failed)

Viewing Request/Response Logs

To inspect the XML communication with Caser:

  • Open the sale order
  • Click on an insurance line (where Is Caser Insurance = True)
  • Go to the Caser tab to view:
  • Request XML: Complete SOAP request sent to Caser
  • Response XML: Complete response received from Caser

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.