I found where the empty messages are generated :
in bin/rpc.py @line 39

It seems rpc_exception constructor receives data that makes it return
empty strings for message and data.

For exemple the entry code is :
'UserError\nYou can not delete a posted journal entry "EXPF/2011/0001"!'

When splitting by '\n' it will produce only a list of 2 lines.
['UserError', 
 'You can not delete a posted journal entry "EXPF/2011/0001"!']

So this will be empty :
self.data = '\n'.join(lines[2:])

Furthermore, the split by ' -- ' doesn't fit what enter in that
constructor.

I see 2 possible reasons, the code data is wrong after some rpc issue that 
doesn't create the right code.
Or the rpc_exception has to be adapted.

Regards,
Yannick

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/903812

Title:
  [6.1] UserError exception not displayed

Status in OpenERP GTK Client:
  Incomplete

Bug description:
  Hello,

  In revision 2024 or before of GTK client, UserError are not displayed
  anymore.

  As an example, here is screen capture of the error defined in 
accout/account.py @line 1393
      def unlink(self, cr, uid, ids, context=None, check=True):
          if context is None:
              context = {}
          toremove = []
          obj_move_line = self.pool.get('account.move.line')
          for move in self.browse(cr, uid, ids, context=context):
              if move['state'] != 'draft':
                  raise osv.except_osv(_('UserError'),   # <---------
                          _('You can not delete a posted journal entry "%s"!') 
% \
                                  move['name'])
              line_ids = map(lambda x: x.id, move.line_id)
              context['journal_id'] = move.journal_id.id
              context['period_id'] = move.period_id.id
              obj_move_line._update_check(cr, uid, line_ids, context)
              obj_move_line.unlink(cr, uid, line_ids, context=context)
              toremove.append(move.id)
          result = super(account_move, self).unlink(cr, uid, toremove, context)
          return result

  
  Regards,
  Yannick

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

_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to