Example #1
0
 def partners_ref(self, partner_id, **post):
     partner = request.registry['res.partner'].browse(request.cr, SUPERUSER_ID, partner_id, context=request.context)
     values = website_partner.get_partner_template_value(partner)
     if not values:
         return self.members(**post)
     values['main_object'] = values['partner']
     return request.website.render("website_membership.partner", values)
Example #2
0
    def customer(self, partner_id, **post):
        partner = request.registry['res.partner'].browse(
            request.cr, SUPERUSER_ID, partner_id, context=request.context)
        values = website_partner.get_partner_template_value(partner)
        if not values:
            return self.customers(**post)

        partner_obj = request.registry['res.partner']
        if values['partner_data'].get('assigned_partner_id', None):
            values['assigned_partner_data'] = partner_obj.read(
                request.cr,
                openerp.SUPERUSER_ID,
                [values['partner_data']['assigned_partner_id'][0]],
                request.website.get_partner_white_list_fields(),
                context=request.context)[0]
        if values['partner_data'].get('implemented_partner_ids', None):
            implemented_partners_data = partner_obj.read(
                request.cr,
                openerp.SUPERUSER_ID,
                values['partner_data']['implemented_partner_ids'],
                request.website.get_partner_white_list_fields(),
                context=request.context)
            values['implemented_partners_data'] = []
            for data in implemented_partners_data:
                if data.get('website_published'):
                    values['implemented_partners_data'].append(data)

        values['main_object'] = values['partner']
        return request.website.render("website_customer.details", values)
Example #3
0
 def partners_ref(self, partner_id, **post):
     partner = request.registry["res.partner"].browse(request.cr, SUPERUSER_ID, partner_id, context=request.context)
     values = website_partner.get_partner_template_value(partner)
     if not values:
         return self.partners(**post)
     values["main_object"] = values["partner"]
     return request.website.render("website_crm_partner_assign.partner", values)
Example #4
0
 def partners_ref(self, partner_id, **post):
     partner = request.registry['res.partner'].browse(request.cr, SUPERUSER_ID, partner_id, context=request.context)
     values = website_partner.get_partner_template_value(partner)
     if not values:
         return self.partners(**post)
     values['main_object'] = values['partner']
     return request.website.render("website_crm_partner_assign.partner", values)
Example #5
0
    def customer(self, partner_id, **post):
        partner = request.registry['res.partner'].browse(request.cr, SUPERUSER_ID, partner_id, context=request.context)
        values = website_partner.get_partner_template_value(partner)
        if not values:
            return self.customers(**post)

        partner_obj = request.registry['res.partner']
        if values['partner_data'].get('assigned_partner_id', None):
            values['assigned_partner_data'] = partner_obj.read(
                request.cr, openerp.SUPERUSER_ID, [values['partner_data']['assigned_partner_id'][0]],
                request.website.get_partner_white_list_fields(), context=request.context)[0]
        if values['partner_data'].get('implemented_partner_ids', None):
            implemented_partners_data = partner_obj.read(
                request.cr, openerp.SUPERUSER_ID, values['partner_data']['implemented_partner_ids'],
                request.website.get_partner_white_list_fields(), context=request.context)
            values['implemented_partners_data'] = []
            for data in implemented_partners_data:
                if data.get('website_published'):
                    values['implemented_partners_data'].append(data)

        values['main_object'] = values['partner']
        return request.website.render("website_customer.details", values)