crea mandatos SEPA desde pedidos del TPV

This commit is contained in:
GitHub Copilot 2026-06-26 19:41:54 +02:00
parent a754df3914
commit 62e0e8a92c
7 changed files with 262 additions and 15 deletions

View file

@ -0,0 +1,33 @@
# POS Account Payment Order SEPA
Adds a contextual action **"Collect by SEPA direct debit"** on the POS orders
list/form (Point of Sale → Orders).
## Purpose
When a POS order is paid with a *"Customer Account"* payment method
(`split_transactions = True`), Odoo does not register a real collection: it
leaves the amount as an **open receivable** for the customer inside the
session's journal entry. This module lets you collect those receivables in
bulk through a **SEPA direct debit payment order** (debit order), without
re-invoicing the already-issued (simplified) tickets.
## Usage
1. Make sure the affected customers have a **valid SEPA mandate** (see
`account_banking_mandate_batch`).
2. Go to **Point of Sale → Orders**, filter the orders paid on account, select
them and run **Action → Collect by SEPA direct debit**.
3. The action creates the **payment lines** inside a draft inbound SEPA
payment order, grouped by payment mode. Orders without an open receivable,
without a partner, already queued, or whose partner has no valid mandate are
**skipped and reported**.
4. Open **Invoicing → Customers → Payment Orders**, confirm it and **generate
the SEPA file (pain.008)**.
## Payment mode resolution
The inbound SEPA payment mode is taken from the partner's
`customer_payment_mode_id` when it is a valid `sepa_direct_debit` inbound mode;
otherwise the first inbound `sepa_direct_debit` payment mode is used as
fallback.