From fd2e8be078c920495b67ca3d8706ffe9b1bc2aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 7 Jul 2020 23:56:09 +0200 Subject: [PATCH] Add model, record and records attribute on Wizard issue9421 review309861012 --- invoice.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/invoice.py b/invoice.py index 89d2aebe59..a543d45468 100644 --- a/invoice.py +++ b/invoice.py @@ -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'