Hi,

in model Report a got 

    numero = fields.Integer('Numero', required=True, select=True)

and defined


    def get_rec_name(self,ids,name):
      
      if not ids:
        return {}
      res = {}
      for report in self.browse(ids):
        res[report.id] = unicode(report.numero)

      return res


and in account.invoice.line i've added

    report = fields.Many2One('ql_maquinaria.report', 'Report', readonly=True)


the thing is that when one want to filter ( in the client ) invoice.line with 
Report: <some number 
here>

i get this error:

  File "/dist-packages/trytond/model/modelsql.py", line 1328, in 
__search_domain_oper
    qu1, qu2 = self.__search_domain_calc(tuple_args, tables, tables_args)
  File "/dist-packages/trytond/model/modelsql.py", line 1380, in 
__search_domain_calc
    'exist on "%s"' % (fargs[0], self._name))
Exception: ('ValidateError', 'Field "name" doesn\'t exist on 
"ql_maquinaria.report"')


i compared how account.invoice defines get_rec_name and i cannot find 
substancial diferences.

thnx.


-- 
Felipe Alvarez Harnecker
[email protected] - 9.874.60.17

-- 
[email protected] mailing list

Reply via email to