Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Notes For Contact and Attachments Need To Trickle Up To Parent Accounts

By
Paramita
on 2/4/16, 3:07 PM 320 views
  1. I need to trickle up the internal notes and attachments  to the parent accout. For an example  if Branch A is the parent Company of Branch B and we have an employee Mr.X from Branch B, we need to trickle up all of  the internal notes and attachments of Mr.X, in not only Branch B ,also in Branch A.

0
Gerhard Baumgartner
On 2/5/16, 3:45 AM

You can make a new method in the employee that returns the internal notes and attachments. If you search for the employee record you can call this method to get the data from anywhere.

def get_employee_notes_attachments(self):
    return employee.internal_notes, employee.attachments

and call it like this:

employee = self.env['employee.model'].search([('id', '=', employee_id)])
notes, attachments = employee.get_employee_notes_attachments()

I don't know what odoo version you use, this answer would be for v8 or newer.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/4/16, 3:07 PM
Seen: 320 times
Last updated: 2/9/16, 3:26 PM