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

Hello, 




I'm using V17 enterprise edition on .SH.




I'm trying to modify the most dificult report on Odoo... The delivery Slip. 




This time I need to add a column for incoming stock moves, sometimes I put a comment on purchase.order.line. I'm passing this comment to stock.move.line form view.




But now I'm trying to show this comment on the lines of the delivery slip report.




th t-if="o.picking_type_code == 'incoming'" name="th_sm_or"


strong t-esc="flag">Work Order


/th




I achieved to add a condition that the column is only showed for incoming moves, this is ok.




But now im trying to only show this column if there is data on any of its rows. If there's no info for the work order the column should not be shown.




I've tried to do the following thing, but.... it doesn't work. I must say I'm not very code guy, I'm just trying some new stuff... but this overpasses me.




t t-set="flag" t-value="0"


                    t t-set="lineas" t-values="o.move_ids"/


                        t t-foreach="lineas" t-as="movi"


                            t t-if="movi.x_studio_or_distribucin"


                                t t-set="flag" t-value="1"/


                            /t


                    /t


               /t


                    th t-if="o.picking_type_code == 'incoming' and flag == '1'" name="th_sm_or"


                      strong t-esc="flag">Work Order


                    /th


(I've removed the start and closing symbols to get the code printed)


Thanks if someone can help.



Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 24
3442
3
feb. 24
2952
2
nov. 22
5801
0
apr. 24
1666
2
oct. 23
4697