[MERGE] lp:~openerp-commiter/openobject-addons/trunk-event-pna

bzr revid: kjo@tinyerp.com-20120627104719-m3d0fkxuukk9useg
This commit is contained in:
Kuldeep Joshi (OpenERP)
2012-06-27 16:17:19 +05:30
2 changed files with 61 additions and 39 deletions
+5 -2
View File
@@ -192,8 +192,8 @@ class event_event(osv.osv):
'name': fields.char('Name', size=64, required=True, translate=True, readonly=False, states={'done': [('readonly', True)]}),
'user_id': fields.many2one('res.users', 'Responsible User', readonly=False, states={'done': [('readonly', True)]}),
'type': fields.many2one('event.type', 'Type of Event', readonly=False, states={'done': [('readonly', True)]}),
'register_max': fields.integer('Maximum Registrations', help="You can for each event define a maximum registration level. If you have too much registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}),
'register_min': fields.integer('Minimum Registrations', help="You can for each event define a minimum registration level. If you do not enough registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}),
'register_max': fields.integer('Maximum Registration', help="You can for each event define a maximum registration level. If you have too much registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}),
'register_min': fields.integer('Minimum Registration', help="You can for each event define a minimum registration level. If you do not enough registrations you are not able to confirm your event. (put 0 to ignore this rule )", readonly=True, states={'draft': [('readonly', False)]}),
'register_current': fields.function(_get_register, string='Confirmed Registrations', multi='register_numbers'),
'register_avail': fields.function(_get_register, string='Available Registrations', multi='register_numbers',type='integer'),
'register_prospect': fields.function(_get_register, string='Unconfirmed Registrations', multi='register_numbers'),
@@ -214,6 +214,9 @@ class event_event(osv.osv):
'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."),
'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who will be giving speech at the event."),
'address_id': fields.many2one('res.partner','Location Address', readonly=False, states={'done': [('readonly', True)]}),
'street': fields.related('address_id','street',type='char',string='Street'),
'zip': fields.related('address_id','zip',type='char',string='zip'),
'city': fields.related('address_id','city',type='char',string='city'),
'speaker_confirmed': fields.boolean('Speaker Confirmed', readonly=False, states={'done': [('readonly', True)]}),
'country_id': fields.related('address_id', 'country_id',
type='many2one', relation='res.country', string='Country', readonly=False, states={'done': [('readonly', True)]}),
+56 -37
View File
@@ -1,7 +1,14 @@
<?xml version="1.0"?>
<openerp>
<data>
<act_window
id="act_event_list_register_event"
name="Registration"
res_model="event.registration"
src_model="event.event"
view_mode="calendar,tree,form,graph"
context="{'search_default_event_id': active_id, 'default_event_id': active_id}"
view_type="form"/>
<menuitem name="Events" id="event_main_menu"/>
<menuitem name="Events Organisation" id="base.menu_event_main" parent="event_main_menu" />
@@ -17,10 +24,10 @@
<group col="4">
<field name="name"/>
<field name="default_reply_to"/>
<field name="default_email_event" domain="[('model_id.model','=','event.registration')]"/>
<field name="default_email_registration" domain="[('model_id.model','=','event.registration')]"/>
<field name="default_registration_min"/>
<field name="default_email_event" domain="[('model_id.model','=','event.registration')]"/>
<field name="default_registration_max"/>
<field name="default_email_registration" domain="[('model_id.model','=','event.registration')]"/>
</group>
</form>
</field>
@@ -61,40 +68,53 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
</header>
<sheet>
<div class="oe_right" style="height: 200px"></div>
<div class="oe_title">
<h1><field name="name"/></h1>
<div class="oe_right oe_button_box">
<button name="%(event.act_event_list_register_event)d" type="action" string="Registration" icon="gtk-index" help="Register with this event"/>
</div>
<!--div class="oe_right" style="height: 200px"></div-->
<div class="oe_title" style="width: 650px" >
<label for="name" class="oe_edit_only"/>
<group colspan="6" col="6">
<group colspan="2"><h1><field name="name"/></h1></group>
<group colspan="4"><h1><label string="(" attrs="{'invisible': [('type', '=', '')]}" /><field name="type" nolabel="1" on_change="onchange_event_type(type,context)" class="oe_inline"/><label string=")" attrs="{'invisible': [('type', '=', '')]}" /></h1></group>
</group>
</div>
<div>
<h2>From <field name="date_begin" class="oe_inline" /> to <field name="date_end" class="oe_inline"/></h2>
<group>
<group>
<field name="type" on_change="onchange_event_type(type,context)"/>
<field name="user_id"/>
<field name="address_id" widget="many2one_address_google_map" widget_option="{'placeholder':'.oe_google_map'}"/>
<label for="address_id" string="Location Address"/>
<div>
<field name="address_id" widget="many2one_address_google_map" widget_option="{'placeholder':'.oe_google_map'}"/>
<field name="street" placeholder="Street..."/>
<div>
<field name="zip" class="oe_inline" placeholder="Zip"/>
<field name="city" class="oe_inline" placeholder="City"/>
</div>
</div>
</group>
<group>
<field name="date_begin"/>
<field name="date_end"/>
<field name="register_min"/>
<field name="register_max"/>
</group>
</group>
<field name="register_min"/>
<field name="register_max"/>
</group>
</group>
</div>
<notebook>
<page string="Event Description">
<field name="note" colspan="4" nolabel="1"/>
</page>
<page string="Internal Data">
<group class="oe_group_label_border" colspan="2" col="2">
<field name="register_current"/>
<field name="register_prospect"/>
<field name="register_attended"/>
</group>
<group class="oe_group_label_border" colspan="2" col="2">
<group>
<group class="oe_group_label_border">
<field name="main_speaker_id" domain="[('speaker','=',True)]" context="{'default_speaker':1}"/>
<field name="speaker_confirmed"/>
</group>
<field name="registration_ids" colspan="4" nolabel="1" groups="event.group_event_manager,event.group_event_user">
</group>
<group class="oe_group_label_border">
<field name="register_current"/>
<field name="register_prospect"/>
</group>
</group>
<field name="registration_ids" colspan="4" nolabel="1" groups="event.group_event_manager,event.group_event_user">
<tree string="Registration" editable="top">
<field name="name" />
<field name="email" />
@@ -127,12 +147,20 @@
</group>
</form>
</field>
<group class="oe_subtotal_footer oe_right" colspan="2" name="regi_total">
<field name="register_current"/>
<field name="register_prospect"/>
<field name="register_attended" class="oe_subtotal_footer_separator" />
</group>
<separator string="" class="oe_clear"/>
</page>
</notebook>
</sheet>
<div class="oe_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
<footer>
<div class="oe_sheet_width">
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</footer>
</form>
</field>
</record>
@@ -308,15 +336,6 @@
<field name="help">Event is the low level object used by meeting and others documents that should be synchronized with mobile devices or calendar applications through caldav. Most of the users should work in the Calendar menu, and not in the list of events.</field>
</record>
<act_window
id="act_event_list_register_event"
name="Registration"
res_model="event.registration"
src_model="event.event"
view_mode="calendar,tree,form,graph"
context="{'search_default_event_id': [active_id], 'default_event_id': active_id}"
view_type="form"/>
<act_window
id="act_register_event_partner"
name="Subscribe"