fix tab
This commit is contained in:
parent
b5ab149e62
commit
f9488a0248
1 changed files with 7 additions and 5 deletions
|
|
@ -4,11 +4,13 @@ from odoo import models, fields, api, _, Command
|
||||||
class Partner(models.Model):
|
class Partner(models.Model):
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
root_ancestor = fields.Many2one(comodel_name='res.partner',
|
root_ancestor = fields.Many2one(
|
||||||
string='Root Ancestor',
|
comodel_name='res.partner',
|
||||||
compute='_compute_root_ancestor',
|
string='Root Ancestor',
|
||||||
store=True,
|
compute='_compute_root_ancestor',
|
||||||
recursive=True)
|
store=True,
|
||||||
|
recursive=True
|
||||||
|
)
|
||||||
|
|
||||||
@api.depends('parent_id', 'parent_id.root_ancestor')
|
@api.depends('parent_id', 'parent_id.root_ancestor')
|
||||||
def _compute_root_ancestor(self):
|
def _compute_root_ancestor(self):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue