mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[MIG] account_banking_pain_base: Migration to 12.0
* Standard migration procedure * README by fragments * Fixed tests * Change * Fix related no readonly in account_banking_pain_base * Override default partner bank account check on account_payment_partner * Convert Python date to string
This commit is contained in:
@@ -117,6 +117,14 @@ class AccountInvoice(models.Model):
|
||||
_("The company of the invoice %s does not match "
|
||||
"with that of the payment mode") % rec.name)
|
||||
|
||||
@api.constrains('partner_id', 'partner_bank_id')
|
||||
def validate_partner_bank_id(self):
|
||||
"""Inhibit the validation of the bank account by default, as core
|
||||
rules are not the expected one for the bank-payment suite.
|
||||
"""
|
||||
if self.env.context.get('use_old_partner_bank_id_check'):
|
||||
super().validate_partner_bank_id()
|
||||
|
||||
def partner_banks_to_show(self):
|
||||
self.ensure_one()
|
||||
if self.partner_bank_id:
|
||||
|
||||
Reference in New Issue
Block a user