<commit_before># -*- coding: utf-8 -*-
# © 2014-2016 Akretion (http://www.akretion.com)
#   @author <NAME> <<EMAIL>>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.addons.account.tests.account_test_classes\
    import AccountingTestCase
import time


class TestPayment(AccountingTestCase):

    def setUp(self):
        super(TestPayment, self).setUp()
        self.register_payments_model = self.env['account.register.payments']
        self.payment_model = self.env['account.payment']
        self.journal_model = self.env['account.journal']
        self.account_account_model = self.env['account.account']
        self.invoice_model = self.env['account.invoice']
        self.invoice_line_model = self.env['account.invoice.line']
        self.acc_bank_stmt_model = self.env['account.bank.statement']
        self.acc_bank_stmt_line_model = self.env['account.bank.statement.line']
        self.res_partner_bank_model = self.env['res.partner.bank']
        self.check_deposit_model = self.env['account.check.deposit']

        self.partner_agrolait = self.env.ref("base.res_partner_2")
        self.currency_eur_id = self.env.ref("base.EUR").id
        self.main_company = self.env.ref('base.main_company')
        self.main_company.write({'currency_id': self.currency_eur_id})
        self.product = self.env.ref("product.product_product_4")
        self.payment_method_manual_in = self.env.ref(
            "account.account_payment_method_manual_in")
        self.payment_method_manual_out = self.env.ref(
            "account.account_payment_method_manual_out")
        # check if those accounts exist otherwise create them
        self.account_receivable = self.account_account_model.search(
            [('code', '=', '411100')], limit=1)<commit_msg>[FIX] account_check_deposit: Change company currency in tests by SQL<commit_after># -*- coding: utf-8 -*-
# © 2014-2016 Akretion (http://www.akretion.com)
#   @author <NAME> <<EMAIL>>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.addons.account.tests.account_test_classes\
    import AccountingTestCase
import time


class TestPayment(AccountingTestCase):

    def setUp(self):
        super(TestPayment, self).setUp()
        self.register_payments_model = self.env['account.register.payments']
        self.payment_model = self.env['account.payment']
        self.journal_model = self.env['account.journal']
        self.account_account_model = self.env['account.account']
        self.invoice_model = self.env['account.invoice']
        self.invoice_line_model = self.env['account.invoice.line']
        self.acc_bank_stmt_model = self.env['account.bank.statement']
        self.acc_bank_stmt_line_model = self.env['account.bank.statement.line']
        self.res_partner_bank_model = self.env['res.partner.bank']
        self.check_deposit_model = self.env['account.check.deposit']

        self.partner_agrolait = self.env.ref("base.res_partner_2")
        self.currency_eur_id = self.env.ref("base.EUR").id
        self.main_company = self.env.ref('base.main_company')
        self.env.cr.execute(
            """UPDATE res_company SET currency_id = %s
            WHERE id = %s""",
            (self.main_company.id, self.currency_eur_id),
        )
        self.product = self.env.ref("product.product_product_4")
        self.payment_method_manual_in = self.env.ref(
            "account.account_payment_method_manual_in")
        self.payment_method_manual_out = self.env.ref(
            "account.account_payment_method_manual_out")
        # check if those accounts exist otherwise create them
        self.account_receivable = self.account_account_model.search(
            [('code', '=', '411100')], limit=1)
{'fraction_non_alphanumeric': 0.12980769230769232, 'fraction_numerical': 0.010683760683760684, 'mean_word_length': 3.2751141552511416, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5519824', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1178, 'n_words': 168}