mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
19 lines
486 B
Python
19 lines
486 B
Python
# -*- coding: utf-8 -*-
|
||
|
||
from odoo import api, fields, models, tools, _
|
||
|
||
|
||
class Company(models.Model):
|
||
_inherit = "res.company"
|
||
|
||
_parent_store = True
|
||
parent_path = fields.Char(index=True, unaccent=False)
|
||
|
||
# 注意,res.partner 有 parent_id 和 child_ids
|
||
# all_child_ids = fields.One2many('res.company', string='All Child Companies', compute=False)
|
||
#
|
||
# @api.depends('parent_id', 'child_ids')
|
||
# def _compute_all_child_ids(self):
|
||
# pass
|
||
#
|