Hello everybody!!!
Can anyone help me know how to parse a json field in qweb report for odoo9.
Here is my json:
{"employee": [{"id":1,"name":"RIHENE,ABDELWWAHED","matricule":"123456789","worked_day":22,"leave_days":0,"abs_day":0,"worked_holiday":0,"over_25":0,"over_50":0,"over_75":0,"over_100":0,"heures_sup":0,"net_target":0,"wage":"2500.000","contract": {"wage":2500,"adjustment_prime":11399,"struct_id":4,"struct_code":"MENSUEL"},"net":0,"cnss":0,"irpp":0,"brut":0,"base_cnss":0,"cnss_pat":0,"sal_imp":0,"at":0,"total_primes":0,"data_changed":false,"checked":false,"primes_details":false,"hours": [{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0}, {"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0},{"hours":0}],"struct":"MENSUEL"}]}
Thanks a lot in advance.
Best regards!
define a method in model and call it over report , and use two for each loop just like pattern printing