Guys ,
I have created two content types.
1. Customer
2. Loan Request
The customer content type has a field called "Customer Name" I want to use that in the loan request page. I have used default view for the content types to display in the UI screen.
customers.py
from plone.dexterity.browser.view import DefaultView
from plone import api
class CustomersView(DefaultView):
"""Sample Browser view"""
loanrequest.py
from plone import api
from Products.Five.browser import BrowserView
from plone.dexterity.browser.view import DefaultView
class LoanRequestView(DefaultView) :
'''Loan Request View'''
Inside any view you can perform arbitrary queries (portal_catalog) or use acquisition or resolving a reference for getting hold of related content objects (it is up to you how you defined your object relations - either through references, containment or any other logic). If you have the other object then you can display the related attributes as needed.
An example for what? Plone is organized hierarchical in folders and it is obvious that could can create container or folderish objects for storing other content that belongs to this particular folder. A customer could be folder containing LoanRequests as sub content inside.
@AnanthaBalaji being a non-programmer while I am not competent to evaluate your query, I don't think content types is the way forward to what you want to do. I have built applications using the add on Plomino which is available for plone 5.0. you may either use that or try to figure out your answer by exploring how Plomino does it.
I got what you are trying to say. But can you redirect me to a link where I will get the example for the second subtask. I am really thankful to you guys. The zope.location.interfaces is not present for plone 5
I cannot because I do not understand your problem.
Almost surely, your Plone (apparently some version 5) has zope.location.interfaces and with it you can find the parent of an object like I have shown in a previous response.
dexterity content types likely implement the IContained interface directly. In this case, you can use obj.__parent__ to access obj's parent. The previously described "official way" (explicitly adapting obj to IContained) is safer, however, as it does not require that obj itself implements IContained, it is sufficient that it can be adapted to it.