Files
app-odoo/app_base_company_zchart/models/res_company.py
Ivan Office 5a5ec3eb63 fix
2024-12-04 17:38:00 +08:00

19 lines
488 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- 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