[FIX] account_payment_order: Use 'index' instead of 'select'

This commit is contained in:
Adrien Peiffer (ACSONE)
2016-11-21 10:23:25 +01:00
committed by Pedro M. Baeza
parent 63ca3e4868
commit 9bc158679f
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ class AccountPaymentLine(models.Model):
name = fields.Char(string='Payment Reference', readonly=True, copy=False)
order_id = fields.Many2one(
'account.payment.order', string='Payment Order',
ondelete='cascade', select=True)
ondelete='cascade', index=True)
company_id = fields.Many2one(
related='order_id.company_id', store=True, readonly=True)
company_currency_id = fields.Many2one(

View File

@@ -15,7 +15,7 @@ class BankPaymentLine(models.Model):
readonly=True)
order_id = fields.Many2one(
'account.payment.order', string='Order', ondelete='cascade',
select=True)
index=True)
payment_type = fields.Selection(
related='order_id.payment_type', string="Payment Type",
readonly=True, store=True)