Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1632 Visualizzazioni

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.



Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 24
3276
3
feb 24
2812
2
nov 22
5651
0
apr 24
1550
2
ott 23
4523