← Back to team overview

openerp-india team mailing list archive

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

 

** Attachment added: "Selection Field.ogv"
   https://bugs.launchpad.net/openobject-server/+bug/939358/+attachment/2960281/+files/Selection%20Field.ogv

-- 
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:
  Incomplete

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


References