El domingo, 25 de marzo de 2018, 11:55:03 (UTC-3), Cédric Krier escribió:
> On 2018-03-25 07:37, Francisco Maria Moyano Casco wrote:
> > Hi,
> > I'm working on Tryton 4-2. I'm trying to delete some class attributes,
> > due to a migration, but I had no success.
> >
> > The code I use is the next one:
> > ......
> > if table.column_exist('water'):
> > table.drop_column('water')
> > if hasattr(cls,'water'):
> > del cls.water
> > .......
> >
> > Any clue why this doesn't work?
>
> Why are you deleting it? Just remove the definition from the class.
Because, the attributes I want to remove are part of a module base class. So,
if I remove the definifinition from it, next time the module would be update to
a newer version, I will have to remove again.
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/2f16ab2c-406b-4580-a4b8-79dc76be0ff6%40googlegroups.com.