diff --git a/addons/website_quote/data/website_quotation_data.xml b/addons/website_quote/data/website_quotation_data.xml index d0d07afc4e3..83b2f34a4ca 100644 --- a/addons/website_quote/data/website_quotation_data.xml +++ b/addons/website_quote/data/website_quotation_data.xml @@ -82,5 +82,74 @@ ]]> + + Default Template + 30 + +
+

Our offer

+
+
+
+
+

+

Our offer is based on 3 commitments, which drive our business and our partners:

+

+
+
+
+
+
+
+
+
+

Quality

+
+
+

+ Quality in many ways, our reputation was built on the first value. +

+
+
+
+
+
+
+

Service

+
+
+

+ We are always reachable to help you, do not hesitate to contact us at any time. +

+
+
+
+
+
+
+

Price

+
+
+

+ Our prices are the lowest in the region, if you find cheaper elsewhere, we will refund the difference +

+
+
+
+
+
+
+

Your products/services

+

+

+ The description of products/services from your quotation will be displayed below +

+

+

+ To write a quotation description, edit your product, go the sales tab and add a text in "Description for quotations" +

+
+
+
diff --git a/addons/website_quote/models/order.py b/addons/website_quote/models/order.py index c7ae4bc8ab5..93d93a96efe 100644 --- a/addons/website_quote/models/order.py +++ b/addons/website_quote/models/order.py @@ -118,8 +118,17 @@ class sale_order(osv.osv): 'amount_undiscounted': fields.function(_get_total, string='Amount Before Discount', type="float", digits_compute=dp.get_precision('Account')) } + + def _get_template_id(self, cr, uid, context=None): + try: + template_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'website_quote', 'website_quote_template_default')[1] + except ValueError: + template_id = False + return template_id + _defaults = { - 'access_token': lambda self, cr, uid, ctx={}: str(uuid.uuid4()) + 'access_token': lambda self, cr, uid, ctx={}: str(uuid.uuid4()), + 'template_id' : _get_template_id, } def open_quotation(self, cr, uid, quote_id, context=None):