Skip to content

Commit d65de7e

Browse files
committed
fixed error when action_id is None or False
1 parent 86ce6f0 commit d65de7e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spp_custom_field/models/cus_partner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def _get_view(self, view_id=None, view_type="form", **options):
2323
basic_info_page = doc.xpath("//page[@name='basic_info']")
2424

2525
action_id = self.env["ir.actions.act_window"].browse(options.get("action_id"))
26+
if not action_id:
27+
act_window_view = self.env["ir.actions.act_window.view"].search([("view_id", "=", view_id)], limit=1)
28+
action_id = act_window_view.act_window_id
2629

2730
model_fields_id = self.env["ir.model.fields"].search(
2831
[("model_id", "=", "res.partner")],

0 commit comments

Comments
 (0)