← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 753313] Re: many2one field contextmenu postion

 

** Changed in: openobject-client-web
     Assignee: OpenERP Publisher's Warranty Team (openerp-opw) => OpenERP SA's Web Client R&D (openerp-dev-web)

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

Title:
  many2one field contextmenu postion

Status in OpenERP Web Client:
  Confirmed

Bug description:
  web client 6.0.2

  form view many2one field, to open resource contextmenu's position error. 
  I found the bug is the "#contextmenu" offset value error.

  @/addons/openerp/static/javascript/form.js
  <pre>
  ......
          var $menu = jQuery('#contextmenu');
          $menu.empty().append(
              jQuery('<table cellpadding="0" cellspacing="0">').append($tbody));

          var menu_width = $menu.width();
          var body_width = jQuery(document.body).width();
          if (parseInt($menu.css("left")) + menu_width > body_width) {
              $menu.offset({ left: body_width - menu_width - 10 });
          }
          showContextMenu();
  ......
  </pre>


  the $menu.offset method parameter's value error.
  just fixed it like:
              $menu.offset({ left: (body_width - menu_width - 10)+'px' });


References