Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1464 Zobrazení

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šit
Related Posts Odpovědi Zobrazení Aktivita
2
kvě 24
3069
3
úno 24
2615
2
lis 22
5502
0
dub 24
1411
2
říj 23
4323