diff options
| author | ron@tinyerp.com <> | 2011-11-14 12:10:08 +0530 |
|---|---|---|
| committer | ron@tinyerp.com <> | 2011-11-14 12:10:08 +0530 |
| commit | 77c716683eefcc07d56d9f30e4eecf66f90c4191 (patch) | |
| tree | eed3d15a76abdebbe43dde7e6e9d5aa62d9181c4 | |
| parent | 99a3ab1c43bd86e0ec5ace2d9032e786669b64d7 (diff) | |
[ADD]: event: Added new register2invoice.yml for partner registration for event to invoice generated
bzr revid: ron@tinyerp.com-20111114064008-zbxjp4210ff2nveo
| -rw-r--r-- | addons/event/__openerp__.py | 3 | ||||
| -rw-r--r-- | addons/event/test/process/register2invoice.yml | 23 |
2 files changed, 25 insertions, 1 deletions
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py index 1890ed7bf84..d65f3bbe221 100644 --- a/addons/event/__openerp__.py +++ b/addons/event/__openerp__.py @@ -54,7 +54,8 @@ Note that: 'res_partner_view.xml', ], 'demo_xml': ['event_demo.xml'], - 'test': ['test/test_event.yml'], + 'test': ['test/test_event.yml', + 'test/process/register2invoice.yml'], 'installable': True, 'active': False, 'certificate': '0083059161581', diff --git a/addons/event/test/process/register2invoice.yml b/addons/event/test/process/register2invoice.yml new file mode 100644 index 00000000000..649179f9e99 --- /dev/null +++ b/addons/event/test/process/register2invoice.yml @@ -0,0 +1,23 @@ +- + I want to organize one conference event, First I registered partner for event + with 5 tickets, so I confirm this registration. +- + !python {model: event.registration}: | + self.check_confirm(cr, uid, [ref("reg_1_1")]) +- + I Check that Registration is confirm. +- + !assert {model: event.registration, id: reg_1_1}: + - state == 'open', "Registration should be open here." +- + After confirmation of partner, I create invoice base on costing of event. +- + !python {model: event.registration}: | + self.action_invoice_create(cr, uid, [ref("reg_1_1")]) +- + Now I Check for Invoice is created and Registration should be closed after invoice generated. +- + !python {model: event.registration}: | + record = self.browse(cr, uid, [ref("reg_1_1")])[0] + assert record.invoice_id, "Invoice should be generated" + assert record.state == "done", "Registration should be closed after invoice generated"
\ No newline at end of file |
