mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[IMP] account_payment_sale: Remove dependancies on demo data on tests
This commit is contained in:
@@ -53,8 +53,22 @@ class CommonTestCase(TransactionCase):
|
||||
}
|
||||
)
|
||||
cls.products = {
|
||||
"prod_order": cls.env.ref("product.product_order_01"),
|
||||
"prod_del": cls.env.ref("product.product_delivery_01"),
|
||||
"prod_order": cls.env["product.product"].create(
|
||||
{
|
||||
"name": "Test product order",
|
||||
"detailed_type": "consu",
|
||||
"list_price": 280,
|
||||
"standard_price": 235,
|
||||
}
|
||||
),
|
||||
"prod_del": cls.env["product.product"].create(
|
||||
{
|
||||
"name": "Test product delivery",
|
||||
"detailed_type": "consu",
|
||||
"list_price": 70,
|
||||
"standard_price": 55,
|
||||
}
|
||||
),
|
||||
"serv_order": cls.env["product.product"].create(
|
||||
{
|
||||
"name": "Test service product order",
|
||||
|
||||
@@ -92,7 +92,14 @@ class TestSaleOrder(CommonTestCase):
|
||||
{
|
||||
"advance_payment_method": "fixed",
|
||||
"fixed_amount": 5,
|
||||
"product_id": self.env.ref("sale.advance_product_0").id,
|
||||
"product_id": self.env["product.product"]
|
||||
.create(
|
||||
{
|
||||
"name": "Deposit",
|
||||
"type": "service",
|
||||
}
|
||||
)
|
||||
.id,
|
||||
"sale_order_ids": order,
|
||||
}
|
||||
)
|
||||
@@ -113,7 +120,15 @@ class TestSaleOrder(CommonTestCase):
|
||||
Expected result:
|
||||
Two invoices should be generated
|
||||
"""
|
||||
payment_mode_2 = self.env.ref("account_payment_mode.payment_mode_outbound_dd1")
|
||||
payment_mode_2 = self.env["account.payment.mode"].create(
|
||||
{
|
||||
"name": "Direct Debit of suppliers from Société Générale",
|
||||
"bank_account_link": "variable",
|
||||
"payment_method_id": self.env.ref(
|
||||
"account.account_payment_method_manual_out"
|
||||
).id,
|
||||
}
|
||||
)
|
||||
order_1 = self.create_sale_order()
|
||||
order_2 = self.create_sale_order(payment_mode_2)
|
||||
orders = order_1 | order_2
|
||||
|
||||
Reference in New Issue
Block a user