Odoo 14: Add A Section Functionality In Tree View
I need add a section functionality like sales > quotation view has, in one of my tree views. . Code of my view is something like this:
<fieldname="qualification_lines"widget="section_and_note_one2many"><treeeditable="bottom"><control><createname="add_line_control"string="Add a line"/><createname="add_section_control"string="Add a section"context="{'default_display_type': 'line_section'}"/></control><fieldname="name"widget="section_and_note_text"optional="show"/><fieldname="display_type"invisible="1"/><fieldname="score"/></tree></field>
Model definition:
classQualification(models.Model):
_name = 'hr.applicant.qualification'
_description = 'Applicant Qualification'
name = fields.Char(required=True)
display_type = fields.Selection([
('line_section', "Section"),
('line_note', "Note")], default=False, help="Technical field for UX purpose.")
qualification_data = fields.Many2one('hr.applicant', string='Qualification')
Post a Comment for "Odoo 14: Add A Section Functionality In Tree View"