Skip to content

Commit

Permalink
fastapi_auth_partner: fix view
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbeau committed Nov 5, 2023
1 parent dc61c92 commit 947569f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fastapi_auth_partner/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ResPartner(models.Model):
auth_partner_ids = fields.One2many(
"fastapi.auth.partner", "partner_id", "Partner Auth"
)
count_partner_auth = fields.Integer(compute="_compute_count_partner_auth")
count_partner_auth = fields.Integer(
compute="_compute_count_partner_auth", compute_sudo=True
)

def _compute_count_partner_auth(self):
data = self.env["fastapi.auth.partner"].read_group(
Expand Down
1 change: 1 addition & 0 deletions fastapi_auth_partner/views/res_partner_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
name="%(fastapi_auth_partner_action)d"
icon="fa-user"
type="action"
groups="fastapi_auth_partner.group_partner_auth_manager"
context="{'search_default_partner_id': active_id}"
>
<field name="count_partner_auth" />
Expand Down

0 comments on commit 947569f

Please sign in to comment.