[IMP]:Internal attendees should automatically be accepted meeting and
[REM]: conflicts bzr revid: aja@tinyerp.com-20130917070406-mwqyqjczn9sv2lux
This commit is contained in:
@@ -76,11 +76,7 @@
|
||||
on_change="onchange_dates(date,False,date_deadline)"/>
|
||||
</group>
|
||||
<group>
|
||||
<<<<<<< TREE
|
||||
<field name="user_id"/>
|
||||
=======
|
||||
<field name="user_id" groups="base.group_no_one" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
|
||||
>>>>>>> MERGE-SOURCE
|
||||
<field name="categ_ids" widget="many2many_tags"/>
|
||||
<field name="location"/>
|
||||
<field name="organizer" groups="base.group_no_one"/>
|
||||
|
||||
@@ -56,3 +56,16 @@ class hr_employee(osv.osv):
|
||||
_defaults = {
|
||||
'visibility': 'private',
|
||||
}
|
||||
|
||||
class calendar_attendee(osv.osv):
|
||||
_inherit = 'calendar.attendee'
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
user_pool = self.pool.get('res.users')
|
||||
if vals.get('partner_id'):
|
||||
users = user_pool.search_read(cr, uid, [('partner_id','=', vals.get('partner_id'))],['employee_ids'], context=context)
|
||||
for user in users:
|
||||
if user['employee_ids']:
|
||||
vals['state'] = 'accepted'
|
||||
return super(calendar_attendee, self).create(cr, uid, vals, context=context)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user