Un devis Odoo envoyé expiré et resté sans réponse
Objectif Être alerté du devis Odoo envoyé au client, passé sa date de validité et toujours sans réponse, sans toucher à Odoo.
Odoo donne à chaque devis une date de validité. Le client ne répond pas, la date passe, le devis reste «Devis envoyé». Odoo l'affiche expiré quand on l'ouvre, sans le signaler à personne.
- quatre devis dans un vrai Odoo 18
- un Workflow déclare les états d'Odoo et l'échéance validity_date
- une décision: le seul devis envoyé et expiré
name | customer | state | validity_date | amount_total --------+------------------+-------+---------------+-------------- S00001 | Garage Morel | sent | 2026-11-15 | 1380.00 S00002 | Boulangerie Roux | sent | 2026-12-11 | 1380.00 S00003 | Cabinet Fabre | sale | 2026-11-11 | 1380.00 S00004 | Atelier Blanc | draft | 2026-11-18 | 1380.00 (4 rows)
manifests/10-odoo-sales.yaml
apiVersion: connectors.lumnik.io/v1kind: Connectormetadata: name: scenario-odoo-sales-a connector_type: jdbc-generic scopes: [sales-a]spec: connection: url: jdbc:postgresql://host.docker.internal:55434/scen user: lumnik_reader password_env: SCENARIO_ODOO_SALES_A_DB source: tables: - name: sale_order schema: public mode: full pk_columns: [id] rename: { id: order_id } # id is one of the hub's own columns target: odoo_sale_order_a - name: res_partner schema: public mode: full pk_columns: [id] rename: { id: partner_id } target: odoo_res_partner_amanifests/20-quotation.yaml
kind: Entityname: ScenarioOdooQuotationAdescription: "An Odoo quotation or sales order with its customer: its number, state, validity date and total."match: [quote_ref]scopes: [sales-a]columns: quote_ref: { label: "Quotation" } state: { label: "State" } validity_date: { label: "Valid until" } amount_total: { label: "Total" } write_date: { label: "Last change" } customer: { label: "Customer" }sources: - table: t_odoo_sale_order_a map: name: quote_ref state: state validity_date: validity_date amount_total: amount_total write_date: write_date partner_id: partner_idjoins: - table: t_odoo_res_partner_a from: partner_id to: partner_id map: { name: customer }manifests/30-quotation-lifecycle.yaml
apiVersion: apps.lumnik.io/v1kind: Workflowmetadata: name: scenario-odoo-quotation-aspec: scope: sales-a provenance: declared on: table: connector.v_scenarioodooquotationa column: state key: quote_ref order: write_date due: column: validity_date # Odoo's own expiration date of a quotation states: [sent] # sent to the customer, neither signed nor cancelled zone: Europe/Paris message: "{doc_key} for {customer}, {amount_total} €: sent, expired on {due}, still unanswered" states: - { code: draft, label: "Quotation", initial: true } - { code: sent, label: "Quotation sent" } - { code: sale, label: "Sales order", terminal: true } - { code: cancel, label: "Cancelled", terminal: true }$ lm apply -f 10-odoo-sales.yaml
Applied connector "scenario-odoo-sales-a" — 2 endpoints
$ lm connector run scenario-odoo-sales-a
run scheduled: 8f74858f-a0b4-4eab-b60e-a15d21e254c8
run scheduled: 742ae3cc-cc2c-454e-b256-3afbdc9a9da4
$ lm run get 8f74858f-a0b4-4eab-b60e-a15d21e254c8 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
8f74858f scenario-odoo-sales-a res_partner Completed 10 10 0 0 2026-11-21 10:44 2026-11-21 10:44 yes
$ lm run get 742ae3cc-cc2c-454e-b256-3afbdc9a9da4 --wait-evaluated
ID CONNECTOR ENDPOINT STATUS IN OUT SKIPPED DEAD-LETTERS STARTED ENDED EVALUATED
742ae3cc scenario-odoo-sales-a sale_order Completed 4 4 0 0 2026-11-21 10:44 2026-11-21 10:44 yes
$ lm entity apply -f 20-quotation.yaml
Applied entity "ScenarioOdooQuotationA" → connector."v_scenarioodooquotationa"
$ lm workflow apply -f 30-quotation-lifecycle.yaml -o json
{
"name": "scenario-odoo-quotation-a",
"scope": "sales-a",
"table": "connector.v_scenarioodooquotationa",
"column": "state",
"dataTruth": {
"undeclared": [],
"unobserved": [
"cancel"
],
"nullOrBlank": 0,
"tableMissing": false,
"keyColumnMissing": false,
"keyNullOrBlank": 0,
"checkUnavailable": false,
"unavailableReason": null,
"dueProblem": null,
"invalidOrderValues": 0,
"keysWithSeveralRows": null,
"columnsUnverified": []
}
}- res_partner
- IN 10 · OUT 10
- sale_order
- IN 4 · OUT 4
- due date
- readable
- states never seen yet
- cancel
preuves: replay.log, 01-odoo-sale-order.txt, 02-run.json, 03-workflow-apply.json, 04-decisions.json, 05-quotations.json · transform v1
$ lm inbox --process workflow:scenario-odoo-quotation-a
ID WHEN PROCESS MESSAGE ENTITY_KEY
31323 just now workflow:scenario-odoo-quotation-a S00001 for Garage Morel, 1380 €: sent, expired on 2026-11-15, still unanswered S00001
$ lm entity get ScenarioOdooQuotationA -o json
[
{
"quote_ref": "S00001",
"state": "sent",
"validity_date": "2026-11-15",
"amount_total": "1380",
"write_date": "2026-11-21T09:44:58.254473Z",
"partner_id": "7",
"customer": "Garage Morel",
"_conflicts": "{}"
},
{
"quote_ref": "S00002",
"state": "sent",
"validity_date": "2026-12-11",
"amount_total": "1380",
"write_date": "2026-11-21T09:44:58.355391Z",
"partner_id": "8",
"customer": "Boulangerie Roux",
"_conflicts": "{}"
},
{
"quote_ref": "S00003",
"state": "sale",
"validity_date": "2026-11-11",
"amount_total": "1380",
"write_date": "2026-11-21T09:44:58.447947Z",
"partner_id": "9",
"customer": "Cabinet Fabre",
"_conflicts": "{}"
},
{
"quote_ref": "S00004",
"state": "draft",
"validity_date": "2026-11-18",
"amount_total": "1380",
"write_date": "2026-11-21T09:44:58.516883Z",
"partner_id": "10",
"customer": "Atelier Blanc",
"_conflicts": "{}"
}
]- decision
- S00001 for Garage Morel, 1380 €: sent, expired on 2026-11-15, still unanswered
- S00001
- Garage Morel · sent · valid until 2026-11-15
- S00002
- Boulangerie Roux · sent · valid until 2026-12-11
- S00003
- Cabinet Fabre · sale · valid until 2026-11-11
- S00004
- Atelier Blanc · draft · valid until 2026-11-18
preuves: replay.log, 01-odoo-sale-order.txt, 02-run.json, 03-workflow-apply.json, 04-decisions.json, 05-quotations.json · transform v1
Limites
- Le contrôle tourne toutes les 15 minutes: la décision arrive dans ce délai.
- L'état sent est écrit par le script de données: dans Odoo, «Envoyer par e-mail» le pose via son assistant mail, et aucun serveur mail ne tourne ici.
- «Sans réponse depuis 15 jours» serait une dormance, comptée depuis la première observation par lumnik: un rejeu ne peut pas attendre 15 jours. La date de validité d'Odoo dit la même chose, et se rejoue.
- Lecture seule: lumnik n'annule, ne prolonge ni ne renvoie aucun devis.
- Quatre clients et un produit synthétiques.
Ce scénario demande lumnik Pro.
Voir l'offre →