Skip to content

[edfprofessionnel] Use moeid as subscription id

Philippe Pepiot requested to merge philpep/woob:edfprofessionnel into master

We might have multiple moeid per contractReference. But iter_subscriptions() stop at first unique subscription.id so we miss a lot of bills.

AFAIK at least "compte de facturation" (aka baFelixNumber) may vary on same contractReference.

So use moeid as subscription.id to ensure all bills might be fetched, and add "contractReference" and "baFelixNumber" as respectively _contract_reference and _bill_account on Subscription, so they can be used to programmatically filter subscriptions.

There can still be multiple moeid (given the value of "peStatus" or "contratStatus") so we keep the "ignore_duplicate" flag to true.

Merge request reports