Skip to main content

Sponsorship module for cooperators in Som Connexió.

Project description

Beta License: AGPL-3 coopdevs/som-connexio/odoo-somconnexio

Integrate sponsored partners to the cooperative management.

Sponsees do not need to aport capital share to become a cooperative partner if a cooperative member sponsors them.

Table of contents

Configuration

On the company, set a default maximum sponsees number per partner.

Usage

Sponsorship relation

Cooperative members can sponsor new partners, being linked by a one2many relation, being the maximum number of sponsees customizable by company. They also have a sponsorship_hash, a code to identify them as sponsors, along with their vat number, through the API.

A wizard allows every sponsee to aport capital share and become members themselves

Sponsorship API

Variables to fill in these example curls:

  • API_KEY: authorized key from the odoo server’s API-KEY

  • ODOO_URL: target ODOO server’s URL

Check partner sponsorship data

curl -X GET \
 -H  "accept: application/json" \
 -H  "api-key: $API_KEY" \
 -H  "Content-Type: application/json" \
 "$ODOO_URL/api/partner/sponsees?ref=1234"

Where ref is the partner’s ref code. The returned data includes:

  • sponsorship_code: code hash

  • sponsees_max: Maximum number of sponsees per partner

  • sponsees_number: Number of partner’s sponsees

  • sponsees: List of names and surnames of partner’s sponsees

Check if partner can sponsor

curl -X GET \
 -H  "accept: application/json" \
 -H  "api-key: $API_KEY" \
 -H  "Content-Type: application/json" \
 "$ODOO_URL/api/partner/check_sponsor?vat=1234567A&sponsor_code=888B"

Required input params:

  • vat: partner’s vat

  • sponsor_code: Maximum number of sponsees per partner

Retured data:

  • result: “allowed” or “not_allowed”

  • message: “ok” or explanation for now allowed result

The usage is full integrated with the ORM of Odoo using listeners.

More info about the listeners: https://odoo-connector.com/api/api_components.html#listeners

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_addon_cooperator_sponsorship-16.0.1.0.3.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file odoo_addon_cooperator_sponsorship-16.0.1.0.3.tar.gz.

File metadata

File hashes

Hashes for odoo_addon_cooperator_sponsorship-16.0.1.0.3.tar.gz
Algorithm Hash digest
SHA256 3fda85b8315efc07e1b1baca8a849b8b26d3db3c1da2a06a75c4c7e3faf81015
MD5 f5920ce32fa609871f4345ba14070472
BLAKE2b-256 93676e943e54c5fa477f54df8ae39457089c81b83f2baa5fa1be644b0dbac018

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page