Commit cbc87a4d authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

models: add origin_account_id attribute to Recipient

To handle case of multispaces like cragr or ing
It's needed to add new recipient on theses banks

also adapt boobank
parent ad8d4bde
......@@ -584,10 +584,11 @@ class Boobank(ReplApplication):
if len(self.enabled_backends) > 1:
print('Error: select a single backend to add a recipient (Hint: try the command "backends only")', file=self.stderr)
return 1
iban, label = self.parse_command_args(line, 2, 2)
iban, label, origin_account_id = self.parse_command_args(line, 3, 2)
recipient = Recipient()
recipient.iban = iban
recipient.label = label
recipient.origin_account_id = origin_account_id
next(iter('add_recipient', recipient)))
def do_recipients(self, line):
......@@ -190,6 +190,9 @@ class Recipient(BaseAccount):
category = StringField('Recipient category')
iban = StringField('International Bank Account Number')
# Needed for multispaces case
origin_account_id = StringField('Account id which recipient belong to')
class AccountType(Enum):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment