parent
1915d0bfef
commit
be22df97d6
|
@ -273,8 +273,8 @@
|
||||||
obj_lots = self.pool.get('auction.lots')
|
obj_lots = self.pool.get('auction.lots')
|
||||||
lots_id = obj_lots.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
lots_id = obj_lots.browse(cr, uid, ref("auction_lots_woodenchair0"))
|
||||||
self.pay_and_reconcile(cr, uid, [lots_id.ach_inv_id.id], 4120.0,
|
self.pay_and_reconcile(cr, uid, [lots_id.ach_inv_id.id], 4120.0,
|
||||||
ref('account.account_type_cash_moves'), ref('account.period_8'),
|
ref('account.cash'), ref('account.period_8'),
|
||||||
ref('account.cash_journal'), ref('account.account_type_cash_moves'),
|
ref('account.cash_journal'), ref('account.cash'),
|
||||||
ref('account.period_8'), ref('account.cash_journal'), name='Furniture')
|
ref('account.period_8'), ref('account.cash_journal'), name='Furniture')
|
||||||
-
|
-
|
||||||
I check that "Buyer Invoice Reconciled" field is marked.
|
I check that "Buyer Invoice Reconciled" field is marked.
|
||||||
|
|
|
@ -138,6 +138,10 @@
|
||||||
<field name="act_to" ref="act_cancel"/>
|
<field name="act_to" ref="act_cancel"/>
|
||||||
<field name="signal">button_cancel</field>
|
<field name="signal">button_cancel</field>
|
||||||
</record>
|
</record>
|
||||||
|
<record id="trans_confirm_mto_purchase" model="workflow.transition">
|
||||||
|
<field name="act_from" ref="act_confirm_mto"/>
|
||||||
|
<field name="act_to" ref="act_make_done"/>
|
||||||
|
</record>
|
||||||
<record id="trans_confirm_mto_confirm" model="workflow.transition">
|
<record id="trans_confirm_mto_confirm" model="workflow.transition">
|
||||||
<field name="act_from" ref="act_confirm_mto"/>
|
<field name="act_from" ref="act_confirm_mto"/>
|
||||||
<field name="act_to" ref="act_confirm"/>
|
<field name="act_to" ref="act_confirm"/>
|
||||||
|
|
|
@ -187,7 +187,7 @@
|
||||||
<field name="action">action_po_assign()</field>
|
<field name="action">action_po_assign()</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="trans_confirm_mto_buy" model="workflow.transition">
|
<record id="procurement.trans_confirm_mto_purchase" model="workflow.transition">
|
||||||
<field name="act_from" ref="procurement.act_confirm_mto"/>
|
<field name="act_from" ref="procurement.act_confirm_mto"/>
|
||||||
<field name="act_to" ref="act_buy"/>
|
<field name="act_to" ref="act_buy"/>
|
||||||
<field name="condition">check_buy()</field>
|
<field name="condition">check_buy()</field>
|
||||||
|
|
|
@ -1196,4 +1196,4 @@ class sale_config_picking_policy(osv.osv_memory):
|
||||||
|
|
||||||
sale_config_picking_policy()
|
sale_config_picking_policy()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -65,31 +65,17 @@
|
||||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
assert invoice_id, "Invoice is not in the open state"
|
assert invoice_id, "Invoice is not in the open state"
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
I pay the invoice
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
|
|
||||||
amount: 3000.0
|
|
||||||
date: '2010-07-17'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: test
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "active_model": "account.invoice",
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
"tz":False,"record_id": so.invoice_ids[0].id, "active_ids": [so.invoice_ids[0].id], "type":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id})
|
3000.0, ref('account.cash'), ref('account.period_5'),
|
||||||
-
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
Creating an account invoice pay writeoff entry.
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
-
|
name='test')
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_5}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
-
|
||||||
I verify that invoice has transit from Open to Paid state
|
I verify that invoice has transit from Open to Paid state
|
||||||
-
|
-
|
||||||
|
@ -138,45 +124,22 @@
|
||||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
assert invoice_id, "Invoice is not in the open state"
|
assert invoice_id, "Invoice is not in the open state"
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
I assign an analytic jounal to the bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst2}:
|
|
||||||
amount: 14000.0
|
|
||||||
date: '2010-07-17'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: test
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst2")], {"lang": "en_US", "active_model": "account.invoice",
|
|
||||||
"tz":False,"record_id": so.invoice_ids[1].id, "active_ids": [so.invoice_ids[1].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[1].id})
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[1].id], "type": "out_invoice", "active_id": so.invoice_ids[1].id})
|
14000.0, ref('account.cash'), ref('account.period_5'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_5'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test')
|
||||||
-
|
-
|
||||||
I verify that an invoice is in done state.
|
I verify that an invoice is in done state.
|
||||||
-
|
-
|
||||||
|
|
|
@ -99,45 +99,22 @@
|
||||||
for invoice in invoice_ids:
|
for invoice in invoice_ids:
|
||||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
Assign analytic jounal into bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
|
||||||
amount: 40000.0
|
|
||||||
date: '2010-07-17'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: tst
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so9"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
|
|
||||||
False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id, })
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so9"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so9"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
|
40000.0, ref('account.cash'), ref('account.period_9'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test')
|
||||||
-
|
-
|
||||||
I verify the invoice are in paid state or not.
|
I verify the invoice are in paid state or not.
|
||||||
-
|
-
|
||||||
|
|
|
@ -116,45 +116,22 @@
|
||||||
for invoice in invoice_ids:
|
for invoice in invoice_ids:
|
||||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
Assign analytic jounal into bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
|
||||||
amount: 40000.0
|
|
||||||
date: '2010-07-17'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: tst
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
|
|
||||||
False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id, })
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','like',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
|
40000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test')
|
||||||
-
|
-
|
||||||
I verify the invoice are in paid state or not.
|
I verify the invoice are in paid state or not.
|
||||||
-
|
-
|
||||||
|
|
|
@ -68,45 +68,22 @@
|
||||||
inv_brw = self.browse(cr, uid, invoice_id)[0]
|
inv_brw = self.browse(cr, uid, invoice_id)[0]
|
||||||
assert inv_brw.move_id, "Journal Entries has not been created"
|
assert inv_brw.move_id, "Journal Entries has not been created"
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
Assign analytic jounal into bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
|
|
||||||
amount: 100000.0
|
|
||||||
date: '2010-07-17'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: test
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "active_model": "account.invoice",
|
|
||||||
"tz":False,"record_id": so.invoice_ids[0].id, "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id})
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
|
100000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test')
|
||||||
-
|
-
|
||||||
I verify the invoice is in done state.
|
I verify the invoice is in done state.
|
||||||
-
|
-
|
||||||
|
|
|
@ -92,49 +92,26 @@
|
||||||
wf_service = netsvc.LocalService("workflow")
|
wf_service = netsvc.LocalService("workflow")
|
||||||
invoice_ids = so.invoice_ids
|
invoice_ids = so.invoice_ids
|
||||||
for invoice in invoice_ids:
|
for invoice in invoice_ids:
|
||||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
Assign analytic jounal into bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
|
||||||
amount: 255000.0
|
|
||||||
date: '2010-07-15'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: tst
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
|
|
||||||
False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id, })
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','like',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id })
|
255000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test')
|
||||||
-
|
-
|
||||||
I verify the invoice are in paid state or not.
|
I verify the invoice is in paid state.
|
||||||
-
|
-
|
||||||
!python {model: account.invoice}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
|
|
|
@ -262,53 +262,22 @@
|
||||||
for invoice in invoice_ids:
|
for invoice in invoice_ids:
|
||||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
Assign analytic jounal into bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
|
|
||||||
amount: 100000.0
|
|
||||||
date: '2010-07-15'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: test
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
modules = self.pool.get('ir.module.module')
|
|
||||||
mod_pur = modules.search(cr, uid, [('name','=','purchase')])
|
|
||||||
mod_brw = modules.browse(cr,uid,mod_pur)[0]
|
|
||||||
if (mod_brw.state == 'installed'):
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "tz":
|
|
||||||
False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id})
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
modules = self.pool.get('ir.module.module')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
mod_pur = modules.search(cr, uid, [('name','=','purchase')])
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
||||||
mod_brw = modules.browse(cr,uid,mod_pur)[0]
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
if (mod_brw.state == 'installed'):
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
100000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
name='test')
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
|
|
||||||
-
|
-
|
||||||
I verify the invoice are in paid state or not.
|
I verify the invoice are in paid state or not.
|
||||||
-
|
-
|
||||||
|
|
|
@ -54,45 +54,22 @@
|
||||||
for invoice in invoice_ids:
|
for invoice in invoice_ids:
|
||||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
I assign an analytic jounal to the Bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
|
||||||
amount: 85000.0
|
|
||||||
date: '2010-07-20'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: tst
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
|
|
||||||
False, "active_model": 'account.invoice', "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id, })
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
|
85000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_5'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test002')
|
||||||
-
|
-
|
||||||
I verify the invoice is in done state or not.
|
I verify the invoice is in done state or not.
|
||||||
-
|
-
|
||||||
|
|
|
@ -183,47 +183,22 @@
|
||||||
for id in inv:
|
for id in inv:
|
||||||
wf_service.trg_validate(uid, 'account.invoice',id,'invoice_open', cr)
|
wf_service.trg_validate(uid, 'account.invoice',id,'invoice_open', cr)
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
I assign an analytic jounal to the bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
|
||||||
amount: 40000.0
|
|
||||||
date: '2010-08-02'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: tst
|
|
||||||
period_id: account.period_8
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
acc_inv_obj = self.pool.get('account.invoice')
|
|
||||||
inv_id = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
|
|
||||||
for ids in inv_id:
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "tz":
|
|
||||||
False, "active_model": 'account.invoice', 'record_id': ids, "active_ids": [ids], "type":
|
|
||||||
"out_invoice", "active_id": ids, })
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
acc_inv_obj = self.pool.get('account.invoice')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
inv = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
||||||
for inv_id in inv:
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
40000.0, ref('account.cash'), ref('account.period_5'),
|
||||||
[inv_id], "type": "out_invoice", "active_id": inv_id, })
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='tst')
|
||||||
-
|
-
|
||||||
I verify the invoice is in Paid sate
|
I verify the invoice is in Paid sate
|
||||||
-
|
-
|
||||||
|
|
|
@ -82,45 +82,22 @@
|
||||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
assert invoice_id, "Invoice is not in the open state"
|
assert invoice_id, "Invoice is not in the open state"
|
||||||
-
|
-
|
||||||
Creating an account invoice pay entry.
|
I assign an analytic jounal to the bank journal
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst0}:
|
|
||||||
amount: 20000.0
|
|
||||||
date: '2010-07-12'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: test
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst0")], {"lang": "en_US", "active_model": "account.invoice",
|
|
||||||
"tz":False,"record_id": so.invoice_ids[0].id, "active_ids": [so.invoice_ids[0].id], "type":
|
|
||||||
"out_invoice", "active_id": so.invoice_ids[0].id})
|
|
||||||
-
|
|
||||||
Creating an account invoice pay writeoff entry.
|
|
||||||
-
|
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_0}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Assign analytic jounal into Bank journal
|
|
||||||
-
|
-
|
||||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
analytic_journal_id: account.cose_journal_sale
|
analytic_journal_id: account.cose_journal_sale
|
||||||
-
|
-
|
||||||
Pay and Reconcile the Invoice.
|
I pay the invoice
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
[so.invoice_ids[0].id], "type": "out_invoice", "active_id": so.invoice_ids[0].id, })
|
20000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
|
name='test')
|
||||||
-
|
-
|
||||||
I verify that an invoice is in done state.
|
I verify that an invoice is in done state.
|
||||||
-
|
-
|
||||||
|
@ -197,40 +174,22 @@
|
||||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
assert invoice_id, "Invoice is not in the open state"
|
assert invoice_id, "Invoice is not in the open state"
|
||||||
-
|
-
|
||||||
Creating a account invoice pay entry.
|
Assign analytic jounal into bank journal
|
||||||
-
|
-
|
||||||
!record {model: account.invoice.pay, id: account_invoice_pay_tst1}:
|
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||||
amount: 17000.0
|
analytic_journal_id: account.cose_journal_sale
|
||||||
date: '2010-07-12'
|
|
||||||
journal_id: sale.account_journal_bankjournal0
|
|
||||||
name: test
|
|
||||||
period_id: account.period_5
|
|
||||||
-
|
|
||||||
I pay the invoice.
|
|
||||||
-
|
-
|
||||||
!python {model: account.invoice.pay}: |
|
I pay the invoice
|
||||||
|
-
|
||||||
|
!python {model: account.invoice}: |
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
sale_order_obj = self.pool.get('sale.order')
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
||||||
self.wo_check(cr, uid, [ref("account_invoice_pay_tst1")], {"lang": "en_US", "active_model": "account.invoice",
|
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||||
"tz":False,"record_id": so.invoice_ids[1].id, "active_ids": [so.invoice_ids[1].id], "type":
|
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||||
"out_invoice", "active_id": so.invoice_ids[1].id})
|
17000.0, ref('account.cash'), ref('account.period_8'),
|
||||||
-
|
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||||
Creating an account invoice pay writeoff entry.
|
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||||
-
|
name='test')
|
||||||
!record {model: account.invoice.pay.writeoff, id: account_invoice_pay_writeoff_1}:
|
|
||||||
analytic_id: account.analytic_customers
|
|
||||||
comment: Write-Off
|
|
||||||
writeoff_acc_id: account.a_sale
|
|
||||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
|
||||||
-
|
|
||||||
Pay and Reconcile the Invoice.
|
|
||||||
-
|
|
||||||
!python {model: account.invoice.pay.writeoff}: |
|
|
||||||
sale_order_obj = self.pool.get('sale.order')
|
|
||||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
|
||||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_1")],
|
|
||||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
|
||||||
[so.invoice_ids[1].id], "type": "out_invoice", "active_id": so.invoice_ids[1].id})
|
|
||||||
-
|
-
|
||||||
I verify the invoice is in done state.
|
I verify the invoice is in done state.
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in New Issue