mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Merge pull request #590 from guewen/10.0-account-payment-order-index
[10.0] Add indexes on account payment models
This commit is contained in:
@@ -14,7 +14,9 @@ class AccountMoveLine(models.Model):
|
||||
help='Bank account on which we should pay the supplier')
|
||||
bank_payment_line_id = fields.Many2one(
|
||||
'bank.payment.line', string='Bank Payment Line',
|
||||
readonly=True)
|
||||
readonly=True,
|
||||
index=True,
|
||||
)
|
||||
payment_line_ids = fields.One2many(
|
||||
comodel_name='account.payment.line',
|
||||
inverse_name='move_line_id',
|
||||
|
||||
@@ -58,7 +58,9 @@ class AccountPaymentLine(models.Model):
|
||||
], string='Communication Type', required=True, default='normal')
|
||||
# v8 field : state
|
||||
bank_line_id = fields.Many2one(
|
||||
'bank.payment.line', string='Bank Payment Line', readonly=True)
|
||||
'bank.payment.line', string='Bank Payment Line', readonly=True,
|
||||
index=True,
|
||||
)
|
||||
|
||||
_sql_constraints = [(
|
||||
'name_company_unique',
|
||||
|
||||
@@ -9,4 +9,8 @@ class AccountMoveLine(models.Model):
|
||||
_inherit = 'account.move.line'
|
||||
|
||||
payment_mode_id = fields.Many2one(
|
||||
'account.payment.mode', string='Payment Mode', ondelete='restrict')
|
||||
'account.payment.mode',
|
||||
string='Payment Mode',
|
||||
ondelete='restrict',
|
||||
index=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user