Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
6013 Weergaven

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

Avatar
Annuleer

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

Beste antwoord

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

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
aug. 23
3111
2
okt. 21
3087
1
jun. 21
8731
3
jul. 19
3251
1
apr. 21
4374