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.

21 lines
626 B

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