def METHOD_NAME(self):
    # Assertion on the constraints to ensure the consistency
    # for company dependent fields
    with self.assertRaises(UserError):
        self.payment_mode_model.create(
            {
                "name": "Direct Debit of suppliers from Bank 2",
                "bank_account_link": "variable",
                "payment_method_id": self.manual_out.id,
                "company_id": self.company.id,
                "fixed_journal_id": self.journal_c2.id,
            }
        )
    with self.assertRaises(UserError):
        self.payment_mode_model.create(
            {
                "name": "Direct Debit of suppliers from Bank 3",
                "bank_account_link": "variable",
                "payment_method_id": self.manual_out.id,
                "company_id": self.company.id,
                "variable_journal_ids": [(6, 0, [self.journal_c2.id])],
            }
        )
    with self.assertRaises(UserError):
        self.payment_mode_model.create(
            {
                "name": "Direct Debit of suppliers from Bank 4",
                "bank_account_link": "fixed",
                "payment_method_id": self.manual_out.id,
                "company_id": self.company.id,
            }
        )
    self.journal_c1.outbound_payment_method_ids = False
    with self.assertRaises(ValidationError):
        self.payment_mode_model.create(
            {
                "name": "Direct Debit of suppliers from Bank 5",
                "bank_account_link": "fixed",
                "payment_method_id": self.manual_out.id,
                "company_id": self.company.id,
                "fixed_journal_id": self.journal_c1.id,
            }
        )
    self.journal_c1.inbound_payment_method_ids = False
    with self.assertRaises(ValidationError):
        self.payment_mode_model.create(
            {
                "name": "Direct Debit of suppliers from Bank 5",
                "bank_account_link": "fixed",
                "payment_method_id": self.env.ref(
                    "account.account_payment_method_manual_in"
                ).id,
                "company_id": self.company.id,
                "fixed_journal_id": self.journal_c1.id,
            }
        )