odoo/addons/event/test/process/partner_register2invoice.yml

33 lines
1.2 KiB
YAML

-
I want to organize one conference event, First I registered partner for event
with 5 tickets.
-
!python {model: partner.event.registration}: |
context.update({'active_model': 'res.partner', 'active_ids': [ref("base.res_partner_ericdubois0")], 'active_id': ref("base.res_partner_ericdubois0")})
register = self.create(cr, uid, {'event_id': ref('event_1'),'nb_register': 5}, context=context)
self.open_registration(cr, uid, [register], context=context)
-
Now I check for registration created base on partner.
-
!python {model: event.registration}: |
ids = self.search(cr, uid, [('partner_id','=',ref("base.res_partner_ericdubois0")), ('event_id', '=', ref('event_1'))])
assert ids, "Registration should be create here."
-
I confirm registration process.
-
!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."
-
I Check that Registration is close.
-
!assert {model: event.registration, id: reg_1_1}:
- state == 'done', "Registration should be done here."