Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2760 Lượt xem
  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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 25
2556
0
thg 12 24
1489
0
thg 9 23
1745
1
thg 3 23
6692
2
thg 4 22
4131