Create contract

This commit is contained in:
2026-05-10 16:00:38 +02:00
parent 8e890f3c43
commit fe3a3ea71e
5 changed files with 184 additions and 31 deletions

View File

@@ -1,8 +1,8 @@
# Business Rules - Purchase Trade
Statut: `draft`
Version: `v0.7`
Derniere mise a jour: `2026-04-26`
Version: `v0.8`
Derniere mise a jour: `2026-05-10`
Owner metier: `a completer`
Owner technique: `a completer`
@@ -731,6 +731,37 @@ Owner technique: `a completer`
- Priorite:
- `importante`
### BR-PT-024 - Create Contracts propage les lieux stock selon le flux miroir
- Intent: eviter une ressaisie des lieux logistiques quand un contrat miroir
est cree depuis une quantite ouverte.
- Description:
- Les champs concernes sont les `stock.location` `from_location` et
`to_location` des contrats achat et vente.
- Si le contrat source est en flux direct fournisseur -> client
(`from_location.type = supplier` et `to_location.type = customer`), le
contrat cree reprend le meme couple `from_location` / `to_location`.
- Ce flux correspond au mode `Dropship` affiche sur les shipments.
- Si un contrat vente est cree depuis un achat dont `to_location.type =
storage`, le `from_location` de la vente est pre-rempli avec ce
`to_location` achat.
- Si un contrat achat est cree depuis une vente dont `from_location.type =
storage`, le `to_location` de l'achat est pre-rempli avec ce
`from_location` vente.
- Resultat attendu:
- achat supplier -> customer vers vente:
`sale.from_location = purchase.from_location` et
`sale.to_location = purchase.to_location`.
- vente supplier -> customer vers achat:
`purchase.from_location = sale.from_location` et
`purchase.to_location = sale.to_location`.
- achat vers stock puis vente:
`sale.from_location = purchase.to_location`.
- vente depuis stock puis achat:
`purchase.to_location = sale.from_location`.
- Priorite:
- `importante`
## 4) Exemples concrets
### Exemple E1 - Augmentation simple