<page string="Questions">
<field name="question_items">
<tree string="Questions" color ="blue" editable="bottom">
<field name='que_no'/>
<field name='que' bgcolor="green" fgcolor="yellow" cssclass="text_class"/>
<field name='option_a'/>
<field name='option_b'/>
<field name='option_c' />
<field name='option_d'/>
<field name='option_e'/>
<field name='cd_choice'/>
</tree>
</field>
</page>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
How to change column width in tree view one2many,many2many
Changing column widths tree view
According to your last comment, here is the example from hr_view.xml tree view:
<record id="view_employee_tree" model="ir.ui.view">
<field name="name">hr.employee.tree</field>
<field name="model">hr.employee</field>
<field name="arch" type="xml">
<tree string="Employees">
<field name="name"/>
<field name="work_phone"/>
<field name="work_email"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="department_id"/>
<field name="job_id"/>
<field name="parent_id"/>
<field name="coach_id" invisible="1"/>
</tree>
</field>
</record>
To use this example, you have to change:
id="view_employee_tree" to id="view_questions_tree" ,
hr.employee to question.bank,
<tree string="Employees"> to <tree string="Questions">
and inside the tree just add :
<field name="question_items"/>
Sir please help me ....................I need to fetch multiple record from a class and display in a tree view under a form view
I am trying to fetch records from a table(question_bank) and want to display all of them in a tree(list_of_questions) view under a form(student) view.
'question_items':fields.one2many('list_of_questions', 'student_id','Details'),
I can get one field value of a record by browse but I want to fetch all the records exactly from the table and display them in the tree view.
Like: display list of all the employees in a tree view from hr.employee.
please help me ..................I hope you will at least give me some reference from where I can get the the solution of my problem.