>
>
>>
> They are held in the 'records' parameter of your cassmethod.
>
> @classmethod
> @ModelView.button
> def my_button(cls, records):
> for row in records:
> #do your changes to row here (preferably calling a method who does
> the real work)
>
> Hope it helps.
> K.
>
> --
> -------------------------
> Karla Mª Stenger Sábat
>
[email protected] <javascript:>
>
Thanks, now i have following code, which works:
pool = Pool()
Model = pool.get('test.test')
for row in records:
values =[{'field1':row.field1,... , 'fieldn':row.fieldn}]
record = Model.search([('id', '=', row.id)])
Model.delete(record)
Model.create(values)
return 'reload'
but i don't think it's the smartest way to delete the record and create a new
one.
So again my question: Is the an opportunity to update the record?