I have created one custom model that contain three relation fields. Following is relations:
class SurveyCreate(models.Model):
_name = 'create.survey’
survey_name = fields.Many2one('survey.survey',string='Survey Title')
pages_id = fields.One2many('survey.page','create_id_survey','Pages')
questions_survey = fields.One2many('survey.question','create_id_survey','Questions')
and many2one fields created in survey.page & survey.question resp.
Follwing is xml file:
<group>
<field name="survey_name"/>
</group>
<group>
<field name="pages_id" mode="tree">
<tree editable="bottom">
<control>
<create string="Add page"/>
</control>
<field name="title"/>
<field name="questions_id" widget="many2many_tags" options="{'no_create':True}" context="{'tree_view_ref':'survey_inherit.questions_survey'}"/>
</tree>
</field>
</group>
<group>
<field name="questions_survey" mode='tree'>
<control>
<create string="Add Question"/>
</control>
<tree name="questions_tree" editable="bottom">
<field name="question"/>
<field name="type"/>
</tree>
</field>
</group>
As in screenshort when select on pages -> question that should be display in below questions field.
For this I take the reference of invoice creation form. In invoice creation form when you select product & after selecting tax then it will display in tax description of other info.
I have check coding as well but not understand how product tax display in tax description. Same thing i want to do in my custom module.
Can any one please help me . Any hint, other way appriciated.