This commit is contained in:
2026-04-10 14:40:06 +02:00
parent 29a719c117
commit 8906f00d36
5 changed files with 99 additions and 28 deletions

View File

@@ -133,7 +133,9 @@ Toujours fournir:
- `sale_ict.fodt`: meme priorite lots; les mots suivent l'unite reelle; le total convertit vers une unite commune, qui est celle du lot virtuel seulement s'il y a un seul lot virtuel sur tout le report.
- `lot.report.r_del_period`: utiliser `sale.line.del_period` pour `lot_s` sans `lot_p`, sinon `purchase.line.del_period`.
- `lot.do_weighing`: `lot_qt` editable et ecrasement direct de `lot.lot_qt`.
- `account.invoice`: `Validate` cree aussi le `account.move` pour les factures client; `Post` ne doit plus forcer une fresh session sur ce flux.
- `pricing.pricing`: saisie manuelle autorisee meme sans composant; `eod_price` non editable et calcule en prix moyen pondere; `last=True` gere par groupe `line + component`, choisi sur la `pricing_date` la plus grande.
- `account.invoice`: `Validate` cree aussi le `account.move` pour les factures client, attribue aussi le `number` a ce stade pour les factures client comme fournisseur; `Post` ne doit plus forcer une fresh session sur ce flux.
- `pricing.pricing`: saisie manuelle autorisee meme sans composant; en manuel, l'utilisateur saisit seulement `Qt` et `Settl. price`; `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` et `eod_price` sont derives automatiquement.
- `pricing.pricing`: en manuel, `fixed_qt` = cumul des `quantity`, `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`, `unfixed_qt` = reste a fixer, `unfixed_qt_price` = `settl_price` de la ligne.
- `pricing.pricing`: `eod_price` reste non editable et calcule en prix moyen pondere; `last=True` gere par groupe `line + component`, choisi sur la `pricing_date` la plus grande.
- `purchase_trade`: `trader` filtre sur `TRADER`, `operator` sur `OPERATOR`; fallback sur `quantity` si `quantity_theorical` est vide dans les quotas/pricings.
- `sale.line` / `purchase.line`: en mode `basis`, sans `price_component`, le `Price` et le `Fix. progress` de la ligne doivent remonter depuis la ligne `Summary` sans component.

View File

