Skip to Content
Menu
This question has been flagged
1721 Zobrazenia

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
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
máj 24
3427
3
feb 24
2935
2
nov 22
5765
0
apr 24
1654
2
okt 23
4672