← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 878912] Re: in the web client, raise osv.except_osv in an on_change field opens in a popup window but redirects to the same page as the parent window

 

Any update on this?

-- 
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/878912

Title:
  in the web client, raise osv.except_osv in an on_change field opens in
  a popup window but redirects to the same page as the parent window

Status in OpenERP Web Client:
  New

Bug description:
  To replicate this bug, use this function below:

  def check_phone_number_input_format(self, cr, uid, ids, data1):
          result = {}
          compiled_regex = re.compile("(^[0-9]{2}\/[0-9]{3}\.[0-9]{2}\.[0-9]{2}$)|(^[0-9]{3}\/[0-9]{2}\.[0-9]{2}\.[0-9]{2}$)")
          if data1:
              matched = compiled_regex.match(data1)
              if matched:
                  return result
              else:
                  raise osv.except_osv(('User Input error'),('Please correct the format of the telephone number (it must be 00/000.00.00 or 000/00.00.00), it does not pass the check'))

   Then this one in the

  _columns = {
          'work_phone': fields.char('Work Telephone Number', size=32, help="Employee's work telephone number"),
  }

  Then this one in the XML file

  <field name="work_phone"
  on_change="check_phone_number_input_format(work_phone)" />

  Problem is, in the web client, when the on_change is triggered, it
  opens in a popup window but redirects to the page with content same as
  the parent window.

  Server: Ubuntu 10.04 Desktop 64bit
  OpenERP Server: 6.0.3
  Web Client: Chrome and FF

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


References