mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract_payment_auto: Fix freze wkhtmltopdf freezed
This commit is contained in:
@@ -4,42 +4,44 @@
|
|||||||
# Copyright 2017 Tecnativa - David Vidal
|
# Copyright 2017 Tecnativa - David Vidal
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
from odoo.tests import common
|
import odoo.tests
|
||||||
from ..hooks import post_init_hook
|
from ..hooks import post_init_hook
|
||||||
|
|
||||||
|
|
||||||
class TestContractPaymentInit(common.SavepointCase):
|
@odoo.tests.post_install(True)
|
||||||
@classmethod
|
@odoo.tests.at_install(False)
|
||||||
def setUpClass(cls):
|
class TestContractPaymentInit(odoo.tests.HttpCase):
|
||||||
super(TestContractPaymentInit, cls).setUpClass()
|
|
||||||
|
|
||||||
cls.payment_method = cls.env['account.payment.method'].create({
|
def setUp(self):
|
||||||
|
super(TestContractPaymentInit, self).setUp()
|
||||||
|
|
||||||
|
self.payment_method = self.env['account.payment.method'].create({
|
||||||
'name': 'Test Payment Method',
|
'name': 'Test Payment Method',
|
||||||
'code': 'Test',
|
'code': 'Test',
|
||||||
'payment_type': 'inbound',
|
'payment_type': 'inbound',
|
||||||
})
|
})
|
||||||
cls.payment_mode = cls.env['account.payment.mode'].create({
|
self.payment_mode = self.env['account.payment.mode'].create({
|
||||||
'name': 'Test payment mode',
|
'name': 'Test payment mode',
|
||||||
'active': True,
|
'active': True,
|
||||||
'payment_method_id': cls.payment_method.id,
|
'payment_method_id': self.payment_method.id,
|
||||||
'bank_account_link': 'variable',
|
'bank_account_link': 'variable',
|
||||||
})
|
})
|
||||||
cls.partner = cls.env['res.partner'].create({
|
self.partner = self.env['res.partner'].create({
|
||||||
'name': 'Test contract partner',
|
'name': 'Test contract partner',
|
||||||
'customer_payment_mode_id': cls.payment_mode,
|
'customer_payment_mode_id': self.payment_mode,
|
||||||
})
|
})
|
||||||
cls.product = cls.env['product.product'].create({
|
self.product = self.env['product.product'].create({
|
||||||
'name': 'Custom Service',
|
'name': 'Custom Service',
|
||||||
'type': 'service',
|
'type': 'service',
|
||||||
'uom_id': cls.env.ref('product.product_uom_hour').id,
|
'uom_id': self.env.ref('product.product_uom_hour').id,
|
||||||
'uom_po_id': cls.env.ref('product.product_uom_hour').id,
|
'uom_po_id': self.env.ref('product.product_uom_hour').id,
|
||||||
'sale_ok': True,
|
'sale_ok': True,
|
||||||
})
|
})
|
||||||
cls.contract = cls.env['account.analytic.account'].create({
|
self.contract = self.env['account.analytic.account'].create({
|
||||||
'name': 'Maintenance of Servers',
|
'name': 'Maintenance of Servers',
|
||||||
})
|
})
|
||||||
company = cls.env.ref('base.main_company')
|
company = self.env.ref('base.main_company')
|
||||||
cls.journal = cls.env['account.journal'].create({
|
self.journal = self.env['account.journal'].create({
|
||||||
'name': 'Sale Journal - Test',
|
'name': 'Sale Journal - Test',
|
||||||
'code': 'HRTSJ',
|
'code': 'HRTSJ',
|
||||||
'type': 'sale',
|
'type': 'sale',
|
||||||
|
|||||||
Reference in New Issue
Block a user