I have a sql request and i pass it parameters like the followed code :
@api.onchange('val_ex','val_struct')
def rec_inv(self):
val_ex = int(self.no_ex)
val_struct = int(self.cd_struct)
self.env.cr.execute("select sum(mnt_budgetise) from budg_ligne_exe_rec, budg_section where budg_titre.id = budg_ligne_exe_rec.cd_titre_id and budg_titre_.cd_titre = '1' and budg_section.id = budg_ligne_exe_rec.cd_section_id and budg_section.cd_section = '2' and no_ex = %s and cd_struct = %s", (val_ex,val_struct))
But it doesn't worked and i don't know why. Someone can help please?
This sql run in pgadmin?
yes it runs.