diff options
| author | Yannick Tivisse <yti@odoo.com> | 2019-05-22 09:03:55 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2019-05-29 08:09:15 +0000 |
| commit | f5dfe4727c086c7577da2aef12c2d3548ba938a3 (patch) | |
| tree | 8af04c84c18ded0c1ed48c7c61640021dd9d24cb /addons/payment_transfer/models/payment.py | |
| parent | 11cab26fb0f2167bfccfc3f11db10ff308f067b4 (diff) | |
[IMP] api.py: Rename company_id/company_ids into company/companies
The goal is to be coherent with the user property.
Actually, company_id and company_ids on the environment are no fields.
Calling env.company_id returns a browse record, not an id.
Diffstat (limited to 'addons/payment_transfer/models/payment.py')
| -rw-r--r-- | addons/payment_transfer/models/payment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment_transfer/models/payment.py b/addons/payment_transfer/models/payment.py index 98dd28aaa67..4464eb01309 100644 --- a/addons/payment_transfer/models/payment.py +++ b/addons/payment_transfer/models/payment.py @@ -18,7 +18,7 @@ class TransferPaymentAcquirer(models.Model): @api.model def _create_missing_journal_for_acquirers(self, company=None): # By default, the wire transfer method uses the default Bank journal. - company = company or self.env.company_id + company = company or self.env.company acquirers = self.env['payment.acquirer'].search( [('provider', '=', 'transfer'), ('journal_id', '=', False), ('company_id', '=', company.id)]) @@ -32,7 +32,7 @@ class TransferPaymentAcquirer(models.Model): return '/payment/transfer/feedback' def _format_transfer_data(self): - company_id = self.env.company_id.id + company_id = self.env.company.id # filter only bank accounts marked as visible journals = self.env['account.journal'].search([('type', '=', 'bank'), ('company_id', '=', company_id)]) accounts = journals.mapped('bank_account_id').name_get() |
