mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update apps
This commit is contained in:
18
app_base_company_zchart/models/res_company.py
Normal file
18
app_base_company_zchart/models/res_company.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- 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
|
||||
|
||||
Reference in New Issue
Block a user