[IMP]: flow of create a quote template, and design of tempalte

bzr revid: aja@tinyerp.com-20131206104339-rt9q45g8p4ja3hnf
This commit is contained in:
ajay javiya (OpenERP)
2013-12-06 16:13:39 +05:30
parent 3e5ae00690
commit dbc1dd4ac5
6 changed files with 684 additions and 299 deletions
+1
View File
@@ -16,6 +16,7 @@ OpenERP Sale Quote Roller
'sale_quote_data.xml'
],
'demo': [
'sale_quote_demo.xml'
],
'qweb': ['static/src/xml/*.xml'],
'installable': True,
+11 -11
View File
@@ -13,31 +13,31 @@ from openerp.addons.website.models import website
class sale_quote(http.Controller):
def get_quote(self, token):
quote_pool = request.registry.get('sale.quote')
quote_id = quote_pool.search(request.cr, SUPERUSER_ID, [('access_token', '=', token)], context=request.context)
return quote_id
order_pool = request.registry.get('sale.order')
order_id = order_pool.search(request.cr, SUPERUSER_ID, [('access_token', '=', token)], context=request.context)
return order_id
@website.route(['/quote/<token>'], type='http', auth="public")
def view(self, token=None, **post):
values = {}
# http://hostname:8069/quote?id=
quote_pool = request.registry.get('sale.quote')
quotation = quote_pool.browse(request.cr, SUPERUSER_ID, self.get_quote(token))[0]
order_pool = request.registry.get('sale.order')
quotation = order_pool.browse(request.cr, SUPERUSER_ID, self.get_quote(token))[0]
render_template = 'website_sale_quote.so_quotation'
values.update({
'quotation' : quotation,
})
return request.website.render('website_sale_quote.quotation', values)
return request.website.render(render_template, values)
@website.route(['/quote/<token>/accept'], type='http', auth="public")
def accept(self, token=None , **post):
values = {}
quotation = request.registry.get('sale.quote').write(request.cr, SUPERUSER_ID, self.get_quote(token), {'state': 'accept'})
quotation = request.registry.get('sale.order').write(request.cr, SUPERUSER_ID, self.get_quote(token), {'state': 'manual'})
return request.redirect("/quote/%s" % token)
@website.route(['/quote/<token>/decline'], type='http', auth="public")
def decline(self, token=None , **post):
values = {}
quotation = request.registry.get('sale.quote').write(request.cr, SUPERUSER_ID, self.get_quote(token), {'state': 'cancel'})
quotation = request.registry.get('sale.order').write(request.cr, SUPERUSER_ID, self.get_quote(token), {'state': 'cancel'})
return request.redirect("/quote/%s" % token)
@website.route(['/quote/<token>/post'], type='http', auth="public")
@@ -46,7 +46,7 @@ class sale_quote(http.Controller):
if post.get('new_message'):
request.session.body = post.get('new_message')
if 'body' in request.session and request.session.body:
request.registry.get('sale.quote').message_post(request.cr, SUPERUSER_ID, self.get_quote(token),
request.registry.get('sale.order').message_post(request.cr, SUPERUSER_ID, self.get_quote(token),
body=request.session.body,
type='comment',
subtype='mt_comment',
+53 -67
View File
@@ -23,22 +23,29 @@ from openerp.osv import osv, fields
import hashlib
import time
class sale_quote(osv.Model):
_name = "sale.quote"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_description = "Sales Quotations"
class sale_order_line(osv.osv):
_inherit = "sale.order.line"
_description = "Sales Order Line"
_columns = {
# 'template_id': fields.many2one('ir.ui.view', 'Template'),
'order_id': fields.many2one('sale.order', 'Order', required=True),
'state': fields.selection([
('draft', 'Draft Quotation'),
('sent', 'Quotation Sent'),
('accept', 'Accept'),
('cancel', 'Cancelled'),
('done', 'Done'),
], 'Status'),
'to_email': fields.char('Customers Email'),
'access_token':fields.char('Quotation Token', size=256),
'website_description':fields.html('Line Description'),
}
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,uom=False, qty_uos=0, uos=False, name='', partner_id=False,lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, context=None):
res = super(sale_order_line, self).product_id_change(cr, uid, ids, pricelist, product, qty,uom, qty_uos, uos, name, partner_id,lang, update_tax, date_order, packaging, fiscal_position, flag, context)
if product:
desc = self.pool.get('product.product').browse(cr, uid, product, context).website_description
res.get('value').update({'website_description': desc})
print res
return res
class sale_order(osv.osv):
_inherit = 'sale.order'
_columns = {
'quote_url': fields.char('URL'),
'access_token':fields.char('Quotation Token', size=256),
'template_id': fields.many2one('sale.order','Quote Template'),
'website_description': fields.html('Description'),
'is_template': fields.boolean('Is Template'),
}
def new_quotation_token(self, cr, uid, record_id):
@@ -47,56 +54,34 @@ class sale_quote(osv.Model):
return self.write(cr, uid, [record_id],{'access_token': quotation_token} )
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
new_id = super(sale_quote, self).create(cr, uid, vals, context=context)
new_id = super(sale_order, self).create(cr, uid, vals, context=context)
self.new_quotation_token(cr, uid, new_id)
return new_id
class sale_order(osv.osv):
_inherit = 'sale.order'
_columns = {
'quote_url': fields.char('URL'),
}
# def action_quotation_send(self, cr, uid, ids, context=None):
# '''
# This function opens a window to compose an email, with the edi sale template message loaded by default
# '''
# data_pool = self.pool.get('ir.model.data')
# sale_quote = self.pool.get('sale.quote')
# try:
# compose_form_id = data_pool.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')[1]
# except ValueError:
# compose_form_id = False
# model,template_id = data_pool.get_object_reference(cr, uid, 'website_sale_quote', "email_template_sale_quote")
# ctx = dict(context)
# for order in self.browse(cr, uid, ids, context):
# if not order.quote_id:
# new_id = sale_quote.create(cr, uid,{
# 'state' : 'draft',
# 'to_email': order.partner_id.email,
# })
# self.write(cr, uid, [order.id] ,{'quote_id': new_id}, context)
# ctx.update({
# 'default_model': 'sale.order',
# 'default_res_id': order.id,
# 'default_use_template': bool(template_id),
# 'default_template_id': template_id,
# 'default_composition_mode': 'comment',
# 'mark_so_as_sent': True
# })
# return {
# 'type': 'ir.actions.act_window',
# 'view_type': 'form',
# 'view_mode': 'form',
# 'res_model': 'mail.compose.message',
# 'views': [(compose_form_id, 'form')],
# 'view_id': compose_form_id,
# 'target': 'new',
# 'context': ctx,
# }
def write(self, cr, uid, ids, vals, context=None):
template_id = vals.get('template_id', False)
lines = []
line_pool = self.pool.get('sale.order.line')
if template_id:
order_template = self.browse(cr, uid, template_id, context)
for line in order_template.order_line:
line_pool.create(cr, uid,{
'name': line.name,
'sequence': line.sequence,
'order_id': ids[0],
'price_unit': line.price_unit,
'product_uom_qty': line.product_uom_qty,
'discount': line.discount,
'product_id': line.product_id.id,
'tax_id': [(6, 0, [x.id for x in line.tax_id])],
'website_description':line.website_description,
}, context=context)
vals.update({
'quote_url': self.get_signup_url(cr, uid, ids, context),
'website_description': order_template.website_description,
})
res = super(sale_order, self).write(cr, uid, ids, vals, context=context)
return res
def action_quotation_send(self, cr, uid, ids, context=None):
quote = super(sale_order, self).action_quotation_send(cr, uid,ids, context)
@@ -114,8 +99,9 @@ class sale_order(osv.osv):
def get_signup_url(self, cr, uid, ids, context=None):
url = False
quote_id = self.pool.get('sale.quote').search(cr, uid, [('order_id','=', ids[0])], context=context)
for quote in self.pool.get('sale.quote').browse(cr, uid, quote_id, context=context):
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context)
url = "%s/quote/%s" % (base_url, quote.access_token)
order = self.browse(cr, uid, ids, context=context)[0]
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url', default='http://localhost:8069', context=context)
url = "%s/quote/%s" % (base_url, order.access_token)
return url
@@ -0,0 +1,431 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="website_sale_order_1" model="sale.order">
<field name="partner_id" ref="base.res_partner_2"/>
<field name="partner_invoice_id" ref="base.res_partner_2"/>
<field name="partner_shipping_id" ref="base.res_partner_2"/>
<field name="user_id" ref="base.user_demo"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="is_template" eval="True"/>
<field name="website_description" type="html">
<section id="introduction" class="tab-pane active oe_section jumbotron">
<div class="container panel panel-default">
<div class="row panel-body">
<div class="text-center">
<h2><strong>Want to start selling OpenERP to your customers?</strong></h2>
<h3><small>Join our partner network</small></h3>
<div class="col-md-7 mt16">
<p class="lead">Get all you need to grow your business and deliver quality services with the OpenERP Partner Program. It includes discounts on OpenERP Enterprise, technical and functional trainings, support services, marketing documents, access to the partner portal, rights to use the trademark and much more.</p>
</div>
<div class="col-md-3">
<img class="media-object" src="https://www.openerp.com/openerp_enterprise/static/img/openerp_gold_partner.png"/>
</div>
</div>
</div>
<div class="row">
<div class="text-center">
<h2><strong>Why should you become a partner?</strong></h2>
<h3><small>Enjoy building a business based on happy customers</small></h3>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">A Valuable Product</h3>
</div>
<div class="panel-body">
<h4><small>Have strong value added services as you can rely on 3000 existing modules to deliver what the customer needs in a short period of time. Grow with your existing customer base by continuously proposing new modules.</small></h4>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">A Strong Demand</h3>
</div>
<div class="panel-body">
<h4><small>Enjoy the traction of the fastest growing management software in the world. Benefit from the growing customer demand and the OpenERP brand.</small></h4>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">High Margins</h3>
</div>
<div class="panel-body">
<h4><small>Grow by developing a recurring revenue stream from OpenERP Enterprise's commission system. Get high billing rates as you deliver a highly valuable software.</small></h4>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="benifit" class="tab-pane oe_section jumbotron">
<div class="container panel panel-default">
<div class="row panel-body">
<div class="text-center">
<h2><strong>Get Big discounts on OpenERP Enterprise</strong></h2>
<h3><small>Grow through recurring revenue streams from your customer base</small></h3>
</div>
<div class="col-md-8 col-md-offset-4 mb32 text-center">
<img class="img img-responsive" src="https://www.openerp.com/openerp_enterprise/static/img/partner_icon_01.png"/>
</div>
<div class="col-md-8 col-md-offset-2 mb32 text-center">
<p>
As a partner, you get a big discount on OpenERP Enterprise.
This allows you to offer reduced prices to your customers and/or
to benefit from a commission on every subscription you sell to your customers.
</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Benefit From A Dedicated Account Manager</strong></h2>
<h3><small>Our role is to help you succeed</small></h3>
</div>
<div class="col-md-5 col-md-offset-1 mt32 mb16">
<img class="img img-responsive" src="https://www.openerp.com/openerp_enterprise/static/img/partner_icon_02.png"/>
</div>
<div class="col-md-5">
<p>A dedicated account manager is assigned to every partner to help develop the OpenERP business. The account manager helps you get leads, close deals, gives you feedback and best practices, delivers sales training and is a direct point of contact for any request you may have.</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Get access to our consultants and technical experts</strong></h2>
<h3><small>Get access to experts for an extra fee</small></h3>
<p>For an extra fee, partners can get access to OpenERP's core developers and functional experts. This can help you succeed in delivering more complex or bigger projects by getting the support of highly experienced consultants on demand.</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Get recognition as an official certified partner</strong></h2>
<h3><small>We give you visibility in our official partner list</small></h3>
<p>OpenERP promotes its partners through various ways: publication on our website, official communication, publication of your success stories, etc. As soon as you become an OpenERP partner and have followed the official trainings, you will be visible on the partner directory listing.</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Access to the Lead Generation Program</strong></h2>
<h3><small>We give you visibility in our official partner list</small></h3>
<p>Every year, we redirect more than 100,000 customer requests to our official partners. These are prospects that filled a form on the OpenERP website and wanted to use OpenERP. The right partner to fulfill the customer request is selected based on the customer localization (nearest partner) and the grade of the partner..</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Benefit from the OpenERP branding</strong></h2>
<h3><small>Get rights to use the OpenERP trademark</small></h3>
<p>Every year, we redirect more than 100,000 customer requests to our official partners. These are prospects that filled a form on the OpenERP website and wanted to use OpenERP. The right partner to fulfill the customer request is selected based on the customer localization (nearest partner) and the grade of the partner..</p>
</div>
</div>
</div>
</section>
<section id="training" class="tab-pane oe_section jumbotron">
<div class="container panel panel-default">
<div class="row panel-body">
<div class="text-center">
<h2><strong>Get Trained on OpenERP</strong></h2>
<h3><small>Technical training, functional training and sales training</small></h3>
<p>Customers need qualified partners. That's why being trained and certified is a requirement to become an official partner. When you start as a partner, you are free to choose from the following training sessions:</p>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">The Technical Training</h3>
</div>
<div class="panel-body">
<h4><small>Learn how to develop custom modules, including the development of new business objects, customization of screens, the design of new reports, the adaption of workflows and automated interfaceing with other programs or websites. (5 days)</small></h4>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">The Functional Training</h3>
</div>
<div class="panel-body">
<h4><small>Learn how to configure and customize OpenERP, all from within the software itself - no coding required. The main applications are covered by this 5-day training are: Sales, Project Management, Accounting, Inventory, Manufacturing Resource Planning and Human Resources. (5 days)</small></h4>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">The Sales Training</h3>
</div>
<div class="panel-body">
<h4><small>This online training is designed specifically for salespeople and presales employees who will be given an introduction course on OpenERP key features and how to present it's unique selling propositions to a potential customer.</small></h4>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Get access to online training materials</strong></h2>
<h3><small>Train yourself on every new release using online videosGet rights to use the OpenERP trademark</small></h3>
<p>Each partner gets access to our training videos which are available in the partner portal. The training material is updated for every new version of OpenERP. Special training sessions are organised to keep partners up to date for each new version of OpenERP.</p>
</div>
</div>
</div>
</section>
<section id="services" class="tab-pane active oe_section jumbotron">
<div class="container panel panel-default">
<div class="row panel-body">
<div class="text-center">
<h2><strong>Get access to our functional support services</strong></h2>
<h3><small>Don't be stuck on your implementation project, we can help you.</small></h3>
<p>As you go through your first implementation of an OpenERP system it is normal to need some support. We are here to answer your questions regarding the functionality of the software, or how to configure the solution. Each partner is entitled to a certain number of support hours thanks to his or her partner program.</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Get technical support services</strong></h2>
<h3><small>We help your developers with bugs or support questions</small></h3>
<p>Each partner gets access to our training videos which are available in the partner portal. The training material is updated for every new version of OpenERP. Special training sessions are organised to keep partners up to date for each new version of OpenERP.</p>
</div>
<div class="col-md-8 col-md-offset-4 mb32 text-center">
<img class="img img-responsive" src="https://www.openerp.com/openerp_enterprise/static/img/partner_icon_04.png"/>
</div>
<div class="col-md-8 col-md-offset-2 mb32 text-center">
<p>The OpenERP Support Team is 100% dedicated to helping our customers. You can contact the Support Team for any functional or technical questions and issues with regard to OpenERP development. They can help you develop custom modules.</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-12 text-center">
<h2><strong>Test all your developments automatically</strong></h2>
<h3><small>Your dedicated test integration platform</small></h3>
</div>
<div class="col-md-5 col-md-offset-1 mt32 mb16">
<img class="img img-responsive" src="https://www.openerp.com/openerp_enterprise/static/img/partner_sc_01.png"/>
</div>
<div class="col-md-5">
<p>Save time in your implementation project by having your developments tested automatically by our automated test servers. At every code commit, you get a full OpenERP instance that you can try out online. When this instance is deployed, your code is automatically put through our 2000+ automated unit tests.
Our automated testing server software is called Runbot, and you can try it out here: http://runbot.openerp.com. A dedicated runbot server is available for every partner.</p>
</div>
</div>
</div>
</section>
<section id="whatsuit" class="tab-pane active oe_section jumbotron">
<div class="container panel panel-default">
<div class="row panel-body">
<div class="text-center">
<h2><strong>Get The Partnership Level That Suits You</strong></h2>
<p>The OpenERP eco system is designed to ensure that OpenERP’s users will enjoy the best customer experience with our products. The community brings a wealth of new functionality.
OpenERP as a software publisher is committed to continuously improving the quality of the software. Our local partners provide integration and support services.</p>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Ready Partners</h3>
</div>
<div class="panel-body">
<h3><small>The Ready membership level enables Partners to start and grow their OpenERP competencies. They benefit from a comprehensive set of services including training, support and access to leads which allow them to build their business at their own pace.
Ready partners also have a minimum of 1 certified OpenERP Functional Specialist on the latest OpenERP version (enforced starting Q3 2014)</small></h3>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Silver Partners</h3>
</div>
<div class="panel-body">
<h3><small>Partners which have qualified for the Silver Partner level are experienced in implementing OpenERP projects. Silver partners enjoy enhanced benefits as well as access to additional resources to support the growth of their business with OpenERP.
Silver partners also have a minimum of 2 certified OpenERP Functional Specialists on the latest OpenERP version (enforced starting Q3 2014)</small></h3>
</div>
</div>
</div>
<div class="col-md-4">
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">Gold Partners</h3>
</div>
<div class="panel-body">
<h3><small>Gold partners have a strategic relationship with OpenERP. OpenERP is at the core of their strategy. They have committed significant resources to develop and deploy OpenERP solutions. They benefit from the highest visibility in the OpenERP ecosystem.
Gold partners also have a minimum of 3 certified OpenERP Functional Specialists on the latest OpenERP version (enforced starting Q3 2014)</small></h3>
</div>
</div>
</div>
</div>
</div>
</section>
</field>
</record>
<record id="website_sale_order_line_1" model="sale.order.line">
<field name="order_id" ref="website_sale_order_1"/>
<field name="name">Gold Partner</field>
<field name="product_id" ref="product.product_product_4"/>
<field name="product_uom_qty">1</field>
<field name="product_uos_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">12950.00</field>
<field name="website_description" type="html">
<section data-snippet-id="text-image" class="mt16 mb16 oe_dark">
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-1 mt64">
<h3>Why you'll love an iPad.</h3>
<p>
Right from the start, there’s a lot to love about
iPad. It’s simple yet powerful. Thin and light yet
full-featured. It can do just about everything and
be just about anything.
</p><p>
And because it’s so easy to use, it’s easy to love.
</p>
</div>
<div class="col-md-5 mt16 mb16">
<img class="img img-responsive" src="/website_sale/static/src/img/ipad_why.png"/>
</div>
</div>
</div>
</section>
<section data-snippet-id="image-text" class="mt16">
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-1">
<img class="img img-responsive" src="/website_sale/static/src/img/ipad_experience.png"/>
</div>
<div class="col-md-6 mt64">
<h3>The full iPad experience.</h3>
<h4 class="small">There is less of it, but no less to it.</h4>
<p>
Everything you love about iPad — the beautiful
screen, fast and fluid performance, FaceTime and
iSight cameras, thousands of amazing apps, 10-hour
battery life* — is everything you’ll love about
iPad mini, too. And you can hold it in one hand.
</p>
</div>
</div>
</div>
</section>
</field>
</record>
<record id="website_sale_order_line_2" model="sale.order.line">
<field name="order_id" ref="website_sale_order_1"/>
<field name="name">Functional Training</field>
<field name="product_id" ref="product.product_product_5"/>
<field name="product_uom_qty">1</field>
<field name="product_uos_qty">1</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">00.00</field>
<field name="website_description" type="html">
<section data-snippet-id="text-image" class="mt16 mb16">
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-1 mt32">
<h3>Bose Mini Bluetooth Speaker.</h3>
<p>
The Bose® SoundLink® mini is Bose's smallest portable Bluetooth speaker. Its ultra-compact size fits in the
palm of your hand, yet gives you full, natural sound wirelessly from your iPhone, iPad, or iPod. Grab it and go
full-featured. It can do just about everything and
experience music just about anywhere.
</p>
<div class="panel panel-default mt48" data-snippet-id="panel">
<div class="panel-heading">
<h3 class="panel-title">Characteristics</h3>
</div>
<div class="panel-body">
<ul>
<li>Sleek, compact design</li>
<li>Efficient, high-quality audio</li>
<li>Remote control for power, volume, track seek</li>
<li>Auxiliary input for portable devices</li>
<li>Universal iPod docking station fits most iPod/iPhone models</li>
<li>Charges iPod/iPhone</li>
<li>Volume control on main system</li>
</ul>
</div>
</div>
</div>
<div class="col-md-4 mt16 mb16 col-md-offset1">
<img class="img img-responsive" src="/website_sale/static/src/img/play_where_you_play.jpg"/>
</div>
</div>
</div>
</section>
<section data-snippet-id="text-image" class="mt16 mb16 oe_dark">
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-1 mt16">
<h2>Plays where you play</h2>
<p>
The SoundLink® Mini speaker is small and light enough
to tuck into your bag. It weighs in at just 1.5 pounds.
Its low profile lets you place it almost anywhere and
provides a low center of gravity that makes it nearly
impossible to tip over.
</p>
<p>
The rechargeable lithium-ion battery delivers up to seven hours of playtime.
And at home, you can listen even longer—the charging cradle lets
you listen while it charges.
</p>
</div>
<div class="col-md-5 col-md-offset-1 mt32">
<img class="img img-responsive" src="/website_sale/static/src/img/more_features.png"/>
</div>
<div class="col-md-5 col-md-offset-4 text-center mb16 mt16">
<h3>Bluetooth connectivity</h3>
<p>
The speaker has a range of about 30 feet, so you can enjoy
the sound you want without wires. It pairs easily with your
smartphone, iPad® or other Bluetooth device.
And it remembers the most recent six devices you've used,
so reconnecting is even simpler.
</p>
</div>
</div>
</div>
</section>
<section data-snippet-id="text-image" class="mt16 mb16">
<div class="container">
<div class="row">
<div class="col-md-5 col-md-offset-1 mt32 mb16">
<img class="img img-responsive" src="/website_sale/static/src/img/bluetooth.jpg"/>
</div>
<div class="col-md-5 mt16">
<h2>More features.</h2>
<p>
Charging cradle recharges the battery and serves as a convenient
home base for your speaker, and it lets you play while it charges.
</p>
<p>
Wall charger can be plugged into the cradle or directly into the speaker
</p>
<p>
Auxiliary port lets you connect other audio sources, like an MP3 player
</p>
<p>
USB port allows for software update to ensure ongoing Bluetooth device compatibility
</p>
<p>
Soft covers are available separately in blue, green or orange. Pick a color to match your style.
</p>
</div>
</div>
</div>
</section>
</field>
</record>
<record id="sale_order_2" model="sale.order">
<field name="partner_id" ref="base.res_partner_7"/>
<field name="partner_invoice_id" ref="base.res_partner_address_13"/>
<field name="partner_shipping_id" ref="base.res_partner_address_13"/>
<field name="user_id" ref="base.user_root"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="order_policy">manual</field>
</record>
</data>
</openerp>
+20 -10
View File
@@ -1,17 +1,27 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Add payment options to sale.order and invoice forms -->
<record model="ir.ui.view" id="sale_order_form_quote">
<field name="name">sale.order.form.payment</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<notebook version="7.0" position="before">
<field name="quote_url"/>
</notebook>
</field>
<field name="name">sale.order.form.payment</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="after">
<div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('quote_url', '=', False)]}">
<field name="quote_url" widget="url"/>
</div>
</xpath>
<xpath expr="//field[@name='client_order_ref']" position="after">
<field name="is_template"/>
<field name="template_id" domain ="[('is_template','=',True)]" attrs="{'invisible': [('is_template', '=', True )]}"/>
</xpath>
<xpath expr="//notebook" position="inside">
<page string="Introduction">
<field name="website_description"/>
</page>
</xpath>
</field>
</record>
</data>
</openerp>
@@ -91,232 +91,189 @@
</body>
</html>
</template>
<template id="quotation" name="Your Quotation">
<t t-call="website_sale_quote.static_layout">
<div class="col-xs-12 col-md-8 tab-content">
<section id="main" class="tab-pane active oe_section">
<div class="container panel panel-default">
<div class="row panel-body">
<div class="text-center">
<h1>What does Quickstart cover ?</h1>
</div>
<div>
<p class="lead"><small>1. The OpenERP Enterprise Contract (1 year coverage): unlimited bugfix, security alerts, migration</small></p>
<p class="lead"><small>2. The “Get on Board” Hands-on Training (choice between our core modules)</small></p>
<p class="lead"><small>3. On-site consulting (minimum 2 days)</small></p>
</div>
<div class="text-center">
<h1>How does it work?</h1>
</div>
<div>
<p class="lead"><small>1. OpenERP qualifies your main business needs</small></p>
<p class="lead"><small>2. You get a tailored demo</small></p>
<p class="lead"><small>3. We train you on your chosen module
</small></p>
<p class="lead"><small>4. We deploy your chosen module with a dedicated functional consultant</small></p>
<p class="lead"><small>5. We get you involved in the deployment of OpenERP in your company</small></p>
</div>
<p class="lead">
<small>
The QuickStart offer simply enables any SME to start using OpenERP in just a few days. Since we launched this approach, we already deployed 50 customers in production. <a href="http://v6.openerp.com/node/1390">Check out some of the <strong>testimonials</strong>!</a>
</small>
<template id="pricing" name="Quotation Pricing">
<section id="quote" class="tab-pane oe_section">
<div class="well">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6">
<address>
<strong t-field="quotation.partner_id.name"/>
<br/>
<t t-esc="quotation.partner_id.street"/>
<br/>
<t t-esc="quotation.partner_id.city"/>, <t t-esc="quotation.partner_id.state_id.name"/> <t t-esc="quotation.partner_id.zip"/>
<br/>
<abbr title="Phone">P:</abbr> <t t-esc="quotation.partner_id.phone"/>
</address>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 text-right">
<p>
<em>Date: <t t-esc="quotation.date_order"/></em>
</p>
<p>
<em>Quotation #: <t t-esc="quotation.name"/></em>
</p>
</div>
</div>
</section>
<section id="quote" class="tab-pane oe_section">
<div class="well">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6">
<address>
<strong t-field="quotation.order_id.partner_id.name"/>
<br/>
<t t-esc="quotation.order_id.partner_id.street"/>
<br/>
<t t-esc="quotation.order_id.partner_id.city"/>, <t t-esc="quotation.order_id.partner_id.state_id.name"/> <t t-esc="quotation.order_id.partner_id.zip"/>
<br/>
<abbr title="Phone">P:</abbr> <t t-esc="quotation.order_id.partner_id.phone"/>
</address>
</div>
<div class="col-xs-6 col-sm-6 col-md-6 text-right">
<p>
<em>Date: <t t-esc="quotation.order_id.date_order"/></em>
</p>
<p>
<em>Quotation #: <t t-esc="quotation.order_id.name"/></em>
</p>
</div>
<div class="row">
<div class="text-center">
<h1>Quotation</h1>
</div>
<div class="row">
<div class="text-center">
<h1>Quotation</h1>
</div>
<table class="table table-hover">
<thead>
<table class="table table-hover">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th>#</th>
<th class="text-center">Unit Price</th>
<th class="text-center">Subtotal</th>
</tr>
</thead>
<tbody>
<t t-foreach="quotation.order_line" t-as="line">
<tr>
<th>Product</th>
<th>Description</th>
<th>#</th>
<th class="text-center">Unit Price</th>
<th class="text-center">Subtotal</th>
<td class="col-md-9"><em><t t-esc="line.product_id.name"/></em></td>
<td class="col-md-9"><em><t t-esc="line.name"/></em></td>
<td class="col-md-1" style="text-align: center"><t t-esc="line.product_uom_qty"/></td>
<td class="col-md-1 text-center"><t t-esc="line.price_unit"/></td>
<td class="col-md-1 text-center"><t t-esc="line.price_subtotal"/></td>
</tr>
</thead>
<tbody>
<t t-foreach="quotation.order_id.order_line" t-as="line">
<tr>
<td class="col-md-9"><em><t t-esc="line.product_id.name"/></em></td>
<td class="col-md-9"><em><t t-esc="line.name"/></em></td>
<td class="col-md-1" style="text-align: center"><t t-esc="line.product_uom_qty"/></td>
<td class="col-md-1 text-center"><t t-esc="line.price_unit"/></td>
<td class="col-md-1 text-center"><t t-esc="line.price_subtotal"/></td>
</tr>
</t>
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-right">
<p>
<strong>Untaxed Amount: </strong>
</p>
<p>
<strong>Tax: </strong>
</p></td>
<td class="text-center">
<p>
<strong t-field="quotation.order_id.amount_untaxed"
t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'></strong>
</p>
<p>
<!-- <strong><t t-esc="quotation.amount_taxed"/></strong>-->
</p>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-right"><strong>Total: </strong></td>
<td class="text-center text-success">
<strong
t-field="quotation.order_id.amount_total"
t-field-options='{"widget": "monetary",
"display_currency":"website.pricelist_id.currency_id"
</t>
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-right">
<p>
<strong>Untaxed Amount: </strong>
</p>
<p>
<strong>Tax: </strong>
</p></td>
<td class="text-center">
<p>
<strong t-field="quotation.amount_untaxed"
t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'></strong>
</td>
</tr>
</tbody>
</table>
<div class="text-center">
<a type="submit" t-if="quotation.state != 'accept'" t-href="/quote/#{ quotation.access_token }/accept" class="btn btn-labeled btn-success"><span class="btn-label"><i class="glyphicon glyphicon-ok"></i></span>Accept</a>
<a type="submit" t-if="quotation.state != 'cancel'" t-href="/quote/#{ quotation.access_token }/decline" class="btn btn-labeled btn-danger"><span class="btn-label"><i class="glyphicon glyphicon-remove"></i></span>Decline</a>
</div>
</div>
</p>
<p>
<!-- <strong><t t-esc="quotation.amount_taxed"/></strong>-->
</p>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="text-right"><strong>Total: </strong></td>
<td class="text-center text-success">
<strong
t-field="quotation.amount_total"
t-field-options='{"widget": "monetary",
"display_currency":"website.pricelist_id.currency_id"
}'></strong>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="accouting" class="tab-pane oe_section">
<div class="container">
<div class="text-center">
<h1>What am i looking for ?</h1>
</div>
<div class="media">
<a class="pull-right" href="#">
<img class="media-object" src="/crm/static/description/icon.png" alt="..."/>
</div>
</section>
</template>
<template id="quote_status">
<div class="navbar navbar-default navbar-fix-top">
<div class="collapse navbar-collapse navbar-top-collapse">
<ul class="nav navbar-nav" id="top_menu">
<li>
<a type="submit" t-if="quotation.state != 'accept'" t-href="/quote/#{ quotation.access_token }/accept">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-check fa-stack-1x fa-inverse fa-success"></i>
</span>
Accept
</a>
<div class="media-body">
<h4 class="media-heading">Customer Relationship Management</h4>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Manage my leads</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Optimize my Sales Cycle</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Create customize dashboard</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Improve my Sales reporting</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Communicate with customers and colleagues</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Controll and manage my sales forcastes</i></small></p>
</div>
</div>
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" src="/hr_timesheet_sheet/static/description/icon.png" alt="..."/>
</li>
<li>
<a type="submit" t-if="quotation.state != 'cancel'" t-href="/quote/#{ quotation.access_token }/decline">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-times fa-stack-1x fa-inverse"></i>
</span>
Decline
</a>
<div class="media-body pull-right">
<h4 class="media-heading">Service Management</h4>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Manage my customer contracts</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Optimize and analyze my time management</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Manage , analysis and trace my issue</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Create customize dashboard</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Perform project management</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Trace my invoices</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Manage my helpdesk</i></small></p>
</div>
</div>
</div>
</section>
<section id="sales" class="tab-pane oe_section">
<div class="container">
<div class="text-center">
<h1>What's in it for me ?</h1>
</div>
<div>
<h4>The OpenERP Enterprise contract(1 year) convering</h4>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Unlimited Bugfix service</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil">"One Click" Update</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Functional Support</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Migration</i></small></p>
<p class="lead"><small><i class="glyphicon glyphicon-pencil"> Online Hosting</i></small></p>
</div>
</div>
</section>
<div class="panel panel-default widget">
<div class="panel-heading">
<span class="glyphicon glyphicon-comment"></span>
<h3 class="panel-title">Recent Comments</h3>
</div>
<div class="panel-body">
<ul class="list-group">
<t t-foreach="quotation.message_ids" t-as="message">
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 col-md-1">
<img t-att-src="'data:image/png;base64,' + message.author_id.image_small" class="img-circle img-responsive" alt="" /></div>
<div class="col-xs-10 col-md-11">
<div>
<a href="http://www.jquery2dotnet.com/2013/10/google-style-login-page-desing-usign.html"/>
<t t-raw="message.body"/>
<div class="mic-info">
By: <a href="#"><t t-esc="message.author_id.name"/></a> on <t t-esc="message.date"/>
</div>
</li>
<li>
<a href="#chat">
<span class="fa-stack">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-comment fa-stack-1x fa-inverse"></i>
</span>Discuss
</a>
</li>
</ul>
</div>
</div>
</template>
<template id="chatter">
<div id="chat" class="panel panel-default widget">
<div class="panel-heading">
<span class="glyphicon glyphicon-comment"></span>
<h3 class="panel-title">Recent Comments</h3>
</div>
<div class="panel-body">
<ul class="list-group">
<t t-foreach="quotation.message_ids" t-as="message">
<li class="list-group-item">
<div class="row">
<div class="col-xs-2 col-md-1">
<img t-att-src="'data:image/png;base64,' + message.author_id.image_small" class="img-circle img-responsive" alt="" /></div>
<div class="col-xs-10 col-md-11">
<div>
<a href="http://www.jquery2dotnet.com/2013/10/google-style-login-page-desing-usign.html"/>
<t t-raw="message.body"/>
<div class="mic-info">
By: <a href="#"><t t-esc="message.author_id.name"/></a> on <t t-esc="message.date"/>
</div>
</div>
</div>
</li>
</t>
</ul>
</div>
</div>
</li>
</t>
</ul>
</div>
<form id="post" accept-charset="UTF-8" method="POST" t-att-action="'/quote/%%s/post#post' %% quotation.access_token">
<textarea rows="3" id="new_message" name="new_message" placeholder="Your Comment....." class="form-control span7"> </textarea>
<button type="submit" t-att-id="quotation.access_token" class="btn btn-info">Post your Comment</button>
</form>
</div>
<div class="col-xs-6 col-md-4 sidebar oe_section" id="sidebar">
<ul class="nav nav-pills nav-stacked" data-spy="affix">
<li class="active"><a href="#main" data-toggle="tab"><i class="icon-chevron-right"></i> Introduction</a></li>
<li ><a href="#crm" data-toggle="tab"><i class="icon-chevron-right"></i> CRM and Marketing</a></li>
<li><a href="#sales" data-toggle="tab"><i class="icon-chevron-right"></i> Sales and Warehouse</a></li>
<li ><a href="#crm" data-toggle="tab"><i class="icon-chevron-right"></i> Manufacturing</a></li>
<li><a href="#accouting" data-toggle="tab"><i class="icon-chevron-right"></i> Accounting</a></li>
<li><a href="#quote" data-toggle="tab"><i class="icon-chevron-right"></i> Quotation</a></li>
</ul>
</div></t>
<form id="post" accept-charset="UTF-8" method="POST" t-att-action="'/quote/%%s/post#post' %% quotation.access_token">
<textarea rows="3" id="new_message" name="new_message" placeholder="Your Comment....." class="form-control span7"> </textarea>
<button type="submit" t-att-id="quotation.access_token" class="btn btn-info">Post your Comment</button>
</form>
</template>
<template id="so_quotation" name="Product Quotation">
<t t-call="website_sale_quote.static_layout">
<div class="col-xs-12 col-md-8 tab-content">
<t t-call="website_sale_quote.quote_status"/>
<section id="introduction11" class="tab-pane active oe_section jumbotron">
<div t-field="quotation.website_description"/>
</section>
<t t-foreach="quotation.order_line" t-as="line">
<section class="tab-pane oe_section jumbotron" t-att-id="line.id">
<div t-field="line.website_description" class="oe_structure"/>
</section>
</t>
<t t-call="website_sale_quote.pricing"/>
<t t-call="website_sale_quote.chatter"/>
</div>
<div class="col-xs-6 col-md-4 sidebar oe_section" id="sidebar">
<ul class="nav nav-pills nav-stacked" data-spy="affix">
<li class="active"><a href="#introduction11" data-toggle="tab"><i class="icon-chevron-right"></i> Introduction</a></li>
<t t-foreach="quotation.order_line" t-as="line">
<li><a t-att-href="'#%s'% line.id" data-toggle="tab"><i class="icon-chevron-right"></i><t t-raw="line.product_id.name_template"/> </a></li>
</t>
<li><a href="#quote" data-toggle="tab"><i class="icon-chevron-right"></i> Quotation</a></li>
</ul>
</div>
</t>
</template>
</data>
</openerp>