[MERGE] merge few bugfixes
bzr revid: qdp-launchpad@openerp.com-20120628122336-jece4hu086ojtigj
This commit is contained in:
commit
3905f5248f
|
@ -272,7 +272,7 @@
|
|||
icon="terp-partner" type="action"
|
||||
context="{'model' : 'calendar.event', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
nolabel="1" widget="one2many" mode="tree">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class base_stage(object):
|
||||
|
|
|
@ -7,15 +7,8 @@
|
|||
res_model="crm.meeting"
|
||||
view_mode="calendar,tree,form,gantt"
|
||||
context="{'search_default_partner_id': active_id, 'default_duration': 4.0}"
|
||||
domain="[('partner_id', '=', active_id)]"
|
||||
/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_categ_meet_create_partner">
|
||||
<field name="name">Schedule a Meeting</field>
|
||||
<field name="context">{'default_partner_id': active_id}</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_partner">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
attrs="{'readonly': [('state', '=', 'done')]}"
|
||||
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
nolabel="1" widget="one2many" mode="tree">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</group>
|
||||
<group string="Categorization">
|
||||
<field name="priority"/>
|
||||
<field name="categ_id" context="{'object_id':'crm.helpdesk'}"/>
|
||||
<field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]"/>
|
||||
<field name="channel_id"/>
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -520,7 +520,8 @@ class EDIMixin(object):
|
|||
'datas': result,
|
||||
'datas_fname': file_name,
|
||||
'res_model': self._name,
|
||||
'res_id': record.id},
|
||||
'res_id': record.id,
|
||||
'type': 'binary'},
|
||||
context=context)
|
||||
|
||||
def _edi_import_attachments(self, cr, uid, record_id, edi_document, context=None):
|
||||
|
|
|
@ -116,7 +116,7 @@ class share_wizard_portal(osv.osv_memory):
|
|||
# In both cases, we call super() to create the share group, but when
|
||||
# sharing with existing groups, we will later delete it, and copy its
|
||||
# access rights and rules to the selected groups.
|
||||
group_id = super(share_wizard_portal,self)._create_share_users_group(cr, uid, wizard_data, context=context)
|
||||
super_result = super(share_wizard_portal,self)._create_share_users_group(cr, uid, wizard_data, context=context)
|
||||
|
||||
# For sharing with existing groups, we don't create a share group, instead we'll
|
||||
# alter the rules of the groups so they can see the shared data
|
||||
|
@ -139,10 +139,10 @@ class share_wizard_portal(osv.osv_memory):
|
|||
wizard_data.write({'result_line_ids': [(0,0,new_line)]})
|
||||
|
||||
elif wizard_data.user_ids:
|
||||
# must take care of existing users, by adding them to the new group, which is group_ids[0],
|
||||
# must take care of existing users, by adding them to the new group, which is super_result[0],
|
||||
# and adding the shortcut
|
||||
selected_user_ids = [x.id for x in wizard_data.user_ids]
|
||||
self.pool.get('res.users').write(cr, UID_ROOT, selected_user_ids, {'groups_id': [(4,group_id)]})
|
||||
self.pool.get('res.users').write(cr, UID_ROOT, selected_user_ids, {'groups_id': [(4, super_result[0])]})
|
||||
self._setup_action_and_shortcut(cr, uid, wizard_data, selected_user_ids, make_home=False, context=context)
|
||||
# populate the result lines for existing users too
|
||||
for user in wizard_data.user_ids:
|
||||
|
@ -150,7 +150,7 @@ class share_wizard_portal(osv.osv_memory):
|
|||
'newly_created': False}
|
||||
wizard_data.write({'result_line_ids': [(0,0,new_line)]})
|
||||
|
||||
return group_id
|
||||
return super_result
|
||||
|
||||
def copy_share_group_access_and_delete(self, cr, wizard_data, share_group_id, context=None):
|
||||
# In the case of sharing with existing groups, the strategy is to copy
|
||||
|
|
|
@ -116,7 +116,7 @@ class project_task(osv.osv):
|
|||
search_extended += '''<filter domain="[('timebox_id','=', ''' + str(time.id) + ''')]" icon="''' + icon + '''" string="''' + time.name + '''" context="{'user_invisible': True}"/>\n'''
|
||||
search_extended +='''<separator orientation="vertical"/>'''
|
||||
|
||||
res['arch'] = res['arch'].replace('<separator name="gtdsep"/>', search_extended)
|
||||
res['arch'] = tools.ustr(res['arch']).replace('<separator name="gtdsep"/>', search_extended)
|
||||
|
||||
return res
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ class project_work(osv.osv):
|
|||
vals_line['name'] = '%s: %s' % (tools.ustr(task.task_id.name), tools.ustr(vals['name']) or '/')
|
||||
if 'user_id' in vals:
|
||||
vals_line['user_id'] = vals['user_id']
|
||||
result = self.get_user_related_details(cr, uid, vals['user_id'])
|
||||
result = self.get_user_related_details(cr, uid, vals.get('user_id', task.user_id.id))
|
||||
for fld in ('product_id', 'general_account_id', 'journal_id', 'product_uom_id'):
|
||||
if result.get(fld, False):
|
||||
vals_line[fld] = result[fld]
|
||||
|
|
|
@ -107,7 +107,6 @@ class crm_make_sale(osv.osv_memory):
|
|||
new_ids.append(new_id)
|
||||
message = _("Opportunity has been <b>converted</b> to the quotation <em>%s</em>.") % (sale_order.name)
|
||||
case.message_append_note(body=message)
|
||||
|
||||
if make.close:
|
||||
case_obj.case_close(cr, uid, data)
|
||||
if not new_ids:
|
||||
|
|
|
@ -668,7 +668,8 @@ class share_wizard(osv.osv_memory):
|
|||
"""Creates the appropriate share group and share users, and populates
|
||||
result_line_ids of wizard_data with one line for each user.
|
||||
|
||||
:return: the new group id (to which the shared access should be granted)
|
||||
:return: a tuple composed of the new group id (to which the shared access should be granted),
|
||||
the ids of the new share users that have been created and the ids of the existing share users
|
||||
"""
|
||||
group_id = self._create_share_group(cr, uid, wizard_data, context=context)
|
||||
# First create any missing user, based on the email addresses provided
|
||||
|
@ -739,7 +740,7 @@ class share_wizard(osv.osv_memory):
|
|||
all_relations = obj0 + obj1 + obj2
|
||||
self._link_or_copy_current_user_rules(cr, current_user, group_id, all_relations, context=context)
|
||||
# B.
|
||||
main_domain = wizard_data.domain if wizard_data.domain != '[]' else DOMAIN_ALL
|
||||
main_domain = wizard_data.domain if wizard_data.domain != '[]' else str(DOMAIN_ALL)
|
||||
self._create_or_combine_sharing_rule(cr, current_user, wizard_data,
|
||||
group_id, model_id=model.id, domain=main_domain,
|
||||
restrict=True, context=context)
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
</group>
|
||||
<notebook>
|
||||
<page string="Survey">
|
||||
<field name="page_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<field name="page_ids" colspan="4" nolabel="1" mode="tree">
|
||||
<form string="Survey Page">
|
||||
<field name="title" select="1"/>
|
||||
<field name="sequence" groups="base.group_no_one"/>
|
||||
|
|
Loading…
Reference in New Issue