[MERGE] Sync with website-al
bzr revid: tde@openerp.com-20140124144628-eug8try0jywc7lps
This commit is contained in:
commit
a771127a7e
|
@ -143,7 +143,8 @@ class event_event(osv.osv):
|
|||
def check_registration_limits(self, cr, uid, ids, context=None):
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
if event.event_ticket_ids:
|
||||
event.event_ticket_ids.check_registration_limits_before(0)
|
||||
for ticket in event.event_ticket_ids:
|
||||
ticket.check_registration_limits_before(0)
|
||||
return super(event_event, self).check_registration_limits(cr, uid, ids, context=context)
|
||||
|
||||
|
||||
|
|
|
@ -415,7 +415,7 @@ class Contact(orm.AbstractModel):
|
|||
'options': options
|
||||
}
|
||||
|
||||
html = self.pool["ir.ui.view"].render(cr, uid, "website.contact", val, engine='website.qweb', context=context)
|
||||
html = self.pool["ir.ui.view"].render(cr, uid, "website.contact", val, engine='website.qweb', context=context).decode('utf8')
|
||||
|
||||
return ir_qweb.HTMLSafe(html)
|
||||
|
||||
|
|
|
@ -52,12 +52,13 @@
|
|||
<t t-if="not title">
|
||||
<t t-set="title"><t t-raw="res_company.name"/><t t-if="additional_title"> - <t t-raw="additional_title"/></t></t>
|
||||
</t>
|
||||
<title><t t-esc="title"/></title>
|
||||
<meta name="viewport" content="initial-scale=1"/>
|
||||
<meta name="openerp.company" t-att-value="res_company.name"/>
|
||||
<meta name="description" t-att-value="main_object and 'website_meta_description' in main_object
|
||||
and main_object.website_meta_description or website_meta_description"/>
|
||||
<meta name="keywords" t-att-value="main_object and 'website_meta_keywords' in main_object
|
||||
and main_object.website_meta_keywords or website_meta_keywords"/>
|
||||
<title><t t-esc="title"/></title>
|
||||
|
||||
<!-- Load stylesheets before scripts to avoid blocking -->
|
||||
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
</t>
|
||||
</template>
|
||||
|
||||
<template id="event_right_photos" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Photos">
|
||||
<template id="event_right_photos" inherit_option_id="website_event.index" name="Photos">
|
||||
<xpath expr="//div[@id='right_column']" position="inside">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb16">
|
||||
|
@ -115,7 +115,7 @@
|
|||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="event_right_quotes" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Quotes">
|
||||
<template id="event_right_quotes" inherit_option_id="website_event.index" name="Quotes">
|
||||
<xpath expr="//div[@id='right_column']" position="inside">
|
||||
<div class="row">
|
||||
<div class="col-md-12 mb16">
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
import models
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
'name': 'Website LiveChat',
|
||||
'category': 'Website',
|
||||
'summary': 'Instant Messaging for your Website',
|
||||
'version': '1.0',
|
||||
'description': """
|
||||
OpenERP Website LiveChat
|
||||
========================
|
||||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website', 'im_livechat'],
|
||||
'installable': True,
|
||||
'data': [
|
||||
'views/website_livechat.xml'
|
||||
],
|
||||
'demo': [ ],
|
||||
'js': [],
|
||||
'qweb': [],
|
||||
'css': [],
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
import website
|
|
@ -0,0 +1,8 @@
|
|||
from openerp.osv import osv, fields
|
||||
|
||||
class website(osv.osv):
|
||||
_inherit = "website"
|
||||
|
||||
_columns = {
|
||||
'channel_id': fields.many2one('im_livechat.channel', string="Channel"),
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="website_settings_livechat" model="ir.ui.view">
|
||||
<field name="name">website.form</field>
|
||||
<field name="model">website</field>
|
||||
<field name="inherit_id" ref="website.view_website_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='other']" position='before'>
|
||||
<div name="livechat">
|
||||
<separator string="LiveChat"/>
|
||||
<group name="livechat">
|
||||
<field name="channel_id" widget="many2one"/>
|
||||
</group>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<template id="header" inherit_id="website.layout" name="LiveChat Snippet">
|
||||
<xpath expr="//body" position="inside">
|
||||
<t t-if="website.channel_id">
|
||||
<t t-raw="website.channel_id.script"/>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -32,12 +32,5 @@
|
|||
<field name="html_class">oe_image_full</field>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.section" id="website.section_sales_department">
|
||||
<field name="name">Website</field>
|
||||
<field name="code">Website</field>
|
||||
<field name="alias_name">Website</field>
|
||||
<field name="member_ids" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -145,14 +145,7 @@ class Website(orm.Model):
|
|||
""" Create a new quotation used in the ecommerce (event, sale) """
|
||||
SaleOrder = self.pool.get('sale.order')
|
||||
quotation_values = self._ecommerce_get_quotation_values(cr, uid, context=context)
|
||||
|
||||
section_ids = request.registry["crm.case.section"].search(
|
||||
request.cr, SUPERUSER_ID, [("code", "=", "Website")], context=context)
|
||||
if section_ids:
|
||||
quotation_values['section_id'] = section_ids[0]
|
||||
|
||||
quotation_values['user_id'] = False
|
||||
|
||||
return SaleOrder.create(cr, SUPERUSER_ID, quotation_values, context=context)
|
||||
|
||||
def ecommerce_get_new_order(self, cr, uid, context=None):
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
'name': 'E-Commerce with CRM',
|
||||
'version': '0.1',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website_sale', 'sale_crm'],
|
||||
'data': [
|
||||
'data/website_sale_crm.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': True
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="crm.case.section" id="website.section_sales_department">
|
||||
<field name="name">Website</field>
|
||||
<field name="code">Website</field>
|
||||
<field name="alias_name">Website</field>
|
||||
<field name="member_ids" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1 @@
|
|||
import website
|
|
@ -0,0 +1,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from openerp.osv import orm
|
||||
from openerp import SUPERUSER_ID
|
||||
|
||||
|
||||
class Website(orm.Model):
|
||||
_inherit = 'website'
|
||||
|
||||
def _ecommerce_create_quotation(self, cr, uid, context=None):
|
||||
order_id = super(Website, self)._ecommerce_create_quotation(cr, uid, context=context)
|
||||
section_ids = self.pool["crm.case.section"].search(cr, SUPERUSER_ID, [("code", "=", "Website")], context=context)
|
||||
if section_ids:
|
||||
self.pool["sale.order"].write(cr, SUPERUSER_ID, {'section_id': section_ids[0]}, context=context)
|
||||
return order_id
|
Loading…
Reference in New Issue