Dear,
Through a model and form, I enter various data between them, (bank and account number), any idea how this data that you enter through a form can be copied to the corresponding party?.I was trying to do it as follows, it doesn’t work:
@classmethod
def get_party_cbu(cls, party, bank):
pool = Pool()
bank_ac=pool.get('bank.account')
data = bank_ac.search([
'bank', '=', bank,
'owners', '=', party,
])
return data
@classmethod
def set_party_cbu(cls, name,party):
pool = Pool()
#party=pool.get('party.party')
bank_ac = pool.get('bank.account')
bank_ac_number = pool.get('bank.account.number')
bank_data = {
'bank': bank.id,
'owners': party.id,
}
bank_data_number = {
'type': 'iban',
'number': cbu,
}
Bank_ac = bank_ac.create([bank_data])
Bank_ac_number = bank_ac_number.create([bank_data_number])