Add model, record and records attribute on Wizard

issue9421
review309861012
This commit is contained in:
Cédric Krier committed 2020-07-07 23:56:09 +02:00
1 parent 772bb32e69
commit fd2e8be078
1 file changed
+2 -9
+2 -9
View File
@@ -127,19 +127,12 @@ class DepositRecall(Wizard):
recall = StateTransition()
def default_start(self, fields):
pool = Pool()
Invoice = pool.get('account.invoice')
invoice = Invoice(Transaction().context['active_id'])
return {
'company': invoice.company.id,
'company': self.record.company.id,
}
def transition_recall(self):
pool = Pool()
Invoice = pool.get('account.invoice')
invoice = Invoice(Transaction().context['active_id'])
invoice.call_deposit(self.start.account, self.start.description)
self.record.call_deposit(self.start.account, self.start.description)
return 'end'