Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1469 Ansichten

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Mai 24
3069
3
Feb. 24
2615
2
Nov. 22
5502
0
Apr. 24
1412
2
Okt. 23
4323