parent
1915d0bfef
commit
be22df97d6
|
@ -273,8 +273,8 @@
|
|||
obj_lots = self.pool.get('auction.lots')
|
||||
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,
|
||||
ref('account.account_type_cash_moves'), ref('account.period_8'),
|
||||
ref('account.cash_journal'), ref('account.account_type_cash_moves'),
|
||||
ref('account.cash'), ref('account.period_8'),
|
||||
ref('account.cash_journal'), ref('account.cash'),
|
||||
ref('account.period_8'), ref('account.cash_journal'), name='Furniture')
|
||||
-
|
||||
I check that "Buyer Invoice Reconciled" field is marked.
|
||||
|
|
|
@ -138,6 +138,10 @@
|
|||
<field name="act_to" ref="act_cancel"/>
|
||||
<field name="signal">button_cancel</field>
|
||||
</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">
|
||||
<field name="act_from" ref="act_confirm_mto"/>
|
||||
<field name="act_to" ref="act_confirm"/>
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
<field name="action">action_po_assign()</field>
|
||||
</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_to" ref="act_buy"/>
|
||||
<field name="condition">check_buy()</field>
|
||||
|
|
|
@ -65,31 +65,17 @@
|
|||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
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')
|
||||
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",
|
||||
"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_5}:
|
||||
analytic_id: account.analytic_customers
|
||||
comment: Write-Off
|
||||
writeoff_acc_id: account.a_sale
|
||||
writeoff_journal_id: sale.account_journal_bankjournal0
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||
3000.0, ref('account.cash'), ref('account.period_5'),
|
||||
ref('sale.account_journal_bankjournal0'), ref('account.cash'),
|
||||
ref('account.period_8'), ref('sale.account_journal_bankjournal0'),
|
||||
name='test')
|
||||
-
|
||||
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')])
|
||||
assert invoice_id, "Invoice is not in the open state"
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
I assign an analytic jounal to the bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so5"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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})
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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.
|
||||
-
|
||||
|
|
|
@ -99,45 +99,22 @@
|
|||
for invoice in invoice_ids:
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
Assign analytic jounal into bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so9"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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 })
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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.
|
||||
-
|
||||
|
|
|
@ -116,45 +116,22 @@
|
|||
for invoice in invoice_ids:
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
Assign analytic jounal into bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so6"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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 })
|
||||
invoice_id = self.search(cr, uid, [('origin','like',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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.
|
||||
-
|
||||
|
|
|
@ -68,45 +68,22 @@
|
|||
inv_brw = self.browse(cr, uid, invoice_id)[0]
|
||||
assert inv_brw.move_id, "Journal Entries has not been created"
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
Assign analytic jounal into bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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, })
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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.
|
||||
-
|
||||
|
|
|
@ -94,47 +94,24 @@
|
|||
for invoice in invoice_ids:
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
Assign analytic jounal into bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so7"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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 })
|
||||
invoice_id = self.search(cr, uid, [('origin','like',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
|
|
|
@ -262,53 +262,22 @@
|
|||
for invoice in invoice_ids:
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
Assign analytic jounal into bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
analytic_journal_id: account.cose_journal_sale
|
||||
-
|
||||
Pay and Reconcile the Invoice.
|
||||
I pay the invoice
|
||||
-
|
||||
!python {model: account.invoice.pay.writeoff}: |
|
||||
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'):
|
||||
!python {model: account.invoice}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so8"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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, })
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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 are in paid state or not.
|
||||
-
|
||||
|
|
|
@ -54,45 +54,22 @@
|
|||
for invoice in invoice_ids:
|
||||
wf_service.trg_validate(uid, 'account.invoice',invoice.id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
I assign an analytic jounal to the Bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so1"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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, })
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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.
|
||||
-
|
||||
|
|
|
@ -183,47 +183,22 @@
|
|||
for id in inv:
|
||||
wf_service.trg_validate(uid, 'account.invoice',id,'invoice_open', cr)
|
||||
-
|
||||
Creating a account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
I assign an analytic jounal to the bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
analytic_journal_id: account.cose_journal_sale
|
||||
-
|
||||
Pay and Reconcile the Invoice.
|
||||
I pay the invoice
|
||||
-
|
||||
!python {model: account.invoice.pay.writeoff}: |
|
||||
acc_inv_obj = self.pool.get('account.invoice')
|
||||
inv = acc_inv_obj.search(cr, uid, [('origin','=','Test_SO004|Test_SO003|')])
|
||||
for inv_id in inv:
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"lang": 'en_US', "tz": False, "active_model": 'account.invoice', "active_ids":
|
||||
[inv_id], "type": "out_invoice", "active_id": inv_id, })
|
||||
!python {model: account.invoice}: |
|
||||
sale_order_obj = self.pool.get('sale.order')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||
40000.0, ref('account.cash'), ref('account.period_5'),
|
||||
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
|
||||
-
|
||||
|
|
|
@ -82,45 +82,22 @@
|
|||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
assert invoice_id, "Invoice is not in the open state"
|
||||
-
|
||||
Creating an account invoice pay entry.
|
||||
-
|
||||
!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
|
||||
I assign an analytic jounal to the bank journal
|
||||
-
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
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')
|
||||
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
|
||||
self.pay_and_reconcile_writeoff(cr, uid, [ref("account_invoice_pay_writeoff_0")],
|
||||
{"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, })
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_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.
|
||||
-
|
||||
|
@ -197,40 +174,22 @@
|
|||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
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}:
|
||||
amount: 17000.0
|
||||
date: '2010-07-12'
|
||||
journal_id: sale.account_journal_bankjournal0
|
||||
name: test
|
||||
period_id: account.period_5
|
||||
!record {model: account.journal, id: sale.account_journal_bankjournal0}:
|
||||
analytic_journal_id: account.cose_journal_sale
|
||||
-
|
||||
I pay the invoice.
|
||||
I pay the invoice
|
||||
-
|
||||
!python {model: account.invoice.pay}: |
|
||||
!python {model: account.invoice}: |
|
||||
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_tst1")], {"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_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})
|
||||
invoice_id = self.search(cr, uid, [('origin','=',so.name),('state','=','open')])
|
||||
self.pay_and_reconcile(cr, uid, invoice_id,
|
||||
17000.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.
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue