diff options
| author | ced <> | 2007-12-17 07:58:35 +0000 |
|---|---|---|
| committer | ced <> | 2007-12-17 07:58:35 +0000 |
| commit | d72bb2f99eb2c3f7caeb124370d59fdd9db74b96 (patch) | |
| tree | 8d14f350ed630f8249d7e32071059300d7a539ac | |
| parent | 4afd281c3f2fe6b63fd0e3532b9a071a7f427499 (diff) | |
Remove use of object_proxy in wizard pay invoice
bzr revid: ced-a2d70084010fcc9b3183eb036a69ed6cef7d6f12
| -rw-r--r-- | addons/account/wizard/wizard_pay_invoice.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/addons/account/wizard/wizard_pay_invoice.py b/addons/account/wizard/wizard_pay_invoice.py index 757c5e25a57..9f19f36b504 100644 --- a/addons/account/wizard/wizard_pay_invoice.py +++ b/addons/account/wizard/wizard_pay_invoice.py @@ -43,7 +43,6 @@ pay_fields = { } def _pay_and_reconcile(self, cr, uid, data, context): - service = netsvc.LocalService("object_proxy") form = data['form'] period_id = form.get('period_id', False) journal_id = form.get('journal_id', False) @@ -53,11 +52,9 @@ def _pay_and_reconcile(self, cr, uid, data, context): acc_id = pool.get('account.journal').browse(cr, uid, journal_id, context).default_credit_account_id.id if not acc_id: raise wizard.except_wizard('Error !', 'Your journal must have a default credit and debit account.') - service.execute(cr.dbname, uid, 'account.invoice', 'pay_and_reconcile', [data['id']], form['amount'], acc_id, period_id, journal_id, writeoff_account_id, period_id, writeoff_journal_id, context) - return {} - -def _trans_reconcile(self, cr, uid, data, context): - service = netsvc.LocalService("object_proxy") + pool.get('account.invoice').pay_and_reconcile(cr, uid, [data['id']], + form['amount'], acc_id, period_id, journal_id, writeoff_account_id, + period_id, writeoff_journal_id, context=context) return {} def _wo_check(self, cr, uid, data, context): |
