mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-12-23 12:51:46 +00:00
20 lines
544 B
Python
20 lines
544 B
Python
# Copyright 2020 Tecnativa - Jairo Llopis
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
|
|
from flectra 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",
|
|
}
|