* Francisco Maria Moyano Casco [2018-03-25 22:11 +0200]:
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.
Why do you want to remove a field from a base module?
--
Nicolas Évrard - B2CK SPRL
E-mail/Jabber: nicolas.evr...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180325214411.jd5wi4bqxptatsg2%40localhost.localdomain.