update sale commission

This commit is contained in:
ivan deng
2021-12-05 21:56:04 +08:00
parent f8154e81bf
commit e55abd28bb
44 changed files with 827 additions and 29 deletions

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import res_users

View 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)])