helo
i want to use (0, 0, { values }) in for loop like this:
class btp_etatcaution(models.Model):
def _getfiltered(self):
values = ''
for record in self.env['btp.caution'].search([('banque_id', '=', self.banque_id.id),]):
values += "(0, 0, { 'name':'"+record.name+"', }) ,"
self.ligne_caution_etat = [values]
...
ligne_caution_etat = fields.One2many('btp.caution', 'etat_caution', 'etat_caution')
--------------------------------------------------
but i get this error,
psycopg2.DataError: ERREUR: syntaxe en entrée invalide pour l'entier : « (0, 0, { 'name':'caution3', }) ,(0, 0, { 'name':'caution4', }) , » LINE 1: ...ro" FROM "btp_caution" WHERE "btp_caution".id IN ('(0, 0, { ... ^
how can i ccorrect it?