Browse Source

event

dev-rcn
root 3 years ago
parent
commit
7008afdde0
4 changed files with 6 additions and 44 deletions
  1. +1
    -1
      controllers/__init__.py
  2. +0
    -40
      controllers/website_event.py
  3. +1
    -1
      models/partner.py
  4. +4
    -2
      views/contactus.xml

+ 1
- 1
controllers/__init__.py View File

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
from . import website_event
from . import kalachakra

+ 0
- 40
controllers/website_event.py View File

@ -1,40 +0,0 @@
# -*- coding: utf-8 -*-
from odoo import http
from odoo.http import request
import werkzeug
from odoo.tools import format_datetime, format_date, is_html_empty
from odoo.exceptions import UserError
from odoo.addons.website_event.controllers.main import WebsiteEventController
class kalachakra_event(WebsiteEventController):
def _extract_searched_event_tags(self, searches):
tags = request.env['event.tag']
if searches.get('tags'):
tags = request.env['event.tag'].search([('name', '=', searches['tags'])])
return tags
@http.route(['/event/calendar'], type='http', auth='public', website=True, sitemap=False,csrf=False)
def eventCalendar(self,**post):
url='https://calendar.google.com/calendar/embed?height=600&wkst=2&bgcolor=%23ffffff&ctz=Europe%2FParis&mode=WEEK&src=aXRrYWxhY2hha3JhQGdtYWlsLmNvbQ&src=bjYxODA1OXQ2dmRwNmp0Y3Foa3FjMTMwdWtAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=MnJzc2VvY3MzcGNiaDliaGFvNXZ1a3JpM3NAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=cGJ0YjBtbTBja2NsMDZmdTNvb2ViMDJpOXNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=ZnIuZnJlbmNoI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t&color=%23039BE5&color=%238E24AA&color=%23E4C441&color=%237CB342&color=%230B8043" style="border:solid 1px #777" width="800" height="600" frameborder="0" scrolling="no"'
#url='https://calendar.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23ffffff&ctz=Europe%2FParis&src=cmF5bmFsZC5jYW5kZWxpZXJAZ21haWwuY29t&src=Z3I4aGdpbm5hYjNwZ2ExY3M4MTAxczVlcjhAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&src=ZnIuZnJlbmNoI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t&color=%23039BE5&color=%23D50000&color=%237986CB'
return http.request.render('kalachakra.event_calendar',{'url':url})
@http.route(['/event/calendartui'], type='http', auth='public', website=True, sitemap=False,csrf=False)
def eventCalendartui(self,**post):
return http.request.render('kalachakra.event_calendartui')
@http.route(['/kalachakra/contactus'], type='http', auth='public', website=True, sitemap=False,csrf=False)
def kalachakracontactus(self,**post):
return http.request.render('kalachakra.contactus')
@http.route(['/kalachakra/programme'], type='http', auth='public', website=True, sitemap=False,csrf=False)
def kalachakracontactus(self,**post):
return http.request.redirect('https://www.dropbox.com/s/ijsd6n82oyp0gw8/programme_Paris.pdf?dl=0')

+ 1
- 1
models/partner.py View File

@ -8,7 +8,7 @@ from werkzeug import utils
class partner(models.Model):
_inherit = 'res.partner'
external_id=fields.Char('id')
statut_contact=fields.Selection([('adherent', 'Adhérent'), ('bienfaiteur', 'Bienfaiteur'),('contact', 'Contact'), ('soutien','Soutien') ],'Statut', required=True, index=True)
statut_contact=fields.Selection([('adherent', 'Adhérent'), ('bienfaiteur', 'Bienfaiteur'),('contact', 'Contact'), ('soutien','Soutien') ],'Statut', index=True)
date_creation_contact=fields.Char(string='Date de création du contact', readonly=True)
origine=fields.Selection([
('boutique','Boutique'),


+ 4
- 2
views/contactus.xml View File

@ -5,12 +5,14 @@
<t t-call="website.layout">
<div class="oe_structure">
<div class="container">
<h1>coucou</h1>
</div>
</div>
<div style="overflow:hidden;width: 700px;position: relative;">
<iframe width="700" height="440" src="https://maps.google.com/maps?width=700&amp;height=440&amp;hl=en&amp;q=5%20passage%20delessert%2075010%20paris+(Titre)&amp;ie=UTF8&amp;t=&amp;z=13&amp;iwloc=B&amp;output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe><div style="position: absolute;width: 80%;bottom: 10px;left: 0;right: 0;margin-left: auto;margin-right: auto;color: #000;text-align: center;">
</div><style>#gmap_canvas img{max-width:none!important;background:none!important}</style></div>
</div><style>#gmap_canvass img{max-width:none!important;background:none!important}</style></div>
</t>
</template>


Loading…
Cancel
Save