[FIX] warning.py : fix bug 11 arg needed 15 given

bzr revid: tfr@openerp.com-20101028135646-jzmn8i1a52uvi9s4
This commit is contained in:
Thibault Francois
2010-10-28 15:56:46 +02:00
6 changed files with 14 additions and 6 deletions
+9 -1
View File
@@ -916,7 +916,7 @@ class calendar_event(osv.osv):
return [(x.lower(), x) for x in pytz.all_timezones]
def onchange_allday(self, cr, uid, ids, allday, context=None):
"""Sets duration as 24 Hours if event is selcted for all day
"""Sets duration as 24 Hours if event is selected for all day
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -1630,6 +1630,14 @@ true, it will allow you to hide the event alarm information without removing it.
if vals.get('vtimezone', '') and vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'):
vals['vtimezone'] = vals['vtimezone'][40:]
updated_vals = self.onchange_dates(cr, uid, [],
vals.get('date', False),
vals.get('duration', False),
vals.get('date_deadline', False),
vals.get('allday', False),
context=context)
vals.update(updated_vals.get('value', {}))
res = super(calendar_event, self).create(cr, uid, vals, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
+1 -1
View File
@@ -229,7 +229,7 @@
<group col="6" colspan="4">
<field name="name" select="1" string="Summary"
colspan="4" required="1" />
<field name="allday" colspan="2" on_change="onchange_allday(allday)" />
<field name="allday" colspan="2" on_change="onchange_dates(date,False,False,allday)" />
<newline/>
<field name="date" string="Start Date" required="1" select="1"
on_change="onchange_dates(date,duration,False,allday)" />
+1 -1
View File
@@ -32,7 +32,7 @@
<field name="categ_id" widget="selection"
string="Meeting Type" groups="base.group_extended"
domain="[('object_id.model', '=', 'crm.meeting')]" />
<field name="allday" on_change="onchange_allday(allday)" />
<field name="allday" on_change="onchange_dates(date,False,False,allday)" />
<newline/>
<field name="date" string="Start Date" required="1"
on_change="onchange_dates(date,duration,False,allday)" />
+1 -1
View File
@@ -64,7 +64,7 @@ class crm_helpdesk(crm.crm_case, osv.osv):
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.helpdesk')]"),
'duration': fields.float('Duration'),
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
+1 -1
View File
@@ -183,7 +183,7 @@ class hr_employee(osv.osv):
return {'value': {'work_email' : work_email}}
def _get_photo(self, cr, uid, context=None):
photo_path = addons.get_module_resource('hr','image','photo.png')
photo_path = addons.get_module_resource('hr','image','photo.png')
return open(photo_path, 'rb').read().encode('base64')
_defaults = {
+1 -1
View File
@@ -35,7 +35,7 @@
<field name="password">jth</field>
</record>
<record id="res_users_tester" model="res.users">
<field name="name">Alien</field>
<field name="name">Aline</field>
<field eval="[(6, 0, [ref('base.group_user'), ref('project.group_project_user')])]" name="groups_id"/>
<field name="login">apr</field>
<field name="password">apr</field>