Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2481 Vizualizări

Hi there.


I need to make a modification, where the Inventory Variation report has additional information in it, for each transaction line:


- The Purchase Order Number, if applicable (related to a stock increase)


- The Sales Order Number, if applicable (related to a stock decrease).


How can I find the related Purchase Order or Sales Order Number, accurately?


Our users aren't able to even do this manually in Odoo - (eg - if yo have two different purchase orders, and two different inventory changes related to those).

And the Odoo source code for Valuation Reports is very complicated, so I'm struggling with this. I can find a lot of document numbers in items of the Valuation Reports (for things like stock movements), but don't know how to get from there to the original Sales Order or Purchase Order numbers.

Imagine profil
Abandonează
Cel mai bun răspuns

Step 1: You can inherit model inventory valuation 'stock.valuation.layer' and add two fields like 'type' and 'reference' 

Step 2: Write function/update those fields in model 'stock.picking' when Sales and purchase.

Step 3:  xpath and added those field using xml in model ''stock.valuation.layer''.



Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
iun. 24
4320
0
mai 23
2309
2
apr. 23
3607
2
ian. 21
4645
0
mai 16
3112