← Back to team overview

openerp-india team mailing list archive

[Bug 878432] Re: [trunk] Hr_applicant : On Webclient, the field Appreciation(priority) when chosen, any button click will throw a traceback

 

Hello,

Thanks for your reply.

I have again tried with fresh db with updated code. I think you have
checked with web.

AVAILABLE_PRIORITIES = [
    ('', ''),
    ('5', 'Not Good'),
    ('4', 'On Average'),
    ('3', 'Good'),
    ('2', 'Very Good'),
    ('1', 'Excellent')
]

I have create new applicant with priority Good(3) and process further, press button In Progress it's refers  with priority Good(3) , After that If  I  have  set priority Very Good(2) and  press button  Hire then  It is showing me "IndexError: list index out of range" because before Hire it's  refers to Priority Good(3) not Very Good(2) 
Correct me If I am wrong.

Thanks and waiting for your reply.

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

Title:
  [trunk] Hr_applicant : On Webclient,the field Appreciation(priority)
  when chosen, any button click will throw a traceback

Status in OpenERP Addons (modules):
  Incomplete
Status in OpenERP Web Client:
  Incomplete
Status in OpenERP Server:
  Incomplete

Bug description:
  Select any applicant record, assign any value to the field
  'Appreciation', press any button to traverse through next state.

  There will be a traceback as follows:
  Traceback (most recent call last):
    File "/home/salmaan/workspace/trunk/server/openerp/service/netrpc_server.py", line 62, in run
      result = netsvc.dispatch_rpc(msg[0], msg[1], msg[2:])
    File "/home/salmaan/workspace/trunk/server/openerp/netsvc.py", line 325, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/salmaan/workspace/trunk/server/openerp/service/web_services.py", line 580, in dispatch
      res = fn(db, uid, *params)
    File "/home/salmaan/workspace/trunk/server/openerp/osv/osv.py", line 122, in wrapper
      raise except_osv(inst.name, inst.value)
  except_osv: (u'ValidateError', u'The value "4" for the field "hr_applicant.priority" is not in the selection')

  
  There should either be a fix from
  1. web to send char values to server for selection widget.
   The FancyValidator/Schema should consider the type as well. Right now, it considers only the widget attribute.

  OR
   
  2. Server should  always compare the string conversion of value, to selection list/tuple.

  OR

  3. The addon should be corrected in order to allocate only character
  values to selection list, rather than '1','2',etc.

  Note: GTK seems approaching right to the server.

  Thanks,
  Serpent Consulting Services.

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