Cannot select incoming folder, gives error

Bug #803788 reported by Todor Andreev
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Power Email
Invalid
Undecided
Serpent Consulting Services

Bug Description

Using 6.0.0.7 RC on OpenERP 6.0.2 on Ubuntu 10.04.2 server. From webclient and GTK. Downloaded it with bzr on 30.06.11 with this command:
bzr branch http://bazaar.launchpad.net/~openerp-commiter/poweremail/poweremail-v6/

When I configure email IMAP account and click on button "Select folder" it gives this error:
An error occurred : 'Field isssl not found in browse_record(poweremail.core_accounts, 608)'
So I cannot configure an email account and use poweremail at all.

Related branches

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

Can you please try if the error exists with this repository: https://bitbucket.org/openlabs/poweremail

Link to download as ZIP: https://bitbucket.org/openlabs/poweremail/get/tip.zip

Revision history for this message
Todor Andreev (toshko3) wrote :

When I try to uninstall the older one it says:
Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: wkf_workitem - wkf.workitem]

Could you please tell me what to do, so the older module can be wiped out.
Thanks!

Revision history for this message
Todor Andreev (toshko3) wrote :

OK, removed the account, I have created before (partially) and after some more errors, removed the added groups to my user and administrator. After that it removed successfully. But now, I import the module you gave me with no errors, but on install it gives me this:
Environment Information :
System : Linux-2.6.32-32-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.2 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-32-generic
Operating System Version : #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/share/pyshared/openerp-server/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/usr/share/pyshared/openerp-server/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 716, in load_module_graph
    register_class(package.name)
  File "/usr/share/pyshared/openerp-server/addons/__init__.py", line 456, in register_class
    zimp.load_module(m)
  File "/usr/share/pyshared/openerp-server/addons/openlabs-poweremail-555b6d5ad247.zip/openlabs-poweremail-555b6d5ad247/__init__.py", line 20, in <module>
  File "/usr/share/pyshared/openerp-server/addons/openlabs-poweremail-555b6d5ad247.zip/openlabs-poweremail-555b6d5ad247/template.py", line 34, in <module>
  File "/usr/share/pyshared/openerp-server/addons/openlabs-poweremail-555b6d5ad247.zip/openlabs-poweremail-555b6d5ad247/template_engine.py", line 44, in <module>
  File "/usr/lib/pymodules/python2.6/django/conf/__init__.py", line 49, in configure
    raise RuntimeError, 'Settings already configured.'
RuntimeError: Settings already configured.

Revision history for this message
Edgar (christ-0) wrote :

Hello,

same problem here, with the same setup.

Does this one works:

https://bitbucket.org/openlabs/poweremail

Best Regards
Patrik

Revision history for this message
Edgar (christ-0) wrote :

Hello,

I tried to uninstall the module with no success, some group relation errors.

This modules runs in the following error.

"There is no reference available for res.partner.event.type"

Patrik

Revision history for this message
Kelbethor (csi-kelbethor) wrote :

The problem is context content. active_ids used to determine core_account we want to recover imap folders is actually ir.ui.menu's

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Hello Everyone,

I just faced it while trying to configure an imap.

The video says it all!

Thanks,
Serpent Consulting Services.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :
Changed in poweremail:
assignee: nobody → Serpent Consulting Services (serpent-consulting-services)
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Hello,

I cannot confirm the bug on LP here, but I do practically.

The actual problem was here:

The button did not pass any context and thus updating any 'active_ids'(poweremail/poweremail_core_view.xml line 83), whereas the _get_folders method ((poweremail/poweremail_core.py line 1100) is looking for context['active_ids'].

Normally active_ids,active_id for actions contains the Id of menu, unless modified.

In this case, the id appears as the id of the menu.

Additionally, I see a bug in GTK/web both as they don't seem to send context (of an action called from button) to the methods.(poweremail/poweremail_core_view.xml line 34 becomes useless here).

In GTK, the action being read is of 'ir.actions.actions'(bin/modules/action/main.py line 78) instead of 'ir.actions.act_window'.

The attached merge fixes the problem.

Thanks,
Serpent Consulting Services.

Revision history for this message
Jerome Patrick Alciso (jeromealciso-deactivatedaccount) wrote :

Hello,

I have a similar problem and I've tried using the fix provided, but now it's throwing another error when clicking the button:

Environment Information :
System : Linux-2.6.38-13-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.38-13-generic
Operating System Version : #54~lucid1-Ubuntu SMP Wed Jan 4 13:00:37 UTC 2012
Operating System Architecture : 64bit
Operating System Locale : en_PH.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/audittrail/audittrail.py", line 518, in execute
    res = my_fct(db, uid, model, method, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/audittrail/audittrail.py", line 502, in my_fct
    return fct_src(db, uid_orig, model, method, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 1046, in default_get
    if key.startswith('default_') and (key[8:] in fields_list):
AttributeError: 'int' object has no attribute 'startswith'

Revision history for this message
Allen Wyma (allen-wyma) wrote :

I'm getting the same as Jerome:

Environment Information :
System : Linux-2.6.32-38-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-38-generic
Operating System Version : #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012
Operating System Architecture : 32bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.3
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/share/pyshared/openerp-server/osv/orm.py", line 1046, in default_get
    if key.startswith('default_') and (key[8:] in fields_list):
AttributeError: 'int' object has no attribute 'startswith'

Revision history for this message
Jeroen Vet (jeroen-vet) wrote :

*SOLVED*
Unfortunately fix by Serpent Consulting Services introduced another bug as the context passes a superfluous 'active_id'. Openerp for some mysterious reason interprets this key so that it is replaced by the integer representing the active_id. Resulting in an entry like 2: 2 in the context instead of 'active_id': 2. The method defaults_get crashes with an integer key.
Simple fix is to remove the 'active_id': active_id from the context attribute in poweremail_core_view.xml .
line 83 should now read:

<button name="%(act_selfolder_form)d" type="action" string="Select Folder" attrs="{'invisible':[('iserver_type','=','pop3')]}" colspan="2" target="new" context="{'active_ids':[active_id]}"/>

 Poweremail only uses the 'active_ids' context entry which is passed along fine.

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Closing the bug for now, as with latest updates, it seems ok.

Changed in poweremail:
assignee: Serpent Consulting Services (serpent-consulting-services) → nobody
assignee: nobody → Serpent Consulting Services (serpent-consulting-services)
status: New → 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.