mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[PEP8] Fix pep8 errors
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
'depends': [
|
||||
'account_payment',
|
||||
'base_iban', # for manual_bank_tranfer
|
||||
],
|
||||
],
|
||||
'conflicts': [
|
||||
# lp:account-payment/account_payment_extension also adds
|
||||
# a type field to payment.mode, with a very similar purpose.
|
||||
@@ -44,7 +44,7 @@
|
||||
# Proposal to resolve: make account_payment_extension depend
|
||||
# on the present account_banking_payment_export module.
|
||||
'account_payment_extension',
|
||||
],
|
||||
],
|
||||
'data': [
|
||||
'view/account_payment.xml',
|
||||
'view/bank_payment_manual.xml',
|
||||
|
||||
@@ -36,7 +36,7 @@ class payment_order(orm.Model):
|
||||
[('payment', 'Payment'), ('debit', 'Direct debit')],
|
||||
'Payment order type', required=True,
|
||||
readonly=True, states={'draft': [('readonly', False)]},
|
||||
),
|
||||
),
|
||||
'mode_type': fields.related(
|
||||
'mode', 'type', type='many2one', relation='payment.mode.type',
|
||||
string='Payment Type'),
|
||||
@@ -74,7 +74,7 @@ class payment_order(orm.Model):
|
||||
'target': 'new',
|
||||
'res_id': wizard_id,
|
||||
'nodestroy': True,
|
||||
}
|
||||
}
|
||||
else:
|
||||
# should all be manual orders without type or wizard model
|
||||
for order in orders[1:]:
|
||||
|
||||
@@ -49,14 +49,14 @@ class payment_mode(orm.Model):
|
||||
'payment.mode.type', 'Payment type',
|
||||
required=True,
|
||||
help='Select the Payment Type for the Payment Mode.'
|
||||
),
|
||||
),
|
||||
'payment_order_type': fields.related(
|
||||
'type', 'payment_order_type', readonly=True, type='selection',
|
||||
selection=[('payment', 'Payment'), ('debit', 'Direct debit')],
|
||||
string="Payment Order Type"),
|
||||
'active': fields.boolean('Active'),
|
||||
}
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'active': True,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@ class payment_mode_type(orm.Model):
|
||||
'name': fields.char(
|
||||
'Name', size=64, required=True,
|
||||
help='Payment Type'
|
||||
),
|
||||
),
|
||||
'code': fields.char(
|
||||
'Code', size=64, required=True,
|
||||
help='Specify the Code for Payment Type'
|
||||
),
|
||||
),
|
||||
'suitable_bank_types': fields.many2many(
|
||||
'res.partner.bank.type',
|
||||
'bank_type_payment_type_rel',
|
||||
@@ -48,11 +48,11 @@ class payment_mode_type(orm.Model):
|
||||
help=('Select the Payment Wizard for payments of this type. '
|
||||
'Leave empty for manual processing'),
|
||||
domain=[('osv_memory', '=', True)],
|
||||
),
|
||||
),
|
||||
'payment_order_type': fields.selection(
|
||||
[('payment', 'Payment'), ('debit', 'Direct debit')],
|
||||
'Payment order type', required=True,
|
||||
),
|
||||
),
|
||||
'active': fields.boolean('Active'),
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class payment_order_create(orm.TransientModel):
|
||||
domain += [
|
||||
('account_id.type', 'in', ('payable', 'receivable')),
|
||||
('amount_to_pay', '>', 0)
|
||||
]
|
||||
]
|
||||
return True
|
||||
|
||||
def search_entries(self, cr, uid, ids, context=None):
|
||||
@@ -59,7 +59,7 @@ class payment_order_create(orm.TransientModel):
|
||||
('move_id.state', '=', 'posted'),
|
||||
('reconcile_id', '=', False),
|
||||
('company_id', '=', payment.mode.company_id.id),
|
||||
]
|
||||
]
|
||||
self.extend_payment_order_domain(
|
||||
cr, uid, payment, domain, context=context)
|
||||
# end account_direct_debit
|
||||
@@ -67,7 +67,7 @@ class payment_order_create(orm.TransientModel):
|
||||
domain = domain + [
|
||||
'|', ('date_maturity', '<=', search_due_date),
|
||||
('date_maturity', '=', False)
|
||||
]
|
||||
]
|
||||
line_ids = line_obj.search(cr, uid, domain, context=context)
|
||||
context.update({'line_ids': line_ids})
|
||||
model_data_ids = mod_obj.search(
|
||||
@@ -162,7 +162,7 @@ class payment_order_create(orm.TransientModel):
|
||||
'currency': (line.invoice and line.invoice.currency_id.id
|
||||
or line.journal_id.currency.id
|
||||
or line.journal_id.company_id.currency_id.id),
|
||||
}
|
||||
}
|
||||
return res
|
||||
|
||||
def create_payment(self, cr, uid, ids, context=None):
|
||||
|
||||
Reference in New Issue
Block a user