Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
6036 Переглядів

I have been trying to override a method on wizard in order to add a new parameter, I have created a module that has the same method's name as the one on the module I want to modify, but It is not taking the changes, Do you know how to override only one method on the class that executes the wizard on submit? :

class AccountConsolidationCustom(): 

def get_account_balance(self, account, partner=False, newParam=False):

get_account_balance is the method name inside the wizard script

Аватар
Відмінити

Inheritance in odoo: https://goo.gl/4Zyc9d

Найкраща відповідь

Hi,

You can change an existing method like this,

class ChangeProductionQty(models.TransientModel):
_inherit = 'change.production.qty'

@api.model
def get_account_balance(self, account, partner=False, newParam=False):
# do xyz


Make sure that you have inherited the corresponding class itself .

Thanks

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
серп. 23
3126
2
жовт. 21
3112
1
черв. 21
8771
3
лип. 19
3289
1
квіт. 21
4401