← Back to team overview

openerp-india team mailing list archive

[Bug 939358] [NEW] selection field store value but not show in the view after

 

Public bug reported:

A field of type selection and its function:

    def _sel_func(self, cr, uid, context=None):
        emp_obj = self.pool.get('hr.employee')
        emp_ids = emp_obj.search(cr,uid,[('user_id','=',uid)])
        emp = emp_obj.browse(cr, uid, emp_ids)[0]
        res = [(p['id'], p['name']) for p in emp.product_ids]
        return res

   'product_id':fields.selection(_sel_func, 'Product', method=True, required=True),
 
"product_ids" is a relation m2m with product.product. In the Form View the field is store perfectly, but when Tree View is refreshed The selection field is empty but in DB is stored.

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

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

Title:
  selection field store value but not show in the view after

Status in OpenERP Server:
  New

Bug description:
  A field of type selection and its function:

      def _sel_func(self, cr, uid, context=None):
          emp_obj = self.pool.get('hr.employee')
          emp_ids = emp_obj.search(cr,uid,[('user_id','=',uid)])
          emp = emp_obj.browse(cr, uid, emp_ids)[0]
          res = [(p['id'], p['name']) for p in emp.product_ids]
          return res

     'product_id':fields.selection(_sel_func, 'Product', method=True, required=True),
   
  "product_ids" is a relation m2m with product.product. In the Form View the field is store perfectly, but when Tree View is refreshed The selection field is empty but in DB is stored.

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


Follow ups

References