[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:
Martin Trigaux 2013-07-29 09:58:24 +02:00
parent 20a0428e6f
commit 3037b94205
2 changed files with 8 additions and 1 deletions

View File

@ -42,6 +42,13 @@ class res_users(osv.Model):
'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):
_inherit = 'crm.lead'

View File

@ -112,7 +112,7 @@
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='company_id']" position="after">
<field name="default_section_id"/>
<field name="default_section_id" readonly="0"/>
</xpath>
</data>
</field>