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

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