OCA / server-env

Tools to manage environment-dependent configuration
GNU Affero General Public License v3.0
56 stars 149 forks source link

[FIX] AttributeError #152

Closed rven closed 1 year ago

rven commented 1 year ago

AttributeError: 'functools.partial' object has no attribute 'name'

legalsylvain commented 1 year ago

Hi @rven. It seems a duplicate of https://github.com/OCA/server-env/issues/151 Don't you think ? If yes, could you close your issue. thanks !

rven commented 1 year ago

Hi @rven. It seems a duplicate of #151 Don't you think ? If yes, could you close your issue. thanks !

@legalsylvain This is about the same issue, but in fact of waiting for Odoo to fix this, it can also be fixed in the way I do in this PR! @simahawk What do you think? This was working fine now https://github.com/OCA/storage/pull/254 image

simahawk commented 1 year ago

I'm working on a fix on #151

simahawk commented 1 year ago

@rven can you pls have a look at https://github.com/OCA/server-env/pull/153? I don't think is correct to use partial instead of partialmethod and in any case update_wrapper won't propagate the right name.

rven commented 1 year ago

@rven can you pls have a look at #153? I don't think is correct to use partial instead of partialmethod and in any case update_wrapper won't propagate the right name.

It is indeed not correct, because the record(self) is also not provided well!