@@ -8,13 +8,13 @@
<meta:generator>LibreOffice/7.6.0.3$Windows_X86_64 LibreOffice_project/69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265</meta:generator>
<meta:editing-duration>PT3H18M53S</meta:editing-duration>
<meta:editing-cycles>11</meta:editing-cycles>
<meta:editing-duration>PT3H20M59S</meta:editing-duration>
<meta:editing-cycles>12</meta:editing-cycles>
<dc:date>2026-04-10T09:15:22.359000000</dc:date><meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="67" meta:word-count="175" meta:character-count="2465" meta:non-whitespace-character-count="1939"/></office:meta>
<dc:date>2026-04-10T10:30:16.567000000</dc:date><meta:document-statistic meta:table-count="10" meta:image-count="2" meta:object-count="0" meta:page-count="2" meta:paragraph-count="66" meta:word-count="168" meta:character-count="2416" meta:non-whitespace-character-count="1896"/></office:meta>
<office:settings>
<config:config-item-set config:name="ooo:view-settings">
<config:config-item config:name="ViewAreaTop" config:type="long">21255</config:config-item>
<config:config-item config:name="ViewAreaTop" config:type="long">6879</config:config-item>
<config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
<config:config-item config:name="ViewAreaWidth" config:type="long">27264</config:config-item>
<config:config-item config:name="ViewAreaHeight" config:type="long">13187</config:config-item>
@@ -23,12 +23,12 @@
<config:config-item-map-indexed config:name="Views">
<config:config-item-map-entry>
<config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">5639</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">24783</config:config-item>
<config:config-item config:name="ViewLeft" config:type="long">13275</config:config-item>
<config:config-item config:name="ViewTop" config:type="long">15563</config:config-item>
<config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">21255</config:config-item>
<config:config-item config:name="VisibleTop" config:type="long">6879</config:config-item>
<config:config-item config:name="VisibleRight" config:type="long">27263</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">34440</config:config-item>
<config:config-item config:name="VisibleBottom" config:type="long">20064</config:config-item>
<config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
<config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
@@ -101,7 +101,7 @@
<config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
<config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
<config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
<config:config-item config:name="Rsid" config:type="int">431449</config:config-item>
<config:config-item config:name="Rsid" config:type="int">523469</config:config-item>
<config:config-item config:name="RsidRoot" config:type="int">84510</config:config-item>
<config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
<config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
@@ -174,7 +174,7 @@
<office:styles>
<style:default-style style:family="graphic">
<style:graphic-properties svg:stroke-color="#808080" draw:fill-color="#cfe7f5" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="true"/>
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:font-independent-line-spacing="false">
<style:paragraph-properties style:text-autospace="none" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Times New Roman1" fo:font-size="12pt" fo:language="fr" fo:country="CH" style:letter-kerning="true" style:font-name-asian="Times New Roman1" style:font-size-asian="12pt" style:language-asian="fr" style:country-asian="CH" style:font-name-complex="Times New Roman1" style:font-size-complex="12pt" style:language-complex="fr" style:country-complex="CH"/>
@@ -771,24 +771,28 @@
</style:style>
<style:style style:name="P45" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties officeooo:paragraph-rsid="00056da2"/>
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Calibri" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P46" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
<style:text-properties officeooo:paragraph-rsid="00056da2"/>
</style:style>
<style:style style:name="P47" style:family="paragraph" style:parent-style-name="Normal">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%"/>
<style:text-properties fo:color="#000000" loext:opacity="100%" style:font-name="Calibri" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:letter-kerning="false" style:font-name-asian="Times New Roman" style:font-size-asian="10pt" style:font-name-complex="Arial" style:font-size-complex="10pt"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" officeooo:paragraph-rsid="00056da2" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P48" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties style:font-name="Calibri" fo:font-size="10pt" fo:language="fr" fo:country="CH" style:font-size-asian="10pt" style:font-name-complex="Arial1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P49" style:family="paragraph" style:parent-style-name="footer">
<style:style style:name="P49" style:family="paragraph" style:parent-style-name="Standard">
<style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" style:contextual-spacing="false" fo:line-height="100%" style:writing-mode="lr-tb"/>
<style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-name-complex="Times New Roman1" style:font-size-complex="10pt"/>
</style:style>
<style:style style:name="P50" style:family="paragraph" style:parent-style-name="footer">
<style:paragraph-properties style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="P50" style:family="paragraph" style:parent-style-name="header">
<style:style style:name="P51" style:family="paragraph" style:parent-style-name="header">
<style:paragraph-properties style:writing-mode="lr-tb"/>
</style:style>
<style:style style:name="T1" style:family="text">
@@ -3981,8 +3985,7 @@
<text:p text:style-name="P26"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
<text:p text:style-name="P18"/>
<text:p text:style-name="P18"/>
<text:p text:style-name="P32"><text:placeholder text:placeholder-type="text">&lt;invoice.report_incoterm&gt;</text:placeholder></text:p>
<text:p text:style-name="P29"><text:span text:style-name="T1">ALL DETAILS AND SPECIFICATIONS AS PER</text:span> <text:span text:style-name="T3">BENEFICIARY </text:span></text:p>
<text:p text:style-name="P29"><text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;invoice.report_incoterm&gt;</text:placeholder></text:span><text:span text:style-name="T3"><text:s/></text:span></text:p>
<text:p text:style-name="P26"/>
<text:p text:style-name="P26"/>
<text:p text:style-name="P12"/>
@@ -4062,10 +4065,10 @@
<text:p text:style-name="P14"/>
<text:p text:style-name="P17">WE CERTIFY THAT THE MERCHANDISE IS OF <text:span text:style-name="T7"><text:placeholder text:placeholder-type="text">&lt;invoice.report_origin or &apos;&apos;&gt;</text:placeholder></text:span><text:s/>ORIGIN</text:p>
<text:p text:style-name="P17"/>
<text:p text:style-name="P46"><text:span text:style-name="T12">B</text:span><text:span text:style-name="T13">ANK</text:span><text:span text:style-name="T12">: EFG BANK SA</text:span></text:p>
<text:p text:style-name="P47">IBAN : CH8808667007168111027</text:p>
<text:p text:style-name="P47">SwifT Code: EFGBCHZZ</text:p>
<text:p text:style-name="P48"><text:soft-page-break/></text:p>
<text:p text:style-name="P47"><text:span text:style-name="T12">B</text:span><text:span text:style-name="T13">ANK</text:span><text:span text:style-name="T12">: EFG BANK SA</text:span></text:p>
<text:p text:style-name="P45">IBAN : CH8808667007168111027</text:p>
<text:p text:style-name="P45">SwifT Code: EFGBCHZZ</text:p>
<text:p text:style-name="P48"/>
</table:table-cell>
<table:table-cell table:style-name="Tableau8.A1" office:value-type="string">
<text:p text:style-name="P34"><text:s text:c="3"/><text:placeholder text:placeholder-type="text">&lt;format_currency(invoice.total_amount, invoice.party.lang, invoice.currency)&gt;</text:placeholder><text:s/></text:p>
@@ -4077,6 +4080,7 @@
<text:p text:style-name="P11"/>
<table:table table:name="Tableau9" table:style-name="Tableau9">
<table:table-column table:style-name="Tableau9.A"/>
<text:soft-page-break/>
<table:table-row table:style-name="Tableau9.1">
<table:table-cell table:style-name="Tableau9.A1" office:value-type="string">
<text:p text:style-name="P21">NET LANDED WEIGHTS, ACTUAL TARE, NO FRANCHISE</text:p>

View File

