asterisk_click2dial_crm blocks portal_crm messages from sending

Bug #1180599 reported by Brett Lehrer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP-Asterisk connector
Invalid
Undecided
Unassigned

Bug Description

Using 7.0. Not entirely sure if this belongs here, I'm fairly new to 7.0 compared to 6.1.

When a portal user attempts to create a message, that causes a new lead to be created in portal_crm/contact.py in create(). It fails because it's trying to add the mobile_e164 field, which doesn't exist in the transient portal_crm.crm_contact_us model.

  File "/home/brett/erp/7.0/web/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/brett/erp/7.0/server/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/brett/erp/7.0/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/brett/erp/7.0/server/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/brett/erp/7.0/server/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/brett/erp/7.0/server/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/brett/erp/7.0/addons/audittrail/audittrail.py", line 514, in execute_cr
    return fct_src(cr, uid, model, method, *args, **kw)
  File "/home/brett/erp/7.0/server/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/brett/erp/7.0/addons/portal_crm/contact.py", line 108, in create
    return super(crm_contact_us, self).create(cr, SUPERUSER_ID, empty_values, {'mail_create_nosubscribe': True})
  File "/home/brett/erp/7.0/asterisk/asterisk_click2dial_crm/asterisk_click2dial_crm.py", line 111, in create
    return super(crm_lead, self).create(cr, uid, vals_reformated, context=context)
  File "/home/brett/erp/7.0/addons/crm/crm_lead.py", line 99, in create
    return super(crm_lead, self).create(cr, uid, vals, context=context)
  File "/home/brett/erp/7.0/addons/mail/mail_thread.py", line 242, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/home/brett/erp/7.0/server/openerp/osv/orm.py", line 4478, in create
    self.pool.get(object)._store_set_values(cr, user, ids, fields2, context)
  File "/home/brett/erp/7.0/server/openerp/osv/orm.py", line 4601, in _store_set_values
    result = self._columns[val[0]].get(cr, self, ids, val, SUPERUSER_ID, context=context)
  File "/home/brett/erp/7.0/server/openerp/osv/fields.py", line 1131, in get
    result = self._fnct(obj, cr, uid, ids, name, self._arg, context)
  File "/home/brett/erp/7.0/addons/crm/crm_lead.py", line 191, in _compute_day
    if lead.date_open:
  File "/home/brett/erp/7.0/server/openerp/osv/orm.py", line 484, in __getattr__
    return self[name]
  File "/home/brett/erp/7.0/server/openerp/osv/orm.py", line 399, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/home/brett/erp/7.0/server/openerp/osv/orm.py", line 3604, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/brett/erp/7.0/server/openerp/osv/orm.py", line 3656, in _read_flat
    cr.execute(query, [tuple(sub_ids)] + rule_params)
  File "/home/brett/erp/7.0/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/home/brett/erp/7.0/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column portal_crm_crm_contact_us.mobile_e164 does not exist

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

I tried to reproduce your problem with an up-to-date openerp 7.0 and an up-to-date asterisk connector, but I couldn't. I installed the portal, the demo portal user wrote several messages (with and without phone number) and I can see all its messages as leads.

Could you tell me what is your revno and branch of the asterisk-connector, and you revno of addons/server ? Could you post a step-by-step to reproduce the bug ?

Changed in openerp-asterisk-connector:
status: New → Incomplete
Revision history for this message
Brett Lehrer (brett-lehrer) wrote :

I've since updated to the latest revisions and the problem has now gone away. Hopefully it was just a side-effect of some small server change, or something I just had wrong? Either way, I can't reproduce it on my own any more, so I guess it's resolved.

Thanks for looking into it!

Changed in openerp-asterisk-connector:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.