[FIX] sale_crm: allow modifying the default sale's team on user preferences
bzr revid: mat@openerp.com-20130729075824-jcxwd1va8yav4rjh
This commit is contained in:
parent
20a0428e6f
commit
3037b94205
|
@ -42,6 +42,13 @@ class res_users(osv.Model):
|
||||||
'default_section_id': fields.many2one('crm.case.section', 'Default Sales Team'),
|
'default_section_id': fields.many2one('crm.case.section', 'Default Sales Team'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def __init__(self, pool, cr):
|
||||||
|
init_res = super(res_users, self).__init__(pool, cr)
|
||||||
|
# duplicate list to avoid modifying the original reference
|
||||||
|
self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS)
|
||||||
|
self.SELF_WRITEABLE_FIELDS.extend(['default_section_id'])
|
||||||
|
return init_res
|
||||||
|
|
||||||
|
|
||||||
class sale_crm_lead(osv.Model):
|
class sale_crm_lead(osv.Model):
|
||||||
_inherit = 'crm.lead'
|
_inherit = 'crm.lead'
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="//field[@name='company_id']" position="after">
|
<xpath expr="//field[@name='company_id']" position="after">
|
||||||
<field name="default_section_id"/>
|
<field name="default_section_id" readonly="0"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</data>
|
</data>
|
||||||
</field>
|
</field>
|
||||||
|
|
Loading…
Reference in New Issue