@@ -102,6 +102,15 @@ de negoce physique:
- le `unit_price` doit rester un prix de base, hors `premium`
- le `premium` doit impacter le prix total economique et donc le `amount`,
aussi bien en `priced` qu'en `basis`
- dans `pricing.pricing` en saisie manuelle, l'utilisateur renseigne
seulement `quantity` et `settl_price`
- `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` et
`eod_price` sont des valeurs derivees et ne doivent pas etre saisies a la
main
- en manuel, `fixed_qt` = cumul des `quantity` du groupe trie par
`pricing_date`
- en manuel, `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`
- en manuel, `unfixed_qt_price` = `settl_price` de la ligne
- pour les documents commerciaux / facture, une ligne `basis` affiche le
`premium` comme prix visible, pas le prix economique total
- si `linked currency` est active, le `premium` est saisi dans la devise /
@@ -159,6 +168,12 @@ de negoce physique:
- Le calcul du prix peut diverger entre `unit_price`, `linked_price`,
`lot_price` et valuation si le premium n'est pas traite explicitement dans
chaque maillon.
- Sur `account.invoice`, le workflow `Validate` doit maintenant aligner
fournisseur et client pour:
- creation du `account.move`
- attribution du `number`
- `Post` ne doit pas reintroduire une difference de session/fresh login cote
client
## 7) Definition of done (module `purchase_trade`)

View File

@@ -1,8 +1,8 @@
# Business Rules - Purchase Trade
Statut: `draft`
Version: `v0.4`
Derniere mise a jour: `2026-04-02`
Version: `v0.5`
Derniere mise a jour: `2026-04-10`
Owner metier: `a completer`
Owner technique: `a completer`
@@ -333,10 +333,54 @@ Owner technique: `a completer`
- seuls les lots physiques des `incoming_moves` du shipment sont exportes
- l'action exige au minimum un `controller` et un `returned_id` sur le
shipment
- les cles renvoyees par le systeme distant et la date d'envoi sont
- les cles renvoyees par le systeme distant et la date d'envoi sont
conservees sur le `weight.report` local
- Priorite:
- `importante`
### BR-PT-016 - En pricing manuel, seules la quantite fixee du jour et le prix de marche sont saisis
- Intent: simplifier la saisie utilisateur et garantir une coherence unique
entre les colonnes de `pricing.pricing`.
- Description:
- Pour une ligne de `pricing.pricing` en mode manuel, l'utilisateur ne doit
saisir que:
- `quantity`
- `settl_price`
- Les autres colonnes de suivi sont derivees automatiquement sur tout le
groupe metier (`line + component` ou `sale_line + component`) trie par
`pricing_date`.
- Resultat attendu:
- `fixed_qt` = cumul des `quantity`
- `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`
- `unfixed_qt` = quantite de base de la ligne - `fixed_qt`
- `unfixed_qt_price` = `settl_price` de la ligne
- `eod_price` = moyenne ponderee entre jambe fixee et non fixee
- `last=True` reste unique par groupe et suit la plus grande `pricing_date`
- Hors scope:
- la generation automatique des lignes quand `pricing.component.auto = True`
ne doit pas changer de comportement
- Priorite:
- `structurante`
### BR-PT-017 - Le workflow Validate des factures client doit aussi attribuer le numero
- Intent: aligner le comportement des factures client et fournisseur au moment
de `Validate`.
- Description:
- Lors du workflow `Validate` sur `account.invoice`, une facture client
(`type = out`) doit maintenant:
- creer son `account.move`
- recevoir son `number`
- La numerotation ne doit plus etre repoussee au `Post` cote client.
- Resultat attendu:
- a l'issue de `Validate`, une facture fournisseur ou client possede deja:
- son `account.move`
- son `number`
- `Post` conserve son role de posting comptable sans reintroduire de
difference de session/fresh login cote client
- Priorite:
- `importante`
- Resultat attendu:
- apres creation du lot virtuel, si aucun matching purchase n'existe:
- appeler `Valuation.generate_from_sale_line(line)`

View File

@@ -75,10 +75,16 @@ Scope: templates Relatorio + ponts `report_*` Python.
- dans `Do weighing`, `lot_qt` doit etre editable et ecraser directement `lot.lot_qt`.
- Factures client / fournisseur:
- `Validate` cree aussi le `account.move` pour les factures client.
- `Validate` attribue aussi le `number` pour les factures client; la numerotation ne doit plus attendre `Post` cote `out`.
- `Post` ne doit plus forcer une fresh session / demande de mot de passe sur ce flux.
- Pricing:
- `pricing.pricing` peut etre saisi manuellement meme sans composant.
- `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` sont editables.
- en manuel, l'utilisateur saisit seulement `quantity` et `settl_price`.
- `fixed_qt`, `fixed_qt_price`, `unfixed_qt`, `unfixed_qt_price` sont derives automatiquement et restent non editables.
- `fixed_qt` = cumul des `quantity` du groupe.
- `fixed_qt_price` = moyenne ponderee cumulee des `settl_price`.
- `unfixed_qt` = quantite de base restante a fixer.
- `unfixed_qt_price` = `settl_price` de la ligne.
- `eod_price` reste non editable et suit le prix moyen pondere.
- le mode auto suit la meme formule.
- `last` est gere par groupe metier (`line + component`), avec un seul `last=True` par groupe.