Metadata-Version: 2.1
Name: odoo-addon-sale_insurance_caser
Version: 18.0.1.0.0.6
Requires-Python: >=3.10
Requires-Dist: odoo-addon-product_brand==18.0.*
Requires-Dist: odoo-addon-queue_job==18.0.*
Requires-Dist: odoo==18.0.*
Summary: Automate insurance policy request with Caser
Home-page: https://github.com/OCA/l10n-spain
License: AGPL-3
Author: Tecnativa, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

====================
Sale Insurance Caser
====================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:fe96ad8d47e659f150371c3741ff6537fbd825ef55f4623564b7afe64c46217a
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github
    :target: https://github.com/OCA/l10n-spain/tree/18.0/sale_insurance_caser
    :alt: OCA/l10n-spain
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/l10n-spain-18-0/l10n-spain-18-0-sale_insurance_caser
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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

**Table of contents**

.. contents::
   :local:

Configuration
=============

Go to *Settings > Sales > Caser Insurance* and configure:

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

Usage
=====

Tarification (Get Insurance Prices)
-----------------------------------

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

Sale Order Flow
---------------

Step 1: Create Sale Order
~~~~~~~~~~~~~~~~~~~~~~~~~

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

Step 2: Validate Delivery
~~~~~~~~~~~~~~~~~~~~~~~~~

1. Confirm the sale order
2. In the delivery order, assign serial numbers to products
3. Click **Validate**
4. 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:

1. Open the sale order
2. Click on an insurance line (where **Is Caser Insurance** = True)
3. Go to the **Caser** tab to view:

   - **Request XML**: Complete SOAP request sent to Caser
   - **Response XML**: Complete response received from Caser

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-spain/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-spain/issues/new?body=module:%20sale_insurance_caser%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

  - Juan Carlos Oñate

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-juancarlosonate-tecnativa| image:: https://github.com/juancarlosonate-tecnativa.png?size=40px
    :target: https://github.com/juancarlosonate-tecnativa
    :alt: juancarlosonate-tecnativa

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-juancarlosonate-tecnativa| 

This module is part of the `OCA/l10n-spain <https://github.com/OCA/l10n-spain/tree/18.0/sale_insurance_caser>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
