Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3142 Weergaven

I have a Vendor model and it has one2many field for the Application model. The Application model has a one2many field for the Document model. I want the document model associated with both Application and Vendor. When a user views the Vendor form a tab shows a tree of related Applications. Clicking an Application opens its form in a dialog and a tab there shows related Documents. Now if user clicks "Add Item" and creates a new Document that Document is related to the Application but not also the Vendor.

Can I put the vendor_id into the context when the Vendor form is rendered and then access that value from the create method of Document so I can add vendor_id to vals? If so how do I go about it?

Ultimately I want to create an alternate Vendor form with a tab to show all related Documents for the Vendor even if they aren't associated with an Application.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mrt. 18
4512
1
jan. 25
1281
0
apr. 24
1903
0
jul. 22
2398
3
sep. 20
3060