[REVIEW]: code review

bzr revid: mga@mga-20100324155718-25uh10n09j6j3gty
This commit is contained in:
Mantavya Gajjar 2010-03-24 21:27:18 +05:30
parent c51d845b93
commit 2535f44d2b
5 changed files with 111 additions and 117 deletions

View File

@ -19,19 +19,14 @@
#
##############################################################################
{
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : [
"base",
],
'description': """
Full featured calendar system that support:
"depends" : ["base"],
'description': """Full featured calendar system that support:
- Alerts (create requests)
- Recurring events (*)
- Invitations to others people
""",
- Invitations to others people""",
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',

View File

@ -135,7 +135,6 @@
</tree>
</field>
</record>
<record id="action_res_alarm_view" model="ir.actions.act_window">
<field name="name">Available Alarms</field>
<field name="type">ir.actions.act_window</field>
@ -144,8 +143,7 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Available alarms-->
<!--Available alarms-->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
@ -153,6 +151,5 @@
action="base_calendar.action_res_alarm_view"
parent="base.menu_calendar_configuration" />
</data>
</openerp>

View File

@ -40,8 +40,7 @@ class base_calendar_invite_attendee(osv.osv_memory):
'email': fields.char('Email', size=124),
'contact_ids': fields.many2many('res.partner.address', 'invite_contact_rel',
'invite_id', 'contact_id', 'Contacts'),
'send_mail': fields.boolean('Send mail?', help='Check this if you want\
to send an Email to Invited Person')
'send_mail': fields.boolean('Send mail?', help='Check this if you want to send an Email to Invited Person')
}
_defaults = {
@ -57,12 +56,13 @@ class base_calendar_invite_attendee(osv.osv_memory):
@param context: A standard dictionary for contextual values
@return: Dictionary of {}.
"""
if not context:
context = {}
for datas in self.read(cr, uid, ids, context=context):
model = False
model_field = False
context_id = context and context.get('active_id', False) or False
if not context or not context.get('model'):
return {}
@ -70,6 +70,8 @@ class base_calendar_invite_attendee(osv.osv_memory):
model = context.get('model')
model_field = context.get('attendee_field', False)
for datas in self.read(cr, uid, ids, context=context):
obj = self.pool.get(model)
res_obj = obj.browse(cr, uid, context_id)
type = datas.get('type')

View File

@ -19,7 +19,8 @@
#
##############################################################################
from osv import fields, osv
from osv import osv
from osv import fields
class calendar_event_edit_all(osv.osv_memory):
@ -83,7 +84,6 @@ class calendar_event_edit_all(osv.osv_memory):
'date': _default_values,
'date_deadline': _default_deadline
}
calendar_event_edit_all()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: