Skip to Content
Menu
This question has been flagged
1 Reply
1058 Views
i'm unable to open portal side and have the below error.

TypeError: _prepare_home_portal_values() takes 1 positional argument but 2 were given


Thanks in Advance

Avatar
Discard
Best Answer

Hi the _prepare_home_portal_values method in Odoo13 doesn't have only self argument but in Odoo 15 it has two self and counters.

See the example for Odoo Code:

def _prepare_home_portal_values(self, counters):
values = super()._prepare_home_portal_values(counters)
if 'lead_count' in counters:
values['lead_count'] = request.env['crm.lead'].search_count(self.get_domain_my_lead(request.env.user))
if 'opp_count' in counters:
values['opp_count'] = request.env['crm.lead'].search_count(self.get_domain_my_opp(request.env.user))
return values


Avatar
Discard
Author

Thank You Waleed Mohsen. You saved my time

Related Posts Replies Views Activity
2
Dec 24
3115
1
Dec 24
343
4
Nov 24
1362
1
Sep 24
1132
1
Sep 24
1198