[FIX] account : YML test of currency Corrected

bzr revid: ach@tinyerp.com-20100923123107-cln1mtwionpkj56j
This commit is contained in:
Anup (OpenERP) 2010-09-23 18:01:07 +05:30
parent d942be95d4
commit cc84c31d1b
1 changed files with 17 additions and 20 deletions

View File

@ -23,15 +23,6 @@
-
!assert {model: account.invoice, id: account_invoice_currency, string: Customer Invoice is in Draft state}:
- state == 'draft'
-
I change the state of invoice to proforma2 by clicking PRO-FORMA button
-
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_currency}
-
I check that now customer invoice is in the "proforma2" state
-
!assert {model: account.invoice, id: account_invoice_currency}:
- state == 'proforma2'
-
Now I select USD as new currency
-
@ -41,17 +32,23 @@
I clicked on Change Currency button to change the currency
-
!python {model: account.change.currency}: |
try:
self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
except:
print "Error: You can change currency only for Draft Invoice !"
self.view_init(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
self.change_currency(cr, uid, [ref("account_change_currency_0")], {"lang": 'en_US',
"active_model": "account.invoice", "tz": False, "record_id": 4, "active_ids":
[ref("account_invoice_currency")], "type": "out_invoice", "active_id": ref("account_invoice_currency"),
})
-
I change the state of invoice to proforma2 by clicking PRO-FORMA button
-
!workflow {model: account.invoice, action: invoice_proforma2, ref: account_invoice_currency}
-
I check that now customer invoice is in the "proforma2" state
-
!assert {model: account.invoice, id: account_invoice_currency}:
- state == 'proforma2'
-
I can't change the currency of invoice when it is not in draft state so i change the state to cancel
-