Hi group.
I am new to Odoo.
I was able to add a new field in
<record model="ir.ui.view" id="hr_test_att">
<field name="name">hr_test_att</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<field name="barcode" position="before">
<field name="bio_id"/>
</field>
</field>
</record>
but viewing employee kanban view using other user other then admin gives an error of
ValueError: Element '<field name="barcode">' cannot be located in parent view Error context: View `hr_test_att` [view_id: 2361, xml_id: hr_test_att.hr_test_att, model: hr.employee, parent_id: 329]
class hr_test_att(models.Model):
_inherit = 'hr.employee'
bio_id = fields.Integer('Bio id')
def _default_employee(self):
return self.env['hr.employee'].search([('bio_id', '=', self.env.uid)], limit=1)
Can someone point me to the right direction?.
thank you.