I have several modules that include a customer field. I want to be able to list all the records from these modules associated with each customer. For instance, suppose I have two modules: module A and module B. Also, suppose I have a customer named John Doe. John Doe has two records in module A and one record in module B. When I search the name "John Doe" in my master search, I should get a list like this:
Customer | Module Type |
John Doe | module A |
John Doe | module A |
John Doe | module B |
I could create a new module that gets a list of all the records in my different modules and create a search view by customer on it. I'm mainly worried that I'd have to create a new model and store tons of new records. Is there a way to create a module that doesn't actually store any records but instead just displays a list of records across multiple modules?
I could extend the customer module so that the records of each module get associated with the customer. For instance, using the example above, the customer John Doe would have two One2many fields, one for a list of module A records and one for a list of module B records. However, I'm worried that these fields may get out of sync with what's actually in the database.
Does anyone have a better idea of how to do this?