[REF] add some descriptions in test and in the __openerp file

bzr revid: mva@openerp.com-20120223154159-nnxa9ez0woin20cj
This commit is contained in:
MVA 2012-02-23 16:41:59 +01:00
parent 96d7a8157f
commit ec523aa035
4 changed files with 36 additions and 32 deletions

View File

@ -78,7 +78,6 @@
string="Confirmed Registrations"
help="Registrations in confirmed or done state"
context="{'no_of_draft_invisible':1}"/>
<separator orientation="vertical"/>
<field name="event_id" string="Event"/>
<field name="user_id" widget="selection">
@ -101,10 +100,9 @@
<filter string="Participant" icon="terp-personal" context="{'group_by':'name_registration'}" help="Registration contact"/>
<separator orientation="vertical"/>
<filter string="Event" name="event" icon="terp-crm" context="{'group_by':'event_id', 'max_reg_event_visible':0}"/>
<separator orientation="vertical"/>
<filter string="Event Type" icon="terp-crm" context="{'group_by':'event_type'}"/>
<filter string="event_state" icon="terp-stock_effects-object-colorize" context="{'group_by':'event_state'}" help="Events States"/>
<filter string="Event State" icon="terp-stock_effects-object-colorize" context="{'group_by':'event_state'}" help="Events States"/>
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical" />

View File

@ -3,84 +3,86 @@
into this conference I should create two registration.
One confirmed and attended the event and the other cancelled.
create an event
I create an event
-
!record {model: event.event, id: event_event}:
name: event
date_begin: 2012-01-01 19:05:15
date_end: 2012-01-01 20:05:15
-
create a registration
I create a registration for the event
-
!record {model: event.registration, id: event_registration1}:
event_id: event_event
name: test_confirm
-
I create a second registration for the same event
-
!record {model: event.registration, id: event_registration2}:
event_id: event_event
name: test_cancel
-
accept registration1
I confirm the registration1
-
!python {model: event.registration}: |
self.case_open(cr, uid, [ref("event_registration1")],context=context)
-
i check that registration is "confirmed"
I check that registration is "confirmed"
-
!assert {model: event.registration, id: event_registration1}:
- state == 'open', "event should be confirmed."
-
finish the registration
I closed the registration
-
!python {model: event.registration}: |
self.button_reg_close(cr, uid, [ref("event_registration1")],context=context)
-
check if registration is correctly finnished
I check if registration is correctly finnished
-
!assert {model: event.registration, id: event_registration1}:
- state == 'done'
-
cancel the second registration
I cancel the second registration
-
!python {model: event.registration}: |
self.button_reg_cancel(cr, uid, [ref("event_registration2")],context=context)
-
Check that registration is cancelled.
I Check that registration is cancelled
-
!assert {model: event.registration, id: event_registration2}:
- state == 'cancel', "event should be closed."
-
confirm the event
I confirm the event
-
!python {model: event.event}: |
self.button_confirm(cr, uid, [ref("event_event")])
-
check that event is in "confirmed" state.
I check that event is in "confirmed" state.
-
!assert {model: event.event, id: event_event}:
- state == 'confirm', "event should be confirmed."
-
done the event
I close the event
-
!python {model: event.event}: |
self.button_done(cr, uid, [ref("event_event")])
-
Check that event is in "close" state.
Check that event is in "close" state.
-
!assert {model: event.event, id: event_event}:
- state == 'done', "Event should be Closed."
-
reset event to draft
I reset event to draft
-
!python {model: event.event}: |
self.button_draft(cr, uid, [ref("event_event")])
-
cancel the event
Now I cancel this event
-
!python {model: event.event}: |
self.button_cancel(cr, uid, [ref("event_event")])
-
check if the event is cancelled
I check if the event is cancelled
-
!assert {model: event.event, id: event_event}:
- state == 'cancel', "Event should be Closed."

View File

@ -26,6 +26,15 @@
'category': 'Tools',
'complexity': "easy",
'description': """
Creating registration with sale orders
==========================================
With this module you are able to create a registration when you create a sale order where the product is event type.
Note that:
-you can create event object. In product when you choose event you can match with an event type
-if you select an event prduct in a sale order line you can linked to an existing event
-when you confirm your sale order it will automatically create a registration for this event
""",
'author': 'OpenERP SA',
'depends': ['event','sale','sale_crm'],

View File

@ -1,7 +1,7 @@
-
In order to test process of the Sale Order, I create sale order
In order to test process of the Sale Order with an event product , I create sale order
-
create a product
First I create an event product
-
!record {model: product.product, id: event_product}:
name: test_formation
@ -9,14 +9,7 @@
event_ok: True
event_type_id: 1
-
create a sale order
-
!record {model: sale.order, id: order}:
partner_id: base.res_partner_agrolait
note: Invoice after delivery
payment_term: account.account_payment_term
-
create sale order line from the sale order with the product
I create an event from the same type than my product
-
!record {model: event.event,id: event}:
name: test_event
@ -24,12 +17,14 @@
date_end: '2012-01-01 19:05:15'
date_begin: '2012-01-01 18:05:15'
-
create a sale order
I create a sale order
-
!record {model: sale.order, id: order}:
partner_id: base.res_partner_agrolait
note: Invoice after delivery
payment_term: account.account_payment_term
-
In the sale order I add some sale order lines. i choose event product
-
!record {model: sale.order.line, id: line}:
product_id: event_product
@ -39,16 +34,16 @@
name: sale order line
event: event
-
confirm the sale order
I confirm the sale order
-
!workflow {model: sale.order, ref: order, action: order_confirm}
-
check if sale order is confirmed
I check if the sale order is confirmed
-
!assert {model: sale.order, id: order}:
- state == 'confirmed'
-
check if a registration is created
I check if a registration is created
-
!python {model: event.registration}: |
order_id = ref('order')