diff --git a/modules/account_cash_rounding/tests/scenario_account_cash_rounding_purchase.rst b/modules/account_cash_rounding/tests/scenario_account_cash_rounding_purchase.rst index 4befdcaa55..b1b840d222 100644 --- a/modules/account_cash_rounding/tests/scenario_account_cash_rounding_purchase.rst +++ b/modules/account_cash_rounding/tests/scenario_account_cash_rounding_purchase.rst @@ -8,12 +8,14 @@ Imports:: >>> from proteus import Model >>> from trytond.modules.account.tests.tools import create_chart, get_accounts + >>> from trytond.modules.account_invoice.tests.tools import create_payment_term >>> from trytond.modules.company.tests.tools import create_company, get_company >>> from trytond.tests.tools import activate_modules Activate modules:: - >>> config = activate_modules(['account_cash_rounding', 'purchase']) + >>> config = activate_modules( + ... ['account_cash_rounding', 'account_invoice', 'purchase']) Create company:: @@ -44,11 +46,17 @@ Create party:: >>> party = Party(name='Party') >>> party.save() +Create payment term:: + + >>> payment_term = create_payment_term() + >>> payment_term.save() + Create purchase:: >>> Purchase = Model.get('purchase.purchase') >>> purchase = Purchase() >>> purchase.party = party + >>> purchase.payment_term = payment_term >>> line = purchase.lines.new() >>> line.quantity = 1 >>> line.unit_price = Decimal('42.07') diff --git a/modules/account_cash_rounding/tests/scenario_account_cash_rounding_sale.rst b/modules/account_cash_rounding/tests/scenario_account_cash_rounding_sale.rst index 773b7bfc35..c2d0076165 100644 --- a/modules/account_cash_rounding/tests/scenario_account_cash_rounding_sale.rst +++ b/modules/account_cash_rounding/tests/scenario_account_cash_rounding_sale.rst @@ -8,12 +8,14 @@ Imports:: >>> from proteus import Model >>> from trytond.modules.account.tests.tools import create_chart, get_accounts + >>> from trytond.modules.account_invoice.tests.tools import create_payment_term >>> from trytond.modules.company.tests.tools import create_company, get_company >>> from trytond.tests.tools import activate_modules Activate modules:: - >>> config = activate_modules(['account_cash_rounding', 'sale']) + >>> config = activate_modules( + ... ['account_cash_rounding', 'account_invoice', 'sale']) Create company:: @@ -53,11 +55,17 @@ Create party:: >>> party = Party(name='Party') >>> party.save() +Create payment term:: + + >>> payment_term = create_payment_term() + >>> payment_term.save() + Create sale:: >>> Sale = Model.get('sale.sale') >>> sale = Sale() >>> sale.party = party + >>> sale.payment_term = payment_term >>> line = sale.lines.new() >>> line.quantity = 1 >>> line.unit_price = Decimal('42.02')