2013-04-02 10:46:15 +00:00
|
|
|
-
|
|
|
|
In order to test anglo_saxon Configure Different Accounts.
|
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_stock_valuation}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X3000
|
2013-04-02 10:46:15 +00:00
|
|
|
name: Stock Valuation Account- (test)
|
|
|
|
parent_id: account.cas
|
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_asset
|
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
Configure Stock Interim account (Received).
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_stock_input}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X2800
|
2013-04-02 10:46:15 +00:00
|
|
|
name: Stock Interim account (Received)
|
2013-04-22 07:21:23 +00:00
|
|
|
parent_id: account.cos
|
2013-04-02 10:46:15 +00:00
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_expense
|
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
Configure Stock Interim account (Delivered).
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_stock_output}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X2801
|
2013-04-02 10:46:15 +00:00
|
|
|
name: Stock Interim account (Delivered)
|
2013-04-05 08:58:18 +00:00
|
|
|
parent_id: account.rev
|
2013-04-02 10:46:15 +00:00
|
|
|
type: other
|
2013-04-05 08:58:18 +00:00
|
|
|
user_type: account.data_account_type_income
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
Configure Price difference creditor Account.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_price_difference}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X7095
|
2013-04-02 10:46:15 +00:00
|
|
|
name: Price difference creditor Account
|
2013-04-05 08:58:18 +00:00
|
|
|
parent_id: account.cos
|
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_expense
|
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
Configure Cash Bank Account.
|
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_cash}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X5000
|
2013-04-19 08:14:38 +00:00
|
|
|
name: Cash/Bank Account
|
|
|
|
parent_id: account.cash
|
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_asset
|
2014-01-14 20:18:34 +00:00
|
|
|
reconcile: True
|
2013-04-19 08:14:38 +00:00
|
|
|
-
|
|
|
|
Configure Creditor Account Payable.
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_payable}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X440001
|
2013-04-05 08:58:18 +00:00
|
|
|
name: Creditor Account Payable
|
|
|
|
parent_id: account.a_pay
|
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_payable
|
2014-01-14 20:18:34 +00:00
|
|
|
reconcile: True
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
Configure Debtor Account Receivable.
|
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_receivable}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X400001
|
2013-04-19 08:14:38 +00:00
|
|
|
name: Debtor Account Receivable
|
|
|
|
parent_id: account.a_recv
|
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_receivable
|
2014-01-14 20:18:34 +00:00
|
|
|
reconcile: True
|
2013-04-19 08:14:38 +00:00
|
|
|
-
|
|
|
|
Configure Cost of Good sale Account.
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_cogs}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X7000
|
2013-04-05 08:58:18 +00:00
|
|
|
name: Cost of goods sale account
|
|
|
|
parent_id: account.o_expense
|
2013-04-02 10:46:15 +00:00
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_expense
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
Configure Income Account.
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!record {model: account.account, id: account_anglo_income}:
|
2013-04-22 07:21:23 +00:00
|
|
|
code: X8000
|
2013-04-05 08:58:18 +00:00
|
|
|
name: Income Account
|
|
|
|
parent_id: account.o_income
|
|
|
|
type: other
|
|
|
|
user_type: account.data_account_type_income
|
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I configure the account receivable of supplier
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
!record {model: res.partner, id: base.res_partner_3}:
|
2013-06-17 08:13:18 +00:00
|
|
|
property_account_payable: account_anglo_payable
|
|
|
|
property_account_receivable: account_anglo_receivable
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I configure the account receivable of Customer.
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
!record {model: res.partner, id: base.res_partner_13}:
|
2013-06-17 08:13:18 +00:00
|
|
|
property_account_payable: account_anglo_payable
|
|
|
|
property_account_receivable: account_anglo_receivable
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I configure the product category with stock valuation account.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-19 08:35:15 +00:00
|
|
|
!record {model: product.category, id: product.product_category_4}:
|
2013-06-17 08:13:18 +00:00
|
|
|
property_stock_valuation_account_id: account_anglo_stock_valuation
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I configure the product with required accounts, and cost method = standard
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-04 05:35:54 +00:00
|
|
|
!python {model: product.product}: |
|
2014-02-11 10:12:23 +00:00
|
|
|
self.write(cr, uid, [ref('product.product_product_10')], {'list_price': 20.00,'standard_price': 9,'categ_id': ref('product.product_category_4'),'valuation': 'real_time',
|
2013-06-17 08:13:18 +00:00
|
|
|
'property_account_income': ref('account_anglo_income'),'property_account_expense': ref('account_anglo_cogs'),
|
|
|
|
'property_account_creditor_price_difference': ref('account_anglo_price_difference'),'property_stock_account_input': ref('account_anglo_stock_input'),
|
|
|
|
'property_stock_account_output': ref('account_anglo_stock_output'), 'cost_method': 'standard'})
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I create a draft Purchase Order.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-10 11:53:51 +00:00
|
|
|
!record {model: purchase.order, id: purchase_order_001}:
|
2013-04-02 10:46:15 +00:00
|
|
|
partner_id: base.res_partner_3
|
2013-06-24 09:03:29 +00:00
|
|
|
location_id: stock.stock_location_stock
|
2013-04-02 10:46:15 +00:00
|
|
|
pricelist_id: 1
|
|
|
|
order_line:
|
2014-02-11 10:12:23 +00:00
|
|
|
- product_id: product.product_product_10
|
2013-04-02 10:46:15 +00:00
|
|
|
product_qty: 1
|
2013-04-04 05:35:54 +00:00
|
|
|
price_unit: 10
|
2014-01-02 12:41:43 +00:00
|
|
|
date_planned: !eval "'%s' % (time.strftime('%Y-%m-%d'))"
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I confirm the purchase order.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-10 11:53:51 +00:00
|
|
|
!workflow {model: purchase.order, ref: purchase_order_001, action: purchase_confirm}
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2014-07-16 09:58:22 +00:00
|
|
|
Receipt is ready for process so now we do it.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-08-13 05:24:24 +00:00
|
|
|
!python {model: stock.picking}: |
|
2014-07-06 14:44:26 +00:00
|
|
|
picking_id = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001"), context=context).picking_ids[0]
|
|
|
|
picking_id.do_transfer()
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-24 09:03:29 +00:00
|
|
|
I check the Stock Interim account (Received) is credited successfully.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_stock_input, string : Stock Interim account (Received) is not credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 9
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-24 09:03:29 +00:00
|
|
|
I check the Stock valuation account is debited sucessfully.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_stock_valuation, string : Stock valuation account is not debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 9
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
|
|
|
I Validate Invoice of Purchase Order.
|
|
|
|
-
|
|
|
|
!python {model: purchase.order}: |
|
2013-04-10 11:53:51 +00:00
|
|
|
invoice_ids = [x.id for x in self.browse(cr, uid, ref("purchase_order_001")).invoice_ids]
|
2014-07-07 09:23:06 +00:00
|
|
|
self.pool.get('account.invoice').signal_workflow(cr, uid, invoice_ids, 'invoice_open')
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check the Stock Interim account (Received) is debited sucessfully when Invoice validated.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_stock_input, string : Stock Interim account (Received) is not debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 9
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check the Price difference creditor Account is debited sucessfully when Invoice validated.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_price_difference, string : Price difference creditor Account is not debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 1
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check Payable(creditor) Account is Credited sucessfully when Invoice validated.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_payable, string : Payable(creditor) Account is not Credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 10
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I open the Invoice.
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
|
|
|
!python {model: purchase.order}: |
|
2013-04-10 11:53:51 +00:00
|
|
|
po = self.browse(cr, uid, ref("purchase_order_001"))
|
2013-04-04 05:35:54 +00:00
|
|
|
for invoice in po.invoice_ids:
|
2014-07-07 09:23:06 +00:00
|
|
|
invoice.signal_workflow('invoice_open')
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I pay the invoice.
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
|
|
|
!python {model: purchase.order}: |
|
2013-04-10 11:53:51 +00:00
|
|
|
invoice_ids = self.browse(cr, uid, ref("purchase_order_001")).invoice_ids
|
|
|
|
order = self.browse(cr, uid, ref("purchase_order_001"))
|
2013-04-05 08:58:18 +00:00
|
|
|
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', order.company_id.id)], limit=1)
|
|
|
|
for invoice in invoice_ids:
|
2013-06-17 08:13:18 +00:00
|
|
|
invoice.pay_and_reconcile(invoice.amount_total, ref('account_anglo_cash'), ref('account.period_8'), journal_ids[0], ref('account_anglo_cash'), ref('account.period_8'), journal_ids[0], name='test')
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check Payable(Creditors) Account is Debited sucessfully after invoice paid.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_payable, string : Payable(Creditors) Account is not Debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 10
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check Bank/Cash account is credited sucessfully after invoice paid.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_cash, string: Bank/Cash account is not credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 10
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-05 08:58:18 +00:00
|
|
|
I create an Outgoing Picking order
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-10 11:53:51 +00:00
|
|
|
!record {model: stock.picking, id: stock_picking_out001}:
|
2013-04-19 08:14:38 +00:00
|
|
|
partner_id: base.res_partner_13
|
2013-04-04 05:35:54 +00:00
|
|
|
move_lines:
|
|
|
|
- company_id: base.main_company
|
2013-06-24 09:03:29 +00:00
|
|
|
location_id: stock.stock_location_stock
|
2014-02-11 10:12:23 +00:00
|
|
|
product_id: product.product_product_10
|
2013-09-09 09:10:56 +00:00
|
|
|
product_uom_qty: 1.0
|
2013-04-04 05:35:54 +00:00
|
|
|
product_uom: product.product_uom_unit
|
|
|
|
location_dest_id: stock.stock_location_customers
|
|
|
|
move_type: direct
|
2014-09-11 14:02:44 +00:00
|
|
|
invoice_state: 2binvoiced
|
2013-08-13 10:13:28 +00:00
|
|
|
picking_type_id: stock.picking_type_out
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I need to check the availability of the product, So I make my picking order for processing later.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
|
|
|
!python {model: stock.picking}: |
|
2013-08-13 05:24:24 +00:00
|
|
|
self.action_confirm(cr, uid, [ref('stock_picking_out001')], context=context)
|
|
|
|
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check the product availability, Product is available in the stock and ready to be sent.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
|
|
|
!python {model: stock.picking}: |
|
2013-08-13 07:27:14 +00:00
|
|
|
picking = self.browse(cr, uid, ref("stock_picking_out001"))
|
|
|
|
assert picking.state == "confirmed", "Picking should be confirmed."
|
|
|
|
for move_line in picking.move_lines:
|
|
|
|
assert move_line.state == "confirmed", "Move should be confirmed."
|
2013-08-13 05:24:24 +00:00
|
|
|
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I process the delivery.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-08-13 05:24:24 +00:00
|
|
|
!python {model: stock.picking}: |
|
2014-07-06 14:44:26 +00:00
|
|
|
picking = self.pool.get('stock.picking').browse(cr, uid, ref("stock_picking_out001"), context=context)
|
|
|
|
picking.do_transfer()
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I check Stock Interim account (Delivery) is debited successfully.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_stock_output, string : Stock Interim account (Delivery) is not debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 9
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check the Stock valuation account is credited sucessfully.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_stock_valuation, string : Stock valuation account is not credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 9
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
|
|
|
As the Invoice state of the picking order is To be invoiced. I create invoice for my outgoing picking order.
|
|
|
|
-
|
|
|
|
!python {model: stock.invoice.onshipping}: |
|
2014-01-02 12:41:43 +00:00
|
|
|
wiz_id = self.create(cr, uid, {'journal_id': ref('account.sales_journal')},
|
2013-04-10 11:53:51 +00:00
|
|
|
{'active_ids': [ref("stock_picking_out001")], "active_model": "stock.picking"})
|
2013-09-09 09:10:56 +00:00
|
|
|
self.create_invoice(cr, uid, [wiz_id], {"active_ids": [ref("stock_picking_out001")], "active_id": ref("stock_picking_out001")})
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
|
|
|
I check that the customer invoice is created successfully.
|
|
|
|
-
|
|
|
|
!python {model: account.invoice}: |
|
2013-04-19 08:14:38 +00:00
|
|
|
partner_id = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001')).partner_id.id
|
|
|
|
inv_ids = self.search(cr, uid, [('type','=','out_invoice'),('partner_id','=',partner_id)])
|
2013-04-04 05:35:54 +00:00
|
|
|
assert inv_ids, 'No Invoice is generated!'
|
|
|
|
-
|
2013-04-05 08:58:18 +00:00
|
|
|
I open the Invoice.
|
|
|
|
-
|
|
|
|
!python {model: stock.picking}: |
|
2013-04-19 08:14:38 +00:00
|
|
|
move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001')).name
|
|
|
|
account_invoice = self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
|
2014-07-07 09:23:06 +00:00
|
|
|
self.pool.get('account.invoice').signal_workflow(cr, uid, account_invoice, 'invoice_open')
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check Income Account is Credited sucessfully when Invoice validated.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_income, string : Income Account is not Credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 20
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I check Cost of goods sold account for debit.
|
2013-04-04 05:35:54 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_cogs, string : Cost of goods sale is not Debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 9
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
I check Stock Interim account (Delivery)
|
2013-04-02 10:46:15 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_stock_output, string : Stock Interim account (Delivery) is not credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 9
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-04-19 08:14:38 +00:00
|
|
|
I check Receivable(Debtor) Account for debit.
|
2013-04-05 08:58:18 +00:00
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_receivable, string : Receivable(Debtors) Account is not Debited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 20
|
2013-06-17 08:13:18 +00:00
|
|
|
-
|
|
|
|
I pay the invoice.
|
|
|
|
-
|
|
|
|
!python {model: account.invoice}: |
|
|
|
|
move_name = self.pool.get('stock.picking').browse(cr, uid, ref('stock_picking_out001')).name
|
|
|
|
account_invoice= self.pool.get('account.invoice').search(cr, uid, [('origin', '=', move_name)])
|
|
|
|
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash')], limit=1)
|
|
|
|
pay = self.pay_and_reconcile(cr, uid, account_invoice,
|
|
|
|
20.0, ref('account_anglo_cash'), ref('account.period_8'),
|
|
|
|
journal_ids[0], ref('account_anglo_cash'),
|
|
|
|
ref('account.period_8'), journal_ids[0],
|
|
|
|
name='Payment for test customer invoice')
|
|
|
|
assert (pay == True), "Incorrect Payment."
|
2013-04-19 08:14:38 +00:00
|
|
|
-
|
|
|
|
I check Receivable(Debtor) Account for credit.
|
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_receivable, string : Receivable(Debtors) Account is not Credited successfully.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- credit == 20
|
|
|
|
-
|
|
|
|
I check Bank/Cash account is debited sucessfully after invoice paid.
|
|
|
|
-
|
2013-06-17 08:13:18 +00:00
|
|
|
!assert {model: account.account, id : account_anglo_cash, string: Bank/Cash account is not successfully credited.}:
|
2013-04-19 08:14:38 +00:00
|
|
|
- debit == 20
|