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.

17 lines
560 B

4 years ago
4 years ago
  1. # Copyright 2018 Rémy Taymans <remytaymans@gmail.com>
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo.http import request
  4. from odoo.addons.portal.controllers.portal import CustomerPortal
  5. class EaterWebsiteAccount(CustomerPortal):
  6. def _prepare_portal_layout_values(self):
  7. values = super(
  8. EaterWebsiteAccount, self
  9. )._prepare_portal_layout_values()
  10. partner = request.env.user.partner_id.commercial_partner_id
  11. values.update({"eaters": partner.child_eater_ids})
  12. return values