You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
541 B

# Copyright 2020 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class ResPartner(models.Model):
_inherit = "res.partner"
def open_child_form(self):
"""Open child contact form from the parent partner form view"""
return {
"type": "ir.actions.act_window",
"res_model": "res.partner",
"res_id": self.id,
"view_mode": "form",
"view_type": "form",
"target": "current",
}