Steps_scenario_account_stock_anglo_saxon - lampmantech/behaving.trytond GitHub Wiki

scenario_account_stock_anglo_saxon.py

Account Stock Continental Scenario

This is a straight cut-and-paste from trytond_account-2.8.1/tests/scenario_account_reconciliation.rst Unfinished.

STEP: Set the fiscal years to use anglo-saxon accounting

Given \ Set the fiscal years to use anglo-saxon accounting. Create the company and fiscal years first, but do it before you create the chart of accounts (I think).

STEP: T/ASAS/SASAS Create products of type "{uType}" from the ProductTemplate named "{uName}" with fields

Given \ Create products of type "{uType}" from the ProductTemplate named \ "{uName}" with fields

name cost_price_method description
product_fixed fixed Product Fixed
product_average average Product Average

Idempotent.

STEP: T/ASAS/SASAS Purchase products on the P. O. with description "{uDescription}" from supplier "{uSupplier}" with quantities

Given \ Purchase products on the P. O. with description "{uDescription}" \ from supplier "{uSupplier}" with quantities

description quantity unit_price
product_fixed 5.0 4
product_average 7.0 6

Idempotent.

STEP: T/ASAS/SASAS Quote and Confirm and Process a P. O. with description "{uDescription}" from supplier "{uSupplier}"

Given \ T/ASAS/SASAS Quote and Confirm and Process a P. O. \ with description "{uDescription}" from supplier "{uSupplier}" Idempotent.

STEP: T/ASAS/SASAS Receive 9 products from the P. O. with description "{uDescription}" from supplier "{uSupplier}" with quantities

Given \ T/ASAS/SASAS Receive 9 products from the P. O. with description "{uDescription}" \ from supplier "{uSupplier}" with quantities Idempotent.

STEP: T/ASAS/SASAS After receiving 9 products assert the account credits and debits

NOT idempotent

STEP: T/ASAS/SASAS Open a purchase invoice to pay for what we received from the P. O. with description "{uDescription}" to supplier "{uSupplier}" with prices

STEP: T/ASAS/SASAS After paying for what we received assert the account credits and debits

NOT idempotent

STEP: T/ASAS/SASAS After shipping to customer assert the account credits and debits

Given \ T/ASAS/SASAS After shipping to customer assert the account credits and debits NOT idempotent.

STEP: T/ASAS/SASAS After posting the invoice to customer assert the account credits and debits

STEP: T/ASAS/SASAS Create an Invoice to supplier "{uSupplier}" with PaymentTerm "{uPaymentTerm}" by an accountant with quantities

Given \ Create an Invoice to supplier "uSupplier" with PaymentTerm "uPaymentTerm" \ by an accountant with quantities

description quantity unit_price
product_fixed 5.0 4.00

Idempotent.

STEP: T/ASAS/SASAS Create an Invoice to supplier "{uSupplier}" with PaymentTerm "{uPaymentTerm}" by an accountant with negative quantities

Unfinished >>> invoice = Invoice() >>> invoice.party = customer >>> invoice.payment_term = payment_term >>> invoice_line = invoice.lines.new() >>> invoice_line.product = product >>> invoice_line.quantity = -1 >>> invoice.save() >>> Invoice.post([invoice.id], config.context) >>> assert invoice.state == u'posted' >>> move = invoice.move >>> line_cogs, = (l for l in move.lines if l.account == cogs) >>> assert line_cogs.credit == Decimal('5.00') >>> line_stock, = (l for l in move.lines if l.account == stock_customer) >>> assert line_stock.debit == Decimal('5.00')

This file is automatically generated from the source code: do not edit.

⚠️ **GitHub.com Fallback** ⚠️