Hello.
I have successfully created a custom module and added a new field called "room_number" to hr.employee kanban view so to everyone can see where in the building to find their colleague. The problem is, everyone except HR`s and admins are redirected to hr\.employees\.public where\ this\ field\ is\ not\ visible\.\ Next,\ I\ try\ to\ make\ this\ field\ visible\ to\ everyone\ by\ moving\ it\ to\ hr\.employee\.public:
from\ odoo\ import\ models,\ fields
class\ sep_hr_employee_abs\(models\.Model\):
\ \ \ \ \ _name\ =\ 'hr\.employee\.public'
\ \ \ \ \ _inherit\ =\ 'hr.employee.public'
room_number = fields.Char(string='Room number')
<record id="sep_employee_kanban_view" model= "ir.ui.view"><field name="inherit_id"ref="hr.hr_kanban_view_employees"/><field name="model">hr.employee.publicfield><field name="arch"type="xml"><xpath expr="//kanban/templates/t/div/div" position="after"><field name="work_location_id"/>
xpath>
field>
record>
after that I have got the following error:
Error while validating view near:
-
Field "category_ids" does not exist in model "hr.employee.public"
View error context:
{'file': '/mnt/extra-addons/sep_employee/sep_employee_view.xml',
'line': 44,
'name': 'hr.employee kanban',
'view': ir.ui.view(431,),
'view.model': 'hr.employee.public',
'view.parent': ir.ui.view(369,),
'xmlid': 'sep_employee_kanban_view'}
I want to understand where should I create a field and how to make it visible in hr\.employee\.public kanban\ view\.
I\ have\ found\ some\ info\ here,\ but\ it\ doesn`t\ help\ me:
Ok, can anyone help me paste code here? :DD
I have tried by this manual and it is not working:
https://www.youtube.com/watch?v=nw3q0Cs1swg