Assigning multiple 'Company' user property to users

Hi There,

We have a need to assign multiple 'Company' user properties to our users. I am able to set multiple 'Company' user properties for our users but whenever we update their employee record, the existing 'Company' user properties get set to the Employee's Company field. This is happening because of code (webnotes.conn.set_default("company", self.doc.company, self.doc.user_id))  in update_user_default function of employee.py.

So if comment this code at our end and write custom script (type: server) then we can achieve what we want. But we don't want to modify any core ERPNext code at our end as we will have to manually maintain this when ever we pull new changes.  Is there any other way to achieve the same without modifying the employee.py file? Thanks in advance.

Kind regards,
Mayur Patel



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Mayur,

You can send a issue (better a PR) that ignores this setting if multiple settings already exist for Company.

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 09-Sep-2013, at 5:28 PM, MP <ma...@gmail.com> wrote:

Hi There,

We have a need to assign multiple 'Company' user properties to our users. I am able to set multiple 'Company' user properties for our users but whenever we update their employee record, the existing 'Company' user properties get set to the Employee's Company field. This is happening because of code (webnotes.conn.set_default("company", self.doc.company, self.doc.user_id))  in update_user_default function of employee.py.

So if comment this code at our end and write custom script (type: server) then we can achieve what we want. But we don't want to modify any core ERPNext code at our end as we will have to manually maintain this when ever we pull new changes.  Is there any other way to achieve the same without modifying the employee.py file? Thanks in advance.

Kind regards,
Mayur Patel



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.