[IMP] website_crm

bzr revid: chm@openerp.com-20130702160331-krybw8b3qkxdhzsj
This commit is contained in:
Christophe Matthieu 2013-07-02 18:03:31 +02:00
parent 42f1bdbd87
commit 00caad1d8c
5 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1 @@
import controllers

View File

@ -0,0 +1,19 @@
{
'name': 'E-Commerce',
'category': 'Sale',
'version': '1.0',
'description': """
OpenERP E-Commerce
==================
""",
'author': 'OpenERP SA',
'depends': ['website', 'crm'],
'installable': True,
'auto_install': True,
'data': [
'views/website_crm.xml'
],
'js': ['static/src/js/ecommerce.js'],
'css': ['static/src/css/ecommerce.css'],
}

View File

@ -0,0 +1,3 @@
import main
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
import openerp
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.controllers.main import template_values
class contactus(http.Controller):
@http.route(['/crm/contactus'], type='http', auth="db")
def contactus(self, *arg, **kwarg):
values = template_values()
cr = request.cr
uid = request.session._uid or openerp.SUPERUSER_ID
html = request.registry.get("ir.ui.view").render(cr, uid, "website_crm.contactus", self.get_values())
return html
# vim:expandtab:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="contactus" model="ir.ui.view">
<field name="name">contactus</field>
<field name="type">qweb</field>
<field name="inherit_id" ref="website.contactus"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='span8']" position="inside">
<form action="/crm/contactus" method="post">
<input name="name" required="True" placeholder="Name..."/><br/>
<input name="phone" type="tel" required="True" placeholder="Phone number..."/><br/>
<input name="email" type="email" required="True" placeholder="Email..."/>
<textarea name="description" placeholder="Enter your comment..."> </textarea>
<button>Send message</button>
</form>
</xpath>
</field>
</record>
</data>
</openerp>