mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update sale commission
This commit is contained in:
16
app_users_zchart/models/res_users.py
Normal file
16
app_users_zchart/models/res_users.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models, tools, _
|
||||
|
||||
|
||||
class Users(models.Model):
|
||||
_inherit = "res.users"
|
||||
|
||||
# 注意,res.partner 有 parent_id 和 child_ids
|
||||
_parent_name = "user_parent_id"
|
||||
_parent_store = True
|
||||
parent_path = fields.Char(index=True)
|
||||
|
||||
user_parent_id = fields.Many2one('res.users', string='Parent User', index=True)
|
||||
user_child_ids = fields.One2many('res.users', 'user_parent_id', string='Sub Users', domain=[('active', '=', True)])
|
||||
|
||||
Reference in New Issue
Block a user