res_users.py 460 B

12345678910111213141516
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import models, fields, api, _
  4. class User(models.Model):
  5. _inherit = ['res.users']
  6. vehicle = fields.Char(related="employee_id.vehicle")
  7. bank_account_id = fields.Many2one(related="employee_id.bank_account_id")
  8. @property
  9. def SELF_READABLE_FIELDS(self):
  10. return super().SELF_READABLE_FIELDS + ['vehicle', 'bank_account_id']