← Back to team overview

openerp-india team mailing list archive

[Bug 1042718] [NEW] Stacktrace on Marketing Campaign when trying to execute deleted workitem

 

Public bug reported:

Steps to reproduce:

 1) Install CRM and Marketing Campaigns
 2) Create at least one company & contact in CRM
 3) Create a search that returns at least one contact in CRM
 4) Create a marketing campaign that operates on Partner Addresses
 5) Create an activity within this campaign that is the start activity, set its condition to False, don't check "Don't delete workitems"
 6) Create a segment for the campaign based on the search from step 4
 7) Start the campaign and the segment
 8) Synchronize segment manually
 9) Click on the green arrow for the workitem
10) The workitem is deleted since its run condition wasn't met, but the screen is not updated. So it remains on the screen and the green arrow can be clicked again.
11) Clicking the green arrow again will attempt to run a workitem that no longer exists and result in the following stacktrace:

2012-08-28 12:25:58,804 8913 WARNING ? openerp.osv.orm: No field_values found for ids [1] in browse_record(marketing.campaign.workitem, 1)
2012-08-28 12:25:58,805 8913 ERROR ? openerp.osv.osv: Uncaught exception
Traceback (most recent call last):
  File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/osv.py", line 121, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/osv.py", line 189, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/osv.py", line 177, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/nighty/workspaces/openerp/mckinsey/addons/marketing_campaign/marketing_campaign.py", line 765, in process
    self._process_one(cr, uid, wi, context=context)
  File "/home/nighty/workspaces/openerp/mckinsey/addons/marketing_campaign/marketing_campaign.py", line 677, in _process_one
    if workitem.state != 'todo':
  File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/orm.py", line 478, in __getattr__
    raise AttributeError(e)
AttributeError: 'Field state not found in browse_record(marketing.campaign.workitem, 1)'
2012-08-28 12:25:58,847 8913 ERROR ? openerp.netsvc: Field state not found in browse_record(marketing.campaign.workitem, 1)
> /home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/orm.py(478)__getattr__()
-> raise AttributeError(e)

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1042718

Title:
  Stacktrace on Marketing Campaign when trying to execute deleted
  workitem

Status in OpenERP Addons (modules):
  New

Bug description:
  Steps to reproduce:

   1) Install CRM and Marketing Campaigns
   2) Create at least one company & contact in CRM
   3) Create a search that returns at least one contact in CRM
   4) Create a marketing campaign that operates on Partner Addresses
   5) Create an activity within this campaign that is the start activity, set its condition to False, don't check "Don't delete workitems"
   6) Create a segment for the campaign based on the search from step 4
   7) Start the campaign and the segment
   8) Synchronize segment manually
   9) Click on the green arrow for the workitem
  10) The workitem is deleted since its run condition wasn't met, but the screen is not updated. So it remains on the screen and the green arrow can be clicked again.
  11) Clicking the green arrow again will attempt to run a workitem that no longer exists and result in the following stacktrace:

  2012-08-28 12:25:58,804 8913 WARNING ? openerp.osv.orm: No field_values found for ids [1] in browse_record(marketing.campaign.workitem, 1)
  2012-08-28 12:25:58,805 8913 ERROR ? openerp.osv.osv: Uncaught exception
  Traceback (most recent call last):
    File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/osv.py", line 189, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/osv.py", line 177, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/nighty/workspaces/openerp/mckinsey/addons/marketing_campaign/marketing_campaign.py", line 765, in process
      self._process_one(cr, uid, wi, context=context)
    File "/home/nighty/workspaces/openerp/mckinsey/addons/marketing_campaign/marketing_campaign.py", line 677, in _process_one
      if workitem.state != 'todo':
    File "/home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/orm.py", line 478, in __getattr__
      raise AttributeError(e)
  AttributeError: 'Field state not found in browse_record(marketing.campaign.workitem, 1)'
  2012-08-28 12:25:58,847 8913 ERROR ? openerp.netsvc: Field state not found in browse_record(marketing.campaign.workitem, 1)
  > /home/nighty/src/OpenERP/shared_repo/server/mckinsey_trunk/openerp/osv/orm.py(478)__getattr__()
  -> raise AttributeError(e)

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1042718/+subscriptions


Follow ups

References