← Back to team overview

openerp-india team mailing list archive

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

 

Hello Javier,

As per your reported bug, I think you might have a mistake on your code.
Because I didn't find any problem at our end.

This things are already working on our official addons at many places
like in Accounting all pdf reporting (_get_current_report_type function
field with type="selection")  ,         'journal_id':
fields.selection(_get_journal_id, 'Destination Journal',required=True)
as well as at more places.

So I think you have check your code because this problem occurs from
your end . That's why we can not consider this issue as  a bug and I am
closing this issue.

Thanks for understanding!

** Changed in: openobject-server
       Status: Incomplete => Invalid

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

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