[MERGE] Merge parents

bzr revid: rim@openerp.com-20131212111011-6vgxvixd4g3rpgqh
This commit is contained in:
Richard Mathot (OpenERP)
2013-12-12 12:10:11 +01:00
62 changed files with 624 additions and 461 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ You can define your own carrier and delivery grids for prices. When creating
invoices from picking, OpenERP is able to add and compute the shipping line.
""",
'author': 'OpenERP SA',
'depends': ['sale', 'stock'],
'depends': ['sale_stock'],
'data': [
'security/ir.model.access.csv',
'delivery_report.xml',
+3 -3
View File
@@ -160,10 +160,10 @@
<center><strong>5-days Technical Training</strong></center>
<p>&nbsp;</p>
<p><strong>Course summary:</strong></p>
<p>This course is dedicated to partners, integrators and developers who need to grasp knowledge of the business applications development process. This course is for new developers or for IT professionals eager to learn more about technical aspects.</p>
<p>This course is dedicated to partners, integrators and developers who need to grasp knowledge about the business applications development process and for new developers or for IT professionals eager to learn more about technical aspects.</p>
<p>&nbsp;</p>
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul>
<li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@@ -176,7 +176,7 @@
<li>training material.</li>
</ul>
<p>&nbsp;</p>
<p><strong>Requirements:</strong></p>
<p><strong>Requirements</strong></p>
<ul>
<li>Bring your own laptop.</li>
<li>Participants are expected to have some knowledge in programming.&nbsp;A basic knowledge of the Python programming is recommended.</li>
+1 -1
View File
@@ -7,7 +7,7 @@
<field name="membership">True</field>
<field eval="time.strftime('%Y-01-01')" name="membership_date_from"/>
<field eval="time.strftime('%Y-12-01')" name="membership_date_to"/>
<field name="name">Golden Membership</field>
<field name="name">Gold Membership</field>
<field name="list_price">180</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="type">service</field>
-1
View File
@@ -34,7 +34,6 @@ class report_custom(report_rml):
registry = openerp.registry(cr.dbname)
product_pool = registry.get('product.product')
product_uom_pool = registry.get('product.uom')
supplier_info_pool = registry.get('product.supplierinfo')
workcenter_pool = registry.get('mrp.workcenter')
user_pool = registry.get('res.users')
bom_pool = registry.get('mrp.bom')
@@ -19,7 +19,7 @@ class AdyenController(http.Controller):
@website.route([
'/payment/adyen/return/',
], type='http', auth='public')
], type='http', auth='public', methods=['POST'])
def adyen_return(self, **post):
""" Paypal IPN. """
_logger.info('Beginning Adyen form_feedback with post data %s', pprint.pformat(post)) # debug
-5
View File
@@ -172,9 +172,7 @@ class product_pricelist(osv.osv):
products = map(lambda x: x[0], products_by_qty_by_partner)
currency_obj = self.pool.get('res.currency')
product_obj = self.pool.get('product.product')
product_category_obj = self.pool.get('product.category')
product_uom_obj = self.pool.get('product.uom')
supplierinfo_obj = self.pool.get('product.supplierinfo')
price_type_obj = self.pool.get('product.price.type')
version = False
@@ -278,8 +276,6 @@ class product_pricelist(osv.osv):
break
if price:
# FP Note: what's this?
# results['item_id'] = res.id
if 'uom' in context and not uom_price_already_computed:
product = products_dict[product.id]
uom = product.uos_id or product.uom_id
@@ -292,7 +288,6 @@ class product_pricelist(osv.osv):
product = self.pool.get('product.product').browse(cr, uid, prod_id, context=context)
res_multi = self.price_get_multi(cr, uid, pricelist_ids=ids, products_by_qty_by_partner=[(product, qty, partner)], context=context)
res = res_multi[prod_id]
res.update({'item_id': {ids[-1]: res_multi.get('item_id', ids[-1])}})
return res
+10 -10
View File
@@ -410,7 +410,7 @@ class product_template(osv.osv):
help='Coefficient to convert default Unit of Measure to Unit of Sale\n'
' uos = uom * coeff'),
'mes_type': fields.selection((('fixed', 'Fixed'), ('variable', 'Variable')), 'Measure Type'),
'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'),
'seller_ids': fields.one2many('product.supplierinfo', 'product_tmpl_id', 'Supplier'),
'company_id': fields.many2one('res.company', 'Company', select=1),
# image: all image fields are base64 encoded and PIL-supported
'image': fields.binary("Image",
@@ -657,8 +657,8 @@ class product_product(osv.osv):
'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity Available'),
'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'),
'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
'price': fields.function(_product_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
'lst_price' : fields.function(_product_lst_price, fnct_inv=_save_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
'price': fields.function(_product_price, fnct_inv=_save_product_lst_price, type='float', string='Price', digits_compute=dp.get_precision('Product Price')),
'lst_price' : fields.function(_product_lst_price, fnct_inv=_save_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
'code': fields.function(_product_code, type='char', string='Internal Reference'),
'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
'default_code' : fields.char('Internal Reference', size=64, select=True),
@@ -928,7 +928,6 @@ class product_supplierinfo(osv.osv):
_description = "Information about a product supplier"
def _calc_qty(self, cr, uid, ids, fields, arg, context=None):
result = {}
product_uom_pool = self.pool.get('product.uom')
for supplier_info in self.browse(cr, uid, ids, context=context):
for field in fields:
result[supplier_info.id] = {field:False}
@@ -941,10 +940,10 @@ class product_supplierinfo(osv.osv):
'product_name': fields.char('Supplier Product Name', size=128, help="This supplier's product name will be used when printing a request for quotation. Keep empty to use the internal one."),
'product_code': fields.char('Supplier Product Code', size=64, help="This supplier's product code will be used when printing a request for quotation. Keep empty to use the internal one."),
'sequence' : fields.integer('Sequence', help="Assigns the priority to the list of product supplier."),
'product_uom': fields.related('product_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
'product_uom': fields.related('product_tmpl_id', 'uom_po_id', type='many2one', relation='product.uom', string="Supplier Unit of Measure", readonly="1", help="This comes from the product form."),
'min_qty': fields.float('Minimal Quantity', required=True, help="The minimal quantity to purchase to this supplier, expressed in the supplier Product Unit of Measure if not empty, in the default unit of measure of the product otherwise."),
'qty': fields.function(_calc_qty, store=True, type='float', string='Quantity', multi="qty", help="This is a quantity which is converted into Default Unit of Measure."),
'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),
'product_tmpl_id' : fields.many2one('product.template', 'Product Template', required=True, ondelete='cascade', select=True),
'delay' : fields.integer('Delivery Lead Time', required=True, help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning."),
'pricelist_ids': fields.one2many('pricelist.partnerinfo', 'suppinfo_id', 'Supplier Pricelist'),
'company_id':fields.many2one('res.company','Company',select=1),
@@ -970,10 +969,11 @@ class product_supplierinfo(osv.osv):
pricelist_pool = self.pool.get('product.pricelist')
currency_pool = self.pool.get('res.currency')
currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
# Compute price from standard price of product
product_price = product_pool.price_get(cr, uid, [product_id], 'standard_price', context=context)[product_id]
product = product_pool.browse(cr, uid, product_id, context=context)
for supplier in partner_pool.browse(cr, uid, supplier_ids, context=context):
# Compute price from standard price of product
price = product_pool.price_get(cr, uid, [product_id], 'standard_price', context=context)[product_id]
price = product_price
# Compute price from Purchase pricelist of supplier
pricelist_id = supplier.property_product_pricelist_purchase.id
if pricelist_id:
@@ -981,7 +981,7 @@ class product_supplierinfo(osv.osv):
price = currency_pool.compute(cr, uid, pricelist_pool.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
# Compute price from supplier pricelist which are in Supplier Information
supplier_info_ids = self.search(cr, uid, [('name','=',supplier.id),('product_id','=',product_id)])
supplier_info_ids = self.search(cr, uid, [('name','=',supplier.id),('product_tmpl_id','=',product.product_tmpl_id.id)])
if supplier_info_ids:
cr.execute('SELECT * ' \
'FROM pricelist_partnerinfo ' \
+46 -46
View File
@@ -995,322 +995,322 @@ QWERTY keyboard</field>
-->
<record id="product_supplierinfo_1" model="product.supplierinfo">
<field name="product_id" ref="product_template_6"/>
<field name="product_tmpl_id" ref="product_template_6"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_2" model="product.supplierinfo">
<field name="product_id" ref="product_template_6"/>
<field name="product_tmpl_id" ref="product_template_6"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_3" model="product.supplierinfo">
<field name="product_id" ref="product_template_7"/>
<field name="product_tmpl_id" ref="product_template_7"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_4" model="product.supplierinfo">
<field name="product_id" ref="product_template_7"/>
<field name="product_tmpl_id" ref="product_template_7"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_5" model="product.supplierinfo">
<field name="product_id" ref="product_template_8"/>
<field name="product_tmpl_id" ref="product_template_8"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">2</field>
<field name="min_qty">5</field>
</record>
<record id="product_supplierinfo_6" model="product.supplierinfo">
<field name="product_id" ref="product_template_8"/>
<field name="product_tmpl_id" ref="product_template_8"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_7" model="product.supplierinfo">
<field name="product_id" ref="product_template_10"/>
<field name="product_tmpl_id" ref="product_template_10"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_8" model="product.supplierinfo">
<field name="product_id" ref="product_template_11"/>
<field name="product_tmpl_id" ref="product_template_11"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_9" model="product.supplierinfo">
<field name="product_id" ref="product_template_13"/>
<field name="product_tmpl_id" ref="product_template_13"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_10" model="product.supplierinfo">
<field name="product_id" ref="product_template_14"/>
<field name="product_tmpl_id" ref="product_template_14"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_11" model="product.supplierinfo">
<field name="product_id" ref="product_template_15"/>
<field name="product_tmpl_id" ref="product_template_15"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_12" model="product.supplierinfo">
<field name="product_id" ref="product_template_15"/>
<field name="product_tmpl_id" ref="product_template_15"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">1</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_13" model="product.supplierinfo">
<field name="product_id" ref="product_template_16"/>
<field name="product_tmpl_id" ref="product_template_16"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">1</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_14" model="product.supplierinfo">
<field name="product_id" ref="product_template_17"/>
<field name="product_tmpl_id" ref="product_template_17"/>
<field name="name" ref="base.res_partner_19"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_15" model="product.supplierinfo">
<field name="product_id" ref="product_template_20"/>
<field name="product_tmpl_id" ref="product_template_20"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_16" model="product.supplierinfo">
<field name="product_id" ref="product_template_20"/>
<field name="product_tmpl_id" ref="product_template_20"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">4</field>
<field name="min_qty">5</field>
</record>
<record id="product_supplierinfo_17" model="product.supplierinfo">
<field name="product_id" ref="product_template_21"/>
<field name="product_tmpl_id" ref="product_template_21"/>
<field name="name" ref="base.res_partner_4"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_18" model="product.supplierinfo">
<field name="product_id" ref="product_template_21"/>
<field name="product_tmpl_id" ref="product_template_21"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_19" model="product.supplierinfo">
<field name="product_id" ref="product_template_22"/>
<field name="product_tmpl_id" ref="product_template_22"/>
<field name="name" ref="base.res_partner_19"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_20" model="product.supplierinfo">
<field name="product_id" ref="product_template_23"/>
<field name="product_tmpl_id" ref="product_template_23"/>
<field name="name" ref="base.res_partner_19"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_21" model="product.supplierinfo">
<field name="product_id" ref="product_template_24"/>
<field name="product_tmpl_id" ref="product_template_24"/>
<field name="name" ref="base.res_partner_19"/>
<field name="delay">3</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_22" model="product.supplierinfo">
<field name="product_id" ref="product_template_25"/>
<field name="product_tmpl_id" ref="product_template_25"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">8</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_23" model="product.supplierinfo">
<field name="product_id" ref="product_template_26"/>
<field name="product_tmpl_id" ref="product_template_26"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">8</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_24" model="product.supplierinfo">
<field name="product_id" ref="product_template_28"/>
<field name="product_tmpl_id" ref="product_template_28"/>
<field name="name" ref="base.res_partner_19"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_25" model="product.supplierinfo">
<field name="product_id" ref="product_template_28"/>
<field name="product_tmpl_id" ref="product_template_28"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_26" model="product.supplierinfo">
<field name="product_id" ref="product_template_29"/>
<field name="product_tmpl_id" ref="product_template_29"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">2</field>
<field name="min_qty">12</field>
</record>
<record id="product_supplierinfo_27" model="product.supplierinfo">
<field name="product_id" ref="product_template_30"/>
<field name="product_tmpl_id" ref="product_template_30"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">2</field>
<field name="min_qty">12</field>
</record>
<record id="product_supplierinfo_28" model="product.supplierinfo">
<field name="product_id" ref="product_template_31"/>
<field name="product_tmpl_id" ref="product_template_31"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">2</field>
<field name="min_qty">5</field>
</record>
<record id="product_supplierinfo_29" model="product.supplierinfo">
<field name="product_id" ref="product_template_32"/>
<field name="product_tmpl_id" ref="product_template_32"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">2</field>
<field name="min_qty">12</field>
</record>
<record id="product_supplierinfo_30" model="product.supplierinfo">
<field name="product_id" ref="product_template_34"/>
<field name="product_tmpl_id" ref="product_template_34"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">2</field>
<field name="min_qty">5</field>
</record>
<record id="product_supplierinfo_31" model="product.supplierinfo">
<field name="product_id" ref="product_template_35"/>
<field name="product_tmpl_id" ref="product_template_35"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_32" model="product.supplierinfo">
<field name="product_id" ref="product_template_36"/>
<field name="product_tmpl_id" ref="product_template_36"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">2</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_33" model="product.supplierinfo">
<field name="product_id" ref="product_template_38"/>
<field name="product_tmpl_id" ref="product_template_38"/>
<field name="name" ref="base.res_partner_22"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_34" model="product.supplierinfo">
<field name="product_id" ref="product_template_39"/>
<field name="product_tmpl_id" ref="product_template_39"/>
<field name="name" ref="base.res_partner_22"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_35" model="product.supplierinfo">
<field name="product_id" ref="product_template_45"/>
<field name="product_tmpl_id" ref="product_template_45"/>
<field name="name" ref="base.res_partner_22"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_36" model="product.supplierinfo">
<field name="product_id" ref="product_template_46"/>
<field name="product_tmpl_id" ref="product_template_46"/>
<field name="name" ref="base.res_partner_22"/>
<field name="delay">5</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_37" model="product.supplierinfo">
<field name="product_id" ref="product_template_47"/>
<field name="product_tmpl_id" ref="product_template_47"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">7</field>
<field name="min_qty">1</field>
</record>
<!--record id="product_supplierinfo_38" model="product.supplierinfo">
<field name="product_id" ref="product_template_48"/>
<field name="product_tmpl_id" ref="product_template_48"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">7</field>
<field name="min_qty">1</field>
</record-->
<record id="product_supplierinfo_39" model="product.supplierinfo">
<field name="product_id" ref="product_template_18"/>
<field name="product_tmpl_id" ref="product_template_18"/>
<field name="name" ref="base.res_partner_19"/>
<field name="delay">4</field>
<field name="min_qty">1</field>
</record>
<record id="product_supplierinfo_40" model="product.supplierinfo">
<field name="product_id" ref="product_template_19"/>
<field name="product_tmpl_id" ref="product_template_19"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">4</field>
<field name="min_qty">0</field>
</record>
<record id="product_supplierinfo_41" model="product.supplierinfo">
<field name="product_id" ref="product_template_19"/>
<field name="product_tmpl_id" ref="product_template_19"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">5</field>
<field name="min_qty">0</field>
</record>
<record id="product_supplierinfo_42" model="product.supplierinfo">
<field name="product_id" ref="product_template_33"/>
<field name="product_tmpl_id" ref="product_template_33"/>
<field name="name" ref="base.res_partner_3"/>
<field name="delay">2</field>
<field name="min_qty">0</field>
</record>
<record id="product_supplierinfo_43" model="product.supplierinfo">
<field name="product_id" ref="product_template_9"/>
<field name="product_tmpl_id" ref="product_template_9"/>
<field name="name" ref="base.res_partner_8"/>
<field name="delay">4</field>
<field name="min_qty">0</field>
</record>
<record id="product_supplierinfo_44" model="product.supplierinfo">
<field name="product_id" ref="product_template_27"/>
<field name="product_tmpl_id" ref="product_template_27"/>
<field name="name" ref="base.res_partner_1"/>
<field name="delay">10</field>
<field name="min_qty">0</field>
</record>
<record id="product_supplierinfo_45" model="product.supplierinfo">
<field name="product_id" ref="product_template_12"/>
<field name="product_tmpl_id" ref="product_template_12"/>
<field name="name" ref="base.res_partner_16"/>
<field name="delay">3</field>
<field name="min_qty">0</field>
</record>
<record id="product_supplierinfo_46" model="product.supplierinfo">
<field name="product_id" ref="product_template_37"/>
<field name="product_tmpl_id" ref="product_template_37"/>
<field name="name" ref="base.res_partner_22"/>
<field name="delay">5</field>
<field name="min_qty">0</field>
@@ -48,12 +48,6 @@ class sale_order_line(osv.osv):
product_obj = self.pool.get('product.product')
field_name = 'list_price'
if res_dict.get('item_id',False) and res_dict['item_id'].get(pricelist,False):
item = res_dict['item_id'].get(pricelist,False)
item_base = item_obj.read(cr, uid, [item], ['base'])[0]['base']
if item_base > 0:
field_name = price_type_obj.browse(cr, uid, item_base).field
product = product_obj.browse(cr, uid, product_id, context)
product_read = product_obj.read(cr, uid, product_id, [field_name], context=context)
-1
View File
@@ -958,7 +958,6 @@ class purchase_order_line(osv.osv):
product_product = self.pool.get('product.product')
product_uom = self.pool.get('product.uom')
res_partner = self.pool.get('res.partner')
product_supplierinfo = self.pool.get('product.supplierinfo')
product_pricelist = self.pool.get('product.pricelist')
account_fiscal_position = self.pool.get('account.fiscal.position')
account_tax = self.pool.get('account.tax')
@@ -96,7 +96,6 @@ class purchase_requisition(osv.osv):
def _seller_details(self, cr, uid, requisition_line, supplier, context=None):
product_uom = self.pool.get('product.uom')
pricelist = self.pool.get('product.pricelist')
supplier_info = self.pool.get("product.supplierinfo")
product = requisition_line.product_id
default_uom_po_id = product.uom_po_id.id
qty = product_uom._compute_qty(cr, uid, requisition_line.product_uom_id.id, requisition_line.product_qty, default_uom_po_id)
@@ -19,9 +19,7 @@
#
##############################################################################
import time
from openerp.osv import fields, osv
from openerp.osv.orm import browse_record, browse_null
from openerp.tools.translate import _
class purchase_requisition_partner(osv.osv_memory):
+2
View File
@@ -66,6 +66,8 @@
-
!python {model: stock.partial.picking}: |
context.update({'active_model': 'stock.picking', 'active_id': ref('incomming_shipment'), 'active_ids': [ref('incomming_shipment')]})
-
I make a partial picking and moves done.
-
!python {model: stock.partial.picking}: |
partial = []
+1 -4
View File
@@ -119,15 +119,12 @@ class Website(openerp.addons.web.controllers.main.Home):
view_model, view_theme_id = imd.get_object_reference(
request.cr, request.uid, 'website', 'theme')
view_secure_layout = imd.get_object_reference(
request.cr, request.uid, 'website', 'secure_layout')[1]
view = request.registry.get("ir.ui.view")
views = view._views_get(request.cr, request.uid, xml_id, request.context)
done = {}
result = []
for v in views:
if v.id != view_secure_layout and (v.inherit_option_id and v.inherit_option_id.id != view_theme_id or not optional):
if v.inherit_option_id and v.inherit_option_id.id != view_theme_id or not optional:
if v.inherit_option_id.id not in done:
result.append({
'name': v.inherit_option_id.name,
+1 -1
View File
@@ -72,7 +72,7 @@
</record>
<record id="action_website_tutorial" model="ir.actions.act_url">
<field name="name">Website With Tutorial</field>
<field name="url">/?banner-tutorial=true</field>
<field name="url">/?tutorial.banner=true</field>
<field name="target">self</field>
</record>
+2 -2
View File
@@ -535,8 +535,8 @@ class website_menu(osv.osv):
'new_window': False,
}
_parent_store = True
_parent_order = 'sequence, name'
_order = "parent_left"
_parent_order = 'sequence'
_order = "sequence"
# would be better to take a menu_id as argument
def get_tree(self, cr, uid, website_id, context=None):
+6 -1
View File
@@ -1,3 +1,4 @@
@charset "utf-8";
/* ---- CKEditor Minimal Reset ---- */
.navbar.navbar-inverse .cke_chrome {
border: none;
@@ -190,6 +191,10 @@ ul.oe_menu_editor .disclose {
margin-bottom: 0.5em;
}
.modal-footer {
text-align: left;
}
.modal.nosave .modal-footer button.save {
display: none;
}
@@ -220,7 +225,7 @@ ul.oe_menu_editor .disclose {
position: absolute;
top: 0;
left: 0;
z-index: 42;
z-index: 1000;
}
/* ---- SNIPPET EDITOR ---- */
+5 -1
View File
@@ -154,6 +154,9 @@ ul.oe_menu_editor
.modal .image-preview
margin-bottom: 0.5em
.modal-footer
text-align: left
.modal.nosave .modal-footer
button.save
display: none
@@ -182,7 +185,8 @@ ul.oe_menu_editor
position: absolute
top: 0
left: 0
z-index: 42
// This z-index is due to .navbar of bootstrap
z-index: 1000
/* ---- SNIPPET EDITOR ---- */
+28 -28
View File
@@ -199,12 +199,11 @@ html, body, #wrapwrap {
}
#wrapwrap {
display: table;
width: 100%;
}
header, #wrap, footer {
display: table-row;
margin: 0 auto;
}
footer {
@@ -224,6 +223,10 @@ footer {
width: 100%;
}
.row {
min-height: 32px;
}
/* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */
.oe_structure.oe_editable.oe_empty:empty, .oe_editable[data-oe-type=html]:empty, .oe_structure.oe_editable.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child {
background-image: url("/website/static/src/img/drag_here.png");
@@ -283,12 +286,12 @@ ul.nav-stacked > li > a {
}
/* ---- PUBLISH ---- */
.css_unpublish, .css_publish {
.css_published .btn-danger, .css_published .css_publish {
display: none;
}
.css_published .css_unpublish, .css_unpublished .css_publish {
display: block;
.css_unpublished .btn-success, .css_unpublished .css_unpublish {
display: none;
}
[data-publish='off'] {
@@ -345,23 +348,7 @@ ul.nav-stacked > li > a {
.carousel.oe_big .carousel-inner {
height: 450px;
}
.carousel .carousel-caption h1, .carousel .carousel-caption h2, .carousel .carousel-caption h3 {
margin-top: 10px;
margin-bottom: 10px;
}
.carousel .carousel-image {
right: 10%;
left: 50%;
top: 5%;
bottom: 5%;
position: absolute;
text-align: center;
}
.carousel .carousel-image img {
height: 100%;
margin: 0 auto;
}
.carousel .item.text_image .carousel-caption {
.carousel .carousel-caption {
left: auto;
right: auto;
bottom: 10%;
@@ -369,6 +356,19 @@ ul.nav-stacked > li > a {
padding: 20px;
background: rgba(0, 0, 0, 0.4);
}
.carousel .carousel-caption h1, .carousel .carousel-caption h2, .carousel .carousel-caption h3 {
margin-top: 10px;
margin-bottom: 10px;
}
.carousel .carousel-image {
right: 50%;
left: 50%;
top: 5%;
bottom: 5%;
position: absolute;
max-height: 90%;
margin: 0 auto;
}
.carousel .item.text_only .carousel-image {
display: none !important;
}
@@ -376,18 +376,14 @@ ul.nav-stacked > li > a {
left: 10%;
right: 10%;
top: 10%;
bottom: auto;
text-align: center;
background: transparent;
}
.carousel .item.image_text .carousel-caption {
left: auto;
text-align: left;
right: 10%;
bottom: 10%;
padding: 20px;
background: rgba(0, 0, 0, 0.4);
}
.carousel .item.image_text .carousel-image {
right: 50%;
left: 10%;
}
.carousel .carousel-control {
@@ -503,3 +499,7 @@ address .fa.fa-mobile-phone {
address .fa.fa-file-text-o {
margin-right: 1px;
}
span[data-oe-type="monetary"] {
white-space: nowrap;
}
+24 -25
View File
@@ -124,11 +124,10 @@ html,body, #wrapwrap
height: 100%
#wrapwrap
display: table
width: 100%
header, #wrap, footer
display: table-row
margin: 0 auto
footer
height: 100%
@@ -145,6 +144,9 @@ footer
float: left
width: 100%
.row
min-height: 32px
/* ---- HACK FOR COVERING UP CK EDITOR BOGUS P INSERTION --- */
.oe_structure.oe_editable.oe_empty:empty, .oe_editable[data-oe-type=html]:empty, .oe_structure.oe_editable.oe_empty > .oe_drop_zone.oe_insert:only-child, [data-oe-type=html] > .oe_drop_zone.oe_insert:only-child
@@ -202,10 +204,12 @@ ul.nav-stacked > li > a
text-transform: uppercase
/* ---- PUBLISH ---- */
.css_unpublish, .css_publish
display: none
.css_published .css_unpublish, .css_unpublished .css_publish
display: block
.css_published
.btn-danger, .css_publish
display: none
.css_unpublished
.btn-success, .css_unpublish
display: none
[data-publish='off']
+opacity(0.5)
@@ -250,27 +254,23 @@ ul.nav-stacked > li > a
&.oe_big .carousel-inner
height: 450px
.carousel-caption
left: auto
right: auto
bottom: 10%
text-align: left
padding: 20px
background: rgba(0, 0, 0, 0.4)
h1, h2, h3
margin-top: 10px
margin-bottom: 10px
.carousel-image
right: 10%
right: 50%
left: 50%
top: 5%
bottom: 5%
position: absolute
text-align: center
img
height: 100%
margin: 0 auto
.item.text_image
.carousel-caption
left: auto
right: auto
bottom: 10%
text-align: left
padding: 20px
background: rgba(0, 0, 0, 0.4)
max-height: 90%
margin: 0 auto
.item.text_only
.carousel-image
display: none !important
@@ -278,17 +278,13 @@ ul.nav-stacked > li > a
left: 10%
right: 10%
top: 10%
bottom: auto
text-align: center
background: transparent
.item.image_text
.carousel-caption
left: auto
text-align: left
right: 10%
bottom: 10%
padding: 20px
background: rgba(0, 0, 0, 0.4)
.carousel-image
right: 50%
left: 10%
.carousel-control
cursor: pointer
@@ -378,3 +374,6 @@ address
margin: 0 3px 0 2px
.fa.fa-file-text-o
margin-right: 1px
span[data-oe-type="monetary"]
white-space: nowrap
+1 -1
View File
@@ -160,7 +160,7 @@
});
_.each(index, function (view) {
var parentId = view.inherit_id;
if (parentId) {
if (parentId && index[parentId]) {
index[parentId].children.push(view);
} else {
roots.push(view);
@@ -366,7 +366,7 @@
events: {
'click button[data-action=edit]': 'edit',
'click button[data-action=save]': 'save',
'click button[data-action=cancel]': 'cancel',
'click a[data-action=cancel]': 'cancel',
'click a[data-action=new_page]': 'new_page',
},
container: 'body',
+2 -3
View File
@@ -266,12 +266,11 @@
/* ----- PUBLISHING STUFF ---- */
$(document).on('click', '.js_publish_management .js_publish_btn', function () {
var $data = $(this).parent(".js_publish_management");
var self=this;
var $data = $(this).parents(".js_publish_management:first");
var self=this;
openerp.jsonRpc($data.data('controller') || '/website/publish', 'call', {'id': +$data.data('id'), 'object': $data.data('object')})
.then(function (result) {
$data.toggleClass("css_unpublished css_published");
$(self).toggleClass("btn-success btn-danger");
$data.parents("[data-publish]").attr("data-publish", +result ? 'on' : 'off');
}).fail(function (err, data) {
website.error(data, '/web#return_label=Website&model='+$data.data('object')+'&id='+$data.data('id'));
@@ -246,6 +246,9 @@
this.snippet_focus($snippet);
}
$("#oe_snippets").trigger('snippet-activated', $snippet);
if ($snippet) {
$snippet.trigger('snippet-activated', $snippet);
}
},
create_overlay: function ($snippet) {
if (typeof $snippet.data("snippet-editor") === 'undefined') {
@@ -670,7 +673,7 @@
});
website.snippet.styleRegistry['size'] = website.snippet.StyleEditor.extend({
website.snippet.styleRegistry.size = website.snippet.StyleEditor.extend({
select: function(event, np) {
this._super(event, np);
this.parent.parent.cover_target(this.$overlay, this.$target);
@@ -1111,9 +1114,13 @@
this.$target.addClass("col-md-offset-" + this.$target.prevAll(".oe_drop_to_remove").length);
this._super();
},
hide_remove_button: function() {
this.$overlay.find('.oe_snippet_remove').toggleClass("hidden",
!this.$target.siblings().length && this.$target.parents("[data-snippet-id]:first").find("[data-snippet-id='colmd']").length > 1);
},
onFocus : function () {
this._super();
this.$overlay.find('.oe_snippet_remove').toggleClass("hidden", !this.$target.siblings().length);
this.hide_remove_button();
},
on_clone: function () {
var $clone = this.$target.clone(false);
@@ -1121,13 +1128,21 @@
_class += ' col-md-1';
$clone.attr("class", _class);
this.$target.after($clone);
this.hide_remove_button();
return false;
},
on_remove: function () {
if (!this.$target.siblings().length){
return false;
if (!this.$target.siblings().length) {
var $parent = this.$target.parents("[data-snippet-id]:first");
if($parent.find("[data-snippet-id='colmd']").length > 1) {
return false;
} else {
$parent.data("snippet-editor").on_remove();
}
}
return this._super();
this._super();
this.hide_remove_button();
return false;
},
on_resize: function (compass, beginClass, current) {
if (compass !== 'w')
@@ -1171,7 +1186,7 @@
self.$target.carousel(+$(this).data('slide-to')); });
this.$target.attr('contentEditable', 'false');
this.$target.find('.oe_structure, blockquote').attr('contentEditable', 'true');
this.$target.find('.oe_structure, .content>.row').attr('contentEditable', 'true');
this.$target.carousel('pause');
},
@@ -1256,7 +1271,6 @@
this._super();
this.$target.css("background-image", "");
this.$target.removeClass(this._class);
this.$target.find('.content, .carousel-image img').attr('contentEditable', 'true');
},
start : function () {
var self = this;
@@ -1311,7 +1325,7 @@
this.$target.find('.carousel-control').off('click').on('click', function () {
self.$target.carousel( $(this).data('slide')); });
this.$target.find('.carousel-image img, .content').attr('contentEditable', 'true');
this.$target.find('.carousel-image, .content').attr('contentEditable', 'true');
this._super();
},
});
@@ -46,7 +46,7 @@
},
{
stepId: 'drag-banner',
element: '#website-top-navbar [data-snippet-id=carousel].ui-draggable',
snippet: 'carousel',
placement: 'bottom',
title: "Drag & Drop a Banner",
content: "Drag the Banner block and drop it in your page.",
@@ -84,7 +84,7 @@
},
{
stepId: 'drag-three-columns',
element: '#website-top-navbar [data-snippet-id=three-columns].ui-draggable',
snippet: 'three-columns',
placement: 'bottom',
title: "Drag & Drop a Block",
content: "Drag the <em>'3 Columns'</em> block and drop it below the banner.",
@@ -92,17 +92,18 @@
},
{
stepId: 'activate-text-block-title',
element: '#wrap [data-snippet-id=three-columns]:first .text-center[data-snippet-id=colmd]',
element: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
placement: 'top',
title: "Edit an Area",
content: "Select any area of the page to modify it. Click on this subtitle.",
trigger: {
id: 'snippet-activated'
emitter: '#wrap [data-snippet-id=three-columns] .text-center[data-snippet-id=colmd]',
id: 'snippet-activated',
},
},
{
stepId: 'remove-text-block-title',
element: '.ui-draggable.oe_active .oe_snippet_remove',
element: '.oe_active .oe_snippet_remove',
placement: 'top',
title: "Delete the Title",
content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the trash can to delete the title.",
+112 -22
View File
@@ -27,6 +27,9 @@
if (!step.element) {
step.orphan = true;
}
if (step.snippet) {
step.element = '#oe_snippets div.oe_snippet[data-snippet-id="'+step.snippet+'"] .oe_snippet_thumbnail';
}
if (step.trigger) {
if (step.trigger === 'click') {
step.triggers = function (callback) {
@@ -48,8 +51,8 @@
};
} else {
step.triggers = function (callback) {
var emitter = step.trigger.emitter || $(step.element);
emitter.one(step.trigger.id, function customHandler () {
var emitter = _.isString(step.trigger.emitter) ? $(step.trigger.emitter) : (step.trigger.emitter || $(step.element));
emitter.on(step.trigger.id, function () {
(callback || self.moveToNextStep).apply(self, arguments);
});
};
@@ -144,7 +147,7 @@
},
resume: function () {
// Override if necessary
return !this.ended();
return this.tourStorage.getItem(this.id+'_current_step') && !this.ended();
},
trigger: function (url) {
// Override if necessary
@@ -164,7 +167,7 @@
$('.popover.tour').remove();
function advance () {
if (_.isFunction(callback)) {
callback.call(self);
callback.apply(self);
}
}
$(document.body).one('mouseup', advance);
@@ -214,12 +217,52 @@
},
});
var TestConsole = website.TestConsole = {
tests: []
};
var TestConsole = openerp.Class.extend({
tests: [],
editor: null,
init: function (editor) {
if (!editor) {
throw new Error("Editor cannot be null or undefined");
}
this.editor = editor;
},
test: function (id) {
return _.find(this.tests, function (tour) {
return tour.id === id;
});
},
snippetSelector: function (snippetId) {
return '#oe_snippets div.oe_snippet[data-snippet-id="'+snippetId+'"] .oe_snippet_thumbnail';
},
snippetThumbnail: function (snippetId) {
return $(this.snippetSelector(snippetId)).first();
},
dragAndDropSnippet: function (snippetId) {
function actualDragAndDrop ($thumbnail) {
var thumbnailPosition = $thumbnail.position();
$thumbnail.trigger($.Event("mousedown", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top }));
$thumbnail.trigger($.Event("mousemove", { which: 1, pageX: thumbnailPosition.left, pageY: thumbnailPosition.top+500 }));
var $dropZone = $(".oe_drop_zone").first();
var dropPosition = $dropZone.position();
$dropZone.trigger($.Event("mouseup", { which: 1, pageX: dropPosition.left, pageY: dropPosition.top }));
}
if (this.snippetThumbnail(snippetId).length === 0) {
this.editor.on('rte:ready', this, function () {
actualDragAndDrop(this.snippetThumbnail(snippetId));
});
} else {
actualDragAndDrop(this.snippetThumbnail(snippetId));
}
},
});
website.EditorBar.include({
tours: [],
init: function () {
var result = this._super();
website.TestConsole = new TestConsole(this);
return result;
},
start: function () {
$('.tour-backdrop').click(function (e) {
e.stopImmediatePropagation();
@@ -242,25 +285,72 @@
return this._super();
},
registerTour: function (tour) {
var testId = 'test_'+tour.id+'_tour';
this.tours.push(tour);
TestConsole.tests.push({
var test = {
id: tour.id,
run: function runTest () {
var actionSteps = _.filter(tour.steps, function (step) {
return step.triggers;
});
var currentIndex = 0;
function executeStep (step) {
var $element = $(step.element);
step.triggers(function () {
currentIndex = currentIndex + 1;
executeStep(actionSteps[currentIndex]);
});
$element.click();
run: function (force) {
if (force === true) {
this.reset();
}
var actionSteps = _.filter(tour.steps, function (step) {
return step.trigger;
});
function executeStep (step) {
window.localStorage.setItem(testId, step.stepId);
step.triggers(function () {
var nextStep = actionSteps.shift();
if (nextStep) {
// Ensure the previous step has been fully propagated
setTimeout(function () {
setTimeout(function () {
executeStep(nextStep);
}, 0);
}, 0);
} else {
window.localStorage.removeItem(testId);
}
});
var $element = $(step.element);
if (step.snippet && step.trigger === 'drag') {
website.TestConsole.dragAndDropSnippet(step.snippet);
} else if (step.trigger.id === 'change') {
var currentValue = $element.val();
var options = $element[0].options;
// FIXME: It may be necessary to set a particular value
var newValue = _.find(options, function (option) {
return option.value !== currentValue;
}).value;
$element.val(newValue).trigger($.Event("change"));
} else {
$element.trigger($.Event("click", { srcElement: $element }));
}
}
var url = new website.UrlParser(window.location.href);
if (tour.startPath && url.pathname !== tour.startPath) {
window.localStorage.setItem(testId, actionSteps[0].stepId);
window.location.href = tour.startPath;
} else {
var lastStepId = window.localStorage.getItem(testId);
var currentStep = actionSteps.shift();
if (lastStepId) {
while (currentStep && lastStepId !== currentStep.stepId) {
currentStep = actionSteps.shift();
}
}
setTimeout(function () {
executeStep(currentStep);
}, 0);
}
executeStep(actionSteps[currentIndex]);
},
});
reset: function () {
window.localStorage.removeItem(testId);
},
};
website.TestConsole.tests.push(test);
if (window.localStorage.getItem(testId)) {
test.run();
}
},
});
@@ -2,11 +2,11 @@
<t t-extend="website.editorbar">
<t t-jquery="#website-top-view" t-operation="after">
<div class="navbar-inner" id="website-top-edit">
<form class="navbar-form pull-left">
<form class="navbar-form pull-left text-muted">
<button type="button" data-action="save"
class="btn btn-primary">Save</button>
<button type="button" data-action="cancel"
class="btn">Discard</button>
or
<a href="#" data-action="cancel">Discard</a>
</form>
<ul class="nav navbar-nav pull-right">
</ul>
@@ -25,7 +25,8 @@
<div class="modal-footer">
<button type="button" class="btn btn-primary save">Save</button>
<button type="button" class="btn hidden wait" disabled="disabled"/>
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">Discard</button>
or
<a href="#" data-dismiss="modal" aria-hidden="true">Discard</a>
</div>
</div>
</div>
@@ -138,7 +139,7 @@
<div class="existing-attachments"/>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Discard</button>
<a href="#" data-dismiss="modal" aria-hidden="true">Discard</a>
</div>
</div>
</div>
@@ -187,7 +188,8 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger">Discard</button>
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
or
<a href="#" data-dismiss="modal" aria-hidden="true">Cancel</a>
</div>
</div>
</div>
@@ -57,7 +57,8 @@
-->
</div><div class="modal-footer">
<button type="button" data-action="update" class="btn btn-primary">Save</button>
<button data-action="discard" data-dismiss="modal" href="#" class="btn btn-default">Discard</button>
or
<a data-action="discard" data-dismiss="modal" href="#" >Discard</a>
</div>
</div>
</div>
+27 -30
View File
@@ -40,9 +40,7 @@
<a href="/page/website.contactus" class="btn btn-success btn-large">Contact us</a>
</p>
</div>
<div class="carousel-image hidden-xs">
<img src="/website/static/src/img/banner/banner_picture.png" alt="Banner OpenERP Image"/>
</div>
<img class="carousel-image hidden-xs" src="/website/static/src/img/banner/banner_picture.png" alt="Banner OpenERP Image"/>
</div>
</div>
</div>
@@ -304,10 +302,10 @@
<div class="content">
<div class="row">
<blockquote class="col-md-5 col-md-offset-4 mt64">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
@@ -322,7 +320,7 @@
<div class="content">
<div class="row">
<blockquote class="col-md-5 col-md-offset-4 mt64">
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
OpenERP provides essential platform for our project management.
Things are better organized and more visible with it.
@@ -349,7 +347,7 @@
<span class="oe_snippet_thumbnail_title">Well</span>
</div>
<div class="oe_snippet_body well">
Explain the benefit you offer. Don't write about products or
Explain the benefits you offer. Don't write about products or
services here, write about solutions.
</div>
</div>
@@ -362,8 +360,8 @@
</div>
<blockquote class="oe_snippet_body">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
@@ -380,9 +378,8 @@
<h3 class="panel-title">Feature Title</h3>
</div>
<div class="panel-body">
Panels are great to compare offers or to emphasize on
key features. To compare products, use panels inside
columns.
Panels are a great tool to compare offers or to emphasize on
key features. To compare products, use the inside columns.
</div>
</div>
</div>
@@ -656,8 +653,8 @@
<div class="col-md-4 col-md-offset-1 mt16 mb32">
<blockquote data-snippet-id="quote">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
@@ -741,12 +738,12 @@
<div class="content">
<div class="row">
<blockquote class="col-md-5 col-md-offset-4 mt64">
<p>
Write here a quote from one of your customer. Quotes are are
great way to give confidence in your products or services.
</p>
<small>Author of this quote</small>
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
Write a quote here from one of your customers. Quotes are a
great way to build confidence in your products or services.
</p>
<small>Author of this quote</small>
</blockquote>
</div>
@@ -759,12 +756,12 @@
<div class="content">
<div class="row">
<blockquote class="col-md-5 col-md-offset-4 mt64">
<p>
OpenERP provides essential platform for our project management.
Things are better organized and more visible with it.
</p>
<small>John Doe, CEO</small>
<blockquote class="mt48 mb16 col-md-4 col-md-offset-4">
<p>
OpenERP provides essential platform for our project management.
Things are better organized and more visible with it.
</p>
<small>John Doe, CEO</small>
</blockquote>
</div>
@@ -790,7 +787,7 @@
<div id="snippet_styles" class="hidden">
<div data-snippet-style-id='carousel-style' data-selector='div[data-snippet-id="carousel"]'>
<div data-snippet-style-id='carousel-style' data-selector="div[data-snippet-id='carousel']">
<li class="dropdown-submenu" data-required="true">
<a tabindex="-1" href="#">Layout</a>
<ul class="dropdown-menu">
@@ -801,7 +798,7 @@
</li>
</div>
<div data-snippet-style-id='size' data-selector='section[data-snippet-id="parallax"], div[data-snippet-id="carousel"], div[data-snippet-id="slider"]'>
<div data-snippet-style-id='size' data-selector="section[data-snippet-id='parallax'], div[data-snippet-id='carousel'], div[data-snippet-id='slider']">
<li class="dropdown-submenu" data-required="true">
<a tabindex="-1" href="#">Size</a>
<ul class="dropdown-menu">
@@ -813,7 +810,7 @@
</li>
</div>
<div data-snippet-style-id='background' data-selector='section, section[data-snippet-id="parallax"], div[data-snippet-id="carousel"]'>
<div data-snippet-style-id='background' data-selector="section, section[data-snippet-id='parallax'], div[data-snippet-id='carousel']">
<li class="dropdown-submenu">
<a tabindex="-1" href="#">Background</a>
<ul class="dropdown-menu">
+2 -2
View File
@@ -8,14 +8,14 @@
<template id="website.themes" name="Themes">
<t t-call="website.layout">
<div id="wrap" t-if="editable">
<div id="wrap" groups="base.group_website_publisher">
<div class="container">
<div class="alert alert-info mt32" t-if="theme_changed">
<button type="button" class="close" data-dismiss="alert">&amp;times;</button>
<p>
<h4>Theme Changed!</h4>
Have a look at <a href="/">your homepage</a> or try another theme bellow.
Have a look at <a href="/">your homepage</a> or try another theme below.
</p>
</div>
<h1 class="text-center">Try a New Theme</h1>
+99 -98
View File
@@ -28,98 +28,56 @@
</li>
</template>
<template id="secure_layout" name="Main: Don't Edit This Layout">&lt;!DOCTYPE html&gt;
<html t-att-lang="lang and lang.replace('_', '-')"
t-att-data-website-id="website.id if editable else None"
t-att-data-editable="'1' if editable else None"
t-att-data-translatable="'1' if translatable else None"
t-att-data-view-xmlid="xmlid if editable else None"
t-att-data-main-object="repr(main_object) if editable else None">
<head>
<t t-if="main_object and 'website_meta_title' in main_object">
<t t-set="title" t-value="main_object.website_meta_title"/>
</t>
<t t-if="not title and main_object and 'name' in main_object">
<t t-set="additional_title" t-value="main_object.name"/>
</t>
<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="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"/>
<template id="layout" name="Main layout">&lt;!DOCTYPE html&gt;
<html t-att-lang="lang and lang.replace('_', '-')"
t-att-data-website-id="website.id if editable else None"
t-att-data-editable="'1' if editable else None"
t-att-data-translatable="'1' if translatable else None"
t-att-data-view-xmlid="xmlid if editable else None"
t-att-data-main-object="repr(main_object) if editable else None">
<head>
<t t-if="main_object and 'website_meta_title' in main_object">
<t t-set="title" t-value="main_object.website_meta_title"/>
</t>
<t t-if="not title and main_object and 'name' in main_object">
<t t-set="additional_title" t-value="main_object.name"/>
</t>
<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="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"/>
<!-- Load stylesheets before scripts to avoid blocking -->
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
<t t-if="editable">
<link rel='stylesheet' href='/website/static/src/css/snippets.css'/>
<link rel='stylesheet' href='/website/static/src/css/editor.css'/>
<link rel='stylesheet' href='/website/static/lib/bootstrap-tour/bootstrap-tour.css'/>
</t>
<t t-call="website.theme"/>
<!-- Load stylesheets before scripts to avoid blocking -->
<link rel='stylesheet' href='/web/static/lib/fontawesome/css/font-awesome.css'/>
<t t-call="website.theme"/>
<script type="text/javascript" src="/web/static/lib/es5-shim/es5-shim.min.js"></script>
<script type="text/javascript" src="/web/static/lib/underscore/underscore.js"></script>
<script type="text/javascript" src="/web/static/lib/underscore.string/lib/underscore.string.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery.form/jquery.form.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript">
// Bootstrap and jQuery UI conflicts
$.fn.bstooltip = $.fn.tooltip;
$.fn.bsbutton = $.fn.button;
</script>
<script type="text/javascript" src="/web/static/lib/es5-shim/es5-shim.min.js"></script>
<script type="text/javascript" src="/web/static/lib/underscore/underscore.js"></script>
<script type="text/javascript" src="/web/static/lib/underscore.string/lib/underscore.string.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery/jquery.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript">
// Bootstrap and jQuery UI conflicts
$.fn.bstooltip = $.fn.tooltip;
$.fn.bsbutton = $.fn.button;
</script>
<script type="text/javascript" src="/web/static/lib/qweb/qweb2.js"></script>
<script type="text/javascript" src="/web/static/src/js/openerpframework.js"></script>
<script type="text/javascript" src="/web/static/lib/qweb/qweb2.js"></script>
<script type="text/javascript" src="/web/static/src/js/openerpframework.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.snippets.animation.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.snippets.animation.js"></script>
<t t-if="editable" id="editable_scripts_hook">
<link rel="stylesheet" href="/select2/static/lib/select2/select2.css"/>
<link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>
<link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
<script type="text/javascript" src="/select2/static/lib/select2/select2.js"></script>
<script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap-tour/bootstrap-tour.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/lib/ace/ace.js"></script>
<script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
<!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) -->
<script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script>
<script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script>
<script type="text/javascript" src='/website/static/lib/nearest/jquery.nearest.js'></script>
<script type="text/javascript" src="/website/static/lib/MutationObservers/MutationObserver.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.editor.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.menu.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.mobile.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.seo.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.tour.banner.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.snippets.editor.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.ace.js"></script>
<script t-if="translatable" type="text/javascript" src="/website/static/src/js/website.translator.js"></script>
</t>
<t t-raw="head or ''"/>
</head>
<body>
<div id="wrapwrap">
<t t-raw="0"/>
</div>
</body>
</html>
</template>
<template id="layout" name="Main layout">
<t t-call="website.secure_layout">
<t t-raw="head or ''"/>
</head>
<body>
<div id="wrapwrap">
<header>
<div class="navbar navbar-default navbar-static-top">
<div class="container">
@@ -130,7 +88,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Your<b>Company</b></a>
<a class="navbar-brand" href="/" t-field="res_company.name"/>
</div>
<div class="collapse navbar-collapse navbar-top-collapse">
<ul class="nav navbar-nav navbar-right" id="top_menu">
@@ -190,7 +148,7 @@
<small> - <a href="/page/website.aboutus">About us</a></small>
</h4>
<p>
We are a team of passionated people whose goal is to improve everyone's
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
@@ -207,7 +165,7 @@
<t t-esc="lg[1].split('/').pop()"/>
</a>
</li>
<li t-if="editable">
<li groups="base.group_website_publisher">
<t t-set="url_return" t-value="url_for(request.httprequest.path, '[lang]', keep_query='*')"/>
<a t-attf-href="/web#action=base.action_view_base_language_install&amp;website_id=#{website.id}&amp;url_return=#{url_return}">
<i class="fa fa-plus-circle"/>
@@ -228,9 +186,48 @@
</div>
</div>
</footer>
</t>
</div>
</body>
</html>
</template>
<template id="editor_head" inherit_id="website.layout" name="Editor" groups="base.group_website_publisher">
<xpath expr="//head" position="inside">
<link rel='stylesheet' href='/website/static/src/css/snippets.css'/>
<link rel='stylesheet' href='/website/static/src/css/editor.css'/>
<link rel='stylesheet' href='/website/static/lib/bootstrap-tour/bootstrap-tour.css'/>
<link rel="stylesheet" href="/select2/static/lib/select2/select2.css"/>
<link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>
<link rel='stylesheet' href="/web/static/lib/jquery.ui/css/smoothness/jquery-ui-1.9.1.custom.css"/>
<script type="text/javascript" src="/select2/static/lib/select2/select2.js"></script>
<script type="text/javascript" src="/web/static/lib/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/website/static/lib/bootstrap-tour/bootstrap-tour.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/lib/ace/ace.js"></script>
<script type="text/javascript" src="/website/static/lib/vkbeautify/vkbeautify.0.99.00.beta.js"></script>
<script type="text/javascript" src="/web/static/lib/jquery.ui/js/jquery-ui-1.9.1.custom.js"></script>
<!-- mutation observers shim backed by mutation events (8 < IE < 11, Safari < 6, FF < 14, Chrome < 17) -->
<script type="text/javascript" src="/website/static/lib//jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js"></script>
<script type="text/javascript" src="/website/static/lib/MutationObservers/test/sidetable.js"></script>
<script type="text/javascript" src='/website/static/lib/nearest/jquery.nearest.js'></script>
<script type="text/javascript" src="/website/static/lib/MutationObservers/MutationObserver.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.editor.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.menu.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.mobile.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.seo.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.tour.js"></script>
<script type="text/javascript" src="/website/static/src/js/website.tour.banner.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.snippets.editor.js"></script>
<script t-if="not translatable" type="text/javascript" src="/website/static/src/js/website.ace.js"></script>
<script t-if="translatable" type="text/javascript" src="/website/static/src/js/website.translator.js"></script>
</xpath>
</template>
<template id="show_sign_in" inherit_option_id="website.layout" inherit_id="website.layout" name="Show Sign In">
<xpath expr="//ul[@id='top_menu']" position="inside">
<li t-if="user_id.id == website.public_user.id">
@@ -276,16 +273,20 @@
</template>
<template id="publish_management">
<div t-if="editable" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
<div groups="base.group_website_publisher" t-ignore="true" class="pull-right css_editable_mode_hidden" t-att-style="style or ''">
<div t-attf-class="btn-group js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
<button t-attf-class="btn btn-#{object.website_published and 'success' or 'danger'} js_publish_btn">
<span class="css_publish">Not Published</span>
<span class="css_unpublish">Published</span>
</button>
<button class="btn btn-danger js_publish_btn">Not Published</button>
<button class="btn btn-success js_publish_btn">Published</button>
<button type="button" t-attf-class="btn btn-default dropdown-toggle" t-att-id="'dopprod-%s' % object.id" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
<li>
<a href="#" class="js_publish_btn">
<span class="css_unpublish">Unpublish</span>
<span class="css_publish">Publish</span>
</a>
</li>
<t t-raw="0"/>
<li t-if="publish_edit">
<a t-att-href="'/web#return_label=Website&amp;model=%s&amp;id=%s' % (object._name, object.id)"
@@ -297,7 +298,7 @@
</template>
<template id="publish_short">
<t t-if="editable" t-ignore="true">
<t groups="base.group_website_publisher" t-ignore="true">
<div t-attf-class="btn-group pull-right js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
<button t-attf-class="btn btn-sm btn-#{object.website_published and 'success' or 'danger'} js_publish_btn">
<span class="css_publish">Not Published</span>
@@ -398,7 +399,7 @@
<a class="btn btn-primary" t-attf-href="/pagenew/#{ path }">Create Page</a>
<span class="text-muted">or</span> <a href="/sitemap">Search a Page</a>
</div>
<div class="text-center text-muted">Edit the content bellow this line to adapt the default "page not found" page.</div>
<div class="text-center text-muted">Edit the content below this line to adapt the default "page not found" page.</div>
</div>
<hr/>
</t>
@@ -623,7 +624,7 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
<div class="row">
<div class="col-md-6 mt32">
<p>
We are a team of passionated people whose goal is to improve everyone's
We are a team of passionate people whose goal is to improve everyone's
life through disruptive products. We build great products to solve your
business problems.
</p>
@@ -21,7 +21,7 @@
<record id="action_open_website" model="ir.actions.act_url">
<field name="name">Website Blogs</field>
<field name="target">self</field>
<field name="url" eval="'/blog/'+str(ref('website_blog.blog_category_1'))+'/?blog-tutorial=true'"/>
<field name="url" eval="'/blog/'+str(ref('website_blog.blog_category_1'))+'/?tutorial.blog=true'"/>
</record>
<record id="base.open_menu" model="ir.actions.todo">
<field name="action_id" ref="action_open_website"/>
@@ -234,17 +234,17 @@
</record>
<record id="blog_post_3" model="blog.post">
<field name="name">Touchscreen Point of Sale</field>
<field name="name">Touchscreen Point of Sale for 6.1</field>
<field name="category_id" ref="blog_category_1"/>
<field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1'), ref('blog_tag_2')])]"/>
<field name="website_meta_keywords">Point of Sale, Hardware, Interface, Payment Terminal, Store</field>
<field name="website_meta_description">Point of Sale with no installation required that runs online and offline.</field>
<field name="content">
<![CDATA[<p>The brand new OpenERP touchscreen point of sale available with 6.1 allows you
<![CDATA[<p>The brand new OpenERP touchscreen point of sale is available with 6.1 which allows you
to manage your shop sales very easily. It's fully web based so that you don't
have to install or deploy any software and all the sales shops can be easily
consolidated. It works in connected and disconnected modes so that you can
continue to sell if you lose your internet connection.</p>
continue to sell even if you lose your internet connection.</p>
<img src="http://www.openerp.com/sites/default/files/fileattach/POS(2).png" alt="">
<h3>Here's a summary of its main features and benefits:</h3>
<ul>
@@ -272,7 +272,7 @@ Think of it as an out-of-the-box solution to boost your business' productivity.
</record>
<record id="blog_post_4" model="blog.post">
<field name="name">Announcig a New Partnership</field>
<field name="name">Announcing a New Partnership</field>
<field name="category_id" ref="blog_category_1"/>
<field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1')])]"/>
<field name="website_published" eval="True"/>
@@ -289,7 +289,7 @@ Think of it as an out-of-the-box solution to boost your business' productivity.
<p>
We are proud to announce a new partnership with
the company OpenERP. Their open source application suite
will allow us to reach new market, specifically in
will allow us to reach new markets, specifically in
the accounting area.
</p><p>
The full integration with the company inventory
@@ -51,11 +51,7 @@
title: "Which Blog?",
content: "Blog posts are organized in multiple categories (news, job offers, events, etc). Select <em>News</em> and click <em>Continue</em>.",
trigger: {
emitter: $('.modal select'),
id: 'change',
predicate: function ($el, value) {
return $el.find('[value='+value+']').text().toLowerCase() === 'news';
},
},
},
{
@@ -64,6 +60,7 @@
placement: 'right',
title: "Create Blog Post",
content: "Click <em>Continue</em> to create the blog post.",
trigger: 'click',
},
{
stepId: 'post-page',
@@ -89,7 +86,7 @@
},
{
stepId: 'drag-image-text',
element: '#website-top-navbar [data-snippet-id=image-text].ui-draggable',
snippet: 'image-text',
placement: 'bottom',
title: "Drag & Drop a Block",
content: "Drag the <em>'Image-Text'</em> block and drop it in your page.",
@@ -105,7 +102,7 @@
},
{
stepId: 'drag-text-block',
element: '#website-top-navbar [data-snippet-id=text-block].ui-draggable',
snippet: 'text-block',
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the <em>'Text Block'</em> block and drop it below the image block.",
@@ -117,11 +114,13 @@
placement: 'top',
title: "Edit an Area",
content: "Select any area of the page to modify it. Click on this subtitle.",
trigger: 'click',
trigger: {
id: 'snippet-activated',
}
},
{
stepId: 'remove-text-block-title',
element: '.oe_snippet_remove:last',
element: '.oe_active .oe_snippet_remove',
placement: 'top',
title: "Delete the Title",
content: "From this toolbar you can move, duplicate or delete the selected zone. Click on the cross to delete the title.",
@@ -137,7 +136,7 @@
},
{
stepId: 'publish-post',
element: 'button.js_publish_btn',
element: 'button.btn-danger.js_publish_btn',
placement: 'top',
title: "Publish Your Post",
content: "Your blog post is not yet published. You can update this draft version and publish it once you are ready.",
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="secure_layout" inherit_id="website.secure_layout">
<xpath expr="//t[@id='editable_scripts_hook']" position="inside">
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.editor.js" t-ignore="true"></script>
<script type="text/javascript" src="/website_blog/static/src/js/website.tour.blog.js" t-ignore="true"></script>
<template id="editor_head" inherit_id="website.editor_head" name="Blog Editor" groups="base.group_website_designer">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/website_blog/static/src/js/website_blog.editor.js"></script>
<script type="text/javascript" src="/website_blog/static/src/js/website.tour.blog.js"></script>
</xpath>
</template>
@@ -20,7 +20,7 @@
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure"/>
<section t-if="editable">
<section groups="base.group_website_publisher">
<div class="container text-center mt16">
<div class="alert alert-warning alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&amp;times;</button>
@@ -100,7 +100,7 @@
<h1>
No blog post yet!
</h1>
<p t-if="editable">
<p groups="base.group_website_publisher">
To create a new blog post, use the top-right menu <em>Content</em>
and select the menuitem <em>New Blog Post</em>.
</p>
@@ -167,7 +167,7 @@
<t t-call="website.publish_management">
<t t-set="object" t-value="blog_post"/>
<t t-set="publish_edit" t-value="True"/>
<li t-ignore="True">
<li>
<form class="duplicate hidden" action="/blogpost/duplicate">
<input name="blog_post_id" t-att-value="blog_post.id"/>
</form>
@@ -218,7 +218,7 @@
inherit_option_id="website_blog.blog_post_complete" inherit_id="website_blog.blog_post_complete"
groups="website_mail.group_comment">
<xpath expr="//ul[@id='comments-list']" position="after">
<section class="mb32">
<section class="mb32 css_editable_mode_hidden">
<form id="comment" t-attf-action="/blogpost/#{blog_post.id}/comment"
method="POST">
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
@@ -329,7 +329,7 @@
<section class="mt32">
<h4>About us</h4>
<p>
Write here a small text for <b>new visitors</b> finding your website
Write a small text here for when <b>new visitors</b> find your website
through your <b>blog entries</b>, referenced in Google.
</p>
<div>
@@ -44,14 +44,14 @@ class WebsiteCrmPartnerAssign(http.Controller):
pager = request.website.pager(url="/partners/", total=len(partner_ids), page=page, step=self._references_per_page, scope=7, url_args=post)
# search for partners to display
partner_ids = partner_obj.search(
request.cr, openerp.SUPERUSER_ID, partner_domain,
context=request.context,
limit=self._references_per_page, offset=pager['offset'],
order="grade_id ASC,partner_weight DESC")
google_map_partner_ids = ",".join([str(p) for p in partner_ids])
partners_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, partner_ids, website_partner.white_list, context=request.context)
partners_data = partner_obj.search_read(request.cr, openerp.SUPERUSER_ID,
domain=partner_domain,
fields=request.website.get_partner_white_list_fields(),
offset=pager['offset'],
limit=self._references_per_page,
order="grade_id DESC,partner_weight DESC",
context=request.context)
google_map_partner_ids = ",".join([str(p['id']) for p in partners_data])
# group by country
countries = partner_obj.read_group(
@@ -74,7 +74,7 @@ class WebsiteCrmPartnerAssign(http.Controller):
context=request.context, count=True)
grades.insert(0, {
'grade_id_count': grades_partners,
'grade_id': ("all", _("All Grades"))
'grade_id': ("all", _("All Levels"))
})
values = {
@@ -1 +1,2 @@
import res_partner
import website
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from openerp.osv import orm
class Website(orm.Model):
_inherit = 'website'
def get_partner_white_list_fields(self, cr, uid, ids, context=None):
fields = super(Website, self).get_partner_white_list_fields(cr, uid, ids, context=context)
fields += ["grade_id"]
return fields
@@ -81,6 +81,7 @@
<span t-esc="partner_data['grade_id'][1]"/> Partners
<t t-if="current_country"> in <t t-esc="current_country.name"/></t>
</h3>
<t t-set="internal_gid" t-value="partner_data['grade_id'][1]"/>
</t>
<div class="media thumbnail">
<a class="pull-left" t-href="/partners/#{ slug([partner_data.get('id'), partner_data.get('name')]) }/">
+3 -3
View File
@@ -62,7 +62,7 @@ class WebsiteCustomer(http.Controller):
cr, openerp.SUPERUSER_ID, domain,
limit=self._references_per_page, offset=pager['offset'], context=context)
partners_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, partner_ids, website_partner.white_list, context=request.context)
request.cr, openerp.SUPERUSER_ID, partner_ids, request.website.get_partner_white_list_fields(), context=request.context)
values = {
'countries': countries,
'current_country_id': country_id or 0,
@@ -84,11 +84,11 @@ class WebsiteCustomer(http.Controller):
if values['partner_data']['assigned_partner_id']:
values['assigned_partner_data'] = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, [values['partner_data']['assigned_partner_id'][0]],
website_partner.white_list, context=request.context)[0]
request.website.get_partner_white_list_fields(), context=request.context)[0]
if values['partner_data']['implemented_partner_ids']:
implemented_partners_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, values['partner_data']['implemented_partner_ids'],
website_partner.white_list, context=request.context)
request.website.get_partner_white_list_fields(), context=request.context)
values['implemented_partners_data'] = []
for data in implemented_partners_data:
if data.get('website_published'):
+1 -1
View File
@@ -11,7 +11,7 @@
<record id="action_open_website" model="ir.actions.act_url">
<field name="name">Website Home</field>
<field name="target">self</field>
<field name="url">/event?event-tutorial=true</field>
<field name="url">/event?tutorial.event=true</field>
</record>
<record id="base.open_menu" model="ir.actions.todo">
<field name="action_id" ref="action_open_website"/>
+9 -11
View File
@@ -18,8 +18,7 @@
<h4>to learn .JS development</h4>
</div>
<div class="carousel-image hidden-xs"><img alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png"></div>
<img class="carousel-image hidden-xs" alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png">
</div>
</div>
</div>
@@ -116,7 +115,7 @@
<div class="col-md-12 mb16 mt16" data-snippet-id="colmd">
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul><li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@@ -146,7 +145,7 @@
<div class="container oe_dark">
<div class="row">
<div class="col-md-12" data-snippet-id="colmd">
<h1 class="text-center">A great content...</h1>
<h1 class="text-center">Read Great Contents</h1>
<h3 class="text-muted text-center">What do people&nbsp;say about this course?</h3>
</div>
@@ -181,8 +180,7 @@
<h4>to learn .JS development</h4>
</div>
<div class="carousel-image hidden-xs"><img alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png"></div>
<img class="carousel-image hidden-xs" alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png">
</div>
</div>
</div>
@@ -279,7 +277,7 @@
<div class="col-md-12 mb16 mt16" data-snippet-id="colmd">
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul><li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@@ -309,7 +307,7 @@
<div class="container oe_dark">
<div class="row">
<div class="col-md-12" data-snippet-id="colmd">
<h1 class="text-center">A great content...</h1>
<h1 class="text-center">Read Great Contents</h1>
<h3 class="text-muted text-center">What do people&nbsp;say about this course?</h3>
</div>
@@ -357,7 +355,7 @@
<h4>to learn .JS development</h4>
</div>
<div class="carousel-image hidden-xs"><img alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png"></div>
<img class="carousel-image hidden-xs" alt="Banner OpenERP Image" src="/website/static/src/img/banner/banner_picture.png">
</div>
</div>
</div>
@@ -454,7 +452,7 @@
<div class="col-md-12 mb16 mt16" data-snippet-id="colmd">
<p><strong>Objectives:</strong></p>
<p>Having attended this course, participants should be able to:</p>
<p><strong>Having attended this course, participants should be able to:</strong></p>
<ul><li>Understand the development concepts and architecture;</li>
<li>Install and administer your own server;</li>
@@ -484,7 +482,7 @@
<div class="container oe_dark">
<div class="row">
<div class="col-md-12" data-snippet-id="colmd">
<h1 class="text-center">A great content...</h1>
<h1 class="text-center">Read Great Contents</h1>
<h3 class="text-muted text-center">What do people&nbsp;say about this course?</h3>
</div>
@@ -75,7 +75,7 @@
},
{
stepId: 'drag-banner',
element: '#website-top-navbar [data-snippet-id=carousel].ui-draggable',
snippet: 'carousel',
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the 'Banner' block and drop it in your page.",
@@ -91,7 +91,7 @@
},
{
stepId: 'drag-text-block',
element: '#website-top-navbar [data-snippet-id=text-block].ui-draggable',
snippet: 'text-block',
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the 'Text Block' block below the banner.",
@@ -107,7 +107,7 @@
},
{
stepId: 'drag-three-columns',
element: '#website-top-navbar [data-snippet-id=three-columns].ui-draggable',
snippet: 'three-columns',
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the 'Three Columns' block at the bottom.",
@@ -123,7 +123,7 @@
},
{
stepId: 'publish-event',
element: 'button.js_publish_btn',
element: 'button.btn-danger.js_publish_btn',
placement: 'top',
title: "Publish your event",
content: "Click to publish your event.",
@@ -131,7 +131,7 @@
},
{
stepId: 'customize-event',
element: '.js_publish_management button:last',
element: '.js_publish_management button#dopprod-8',
placement: 'left',
title: "Customize your event",
content: "Click here to customize your event further.",
@@ -145,6 +145,13 @@
content: "Click here to edit your event in the backend.",
trigger: 'click',
},
{
stepId: 'end-tutorial',
title: "Thanks!",
content: "This tutorial is finished. Congratulations on creating your first event.",
template: self.popover({ end: "Close Tutorial" }),
backdrop: true,
},
];
return this._super();
},
+26 -19
View File
@@ -2,10 +2,10 @@
<openerp>
<data>
<template id="secure_layout" inherit_id="website.secure_layout">
<xpath expr="//t[@id='editable_scripts_hook']" position="inside">
<script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js" t-ignore="true"></script>
<script type="text/javascript" src="/website_event/static/src/js/website.tour.event.js" t-ignore="true"></script>
<template id="editor_head" inherit_id="website.editor_head" name="Event Editor" groups="base.group_website_designer">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js"></script>
<script type="text/javascript" src="/website_event/static/src/js/website.tour.event.js"></script>
</xpath>
</template>
@@ -42,18 +42,7 @@
</span>
</h3>
<div class="row mt32 mb32">
<div class="col-md-3 col-sm-4 css_noprint" id="left_column">
<ul class="nav nav-pills nav-stacked">
<t t-foreach="dates" t-as="date">
<li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
<a t-href="/event/#{ search_path }&amp;date=#{ date[0] }"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
</a>
</li>
</t>
</ul>
</div>
<div class="col-sm-7 col-md-6" id="middle_column">
<div class="col-md-9" id="middle_column">
<t t-if="not event_ids">
<p t-if="current_date or current_country or current_type">
No event found in this category, check <a href="/event">all events</a>.
@@ -93,7 +82,7 @@
</li>
</ul>
</div>
<div class="col-sm-2 col-md-3 oe_structure" id="right_column">
<div class="col-md-3 oe_structure" id="right_column">
</div>
</div>
</div>
@@ -138,7 +127,25 @@
</xpath>
</template>
<template id="event_category" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Filter by Category">
<template id="event_left_column" inherit_option_id="website_event.index" name="Filters">
<xpath expr="//div[@id='middle_column']" position="attributes">
<attribute name="class">col-md-6</attribute>
</xpath>
<xpath expr="//div[@id='middle_column']" position="before">
<div class="col-md-3 css_noprint" id="left_column">
<ul class="nav nav-pills nav-stacked">
<t t-foreach="dates" t-as="date">
<li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
<a t-href="/event/#{ search_path }&amp;date=#{ date[0] }"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
</a>
</li>
</t>
</ul>
</div>
</xpath>
</template>
<template id="event_category" inherit_id="website_event.event_left_column" inherit_option_id="website_event.event_left_column" name="Filter by Category">
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-pills nav-stacked mt32">
<t t-foreach="types">
@@ -151,7 +158,7 @@
</ul>
</xpath>
</template>
<template id="event_location" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Filter by Country">
<template id="event_location" inherit_id="website_event.event_left_column" inherit_option_id="website_event.event_left_column" name="Filter by Country">
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-pills nav-stacked mt32">
<t t-foreach="countries">
@@ -49,7 +49,7 @@
</section>
<div class="row">
<div t-attf-class="col-md-#{(len(event.sponsor_ids) > 6) and 2 or (12/ len(event.sponsor_ids))} text-center" t-foreach="event.sponsor_ids" t-as="sponsor">
<a href="sponsor.partner_id.website or '#'" style="position: relative; display: inline-block;">
<a t-href="#{sponsor.partner_id and ('partners/%s/' % sponsor.partner_id.id) or '#'}" style="position: relative; display: inline-block;">
<span t-field="sponsor.partner_id.image"
t-field-options='{"widget": "image", "class": "shadow"}'/>
<div class="ribbon-wrapper">
@@ -7,9 +7,9 @@
<field name="description">Job Posts on your website</field>
</record>
<template id="secure_layout" inherit_id="website.secure_layout">
<xpath expr="//t[@id='editable_scripts_hook']" position="inside">
<script type="text/javascript" src="/website_hr_recruitment/static/src/js/website_hr_recruitment.editor.js" t-ignore="true"></script>
<template id="editor_head" inherit_id="website.editor_head" name="Jobs Editor" groups="base.group_website_designer">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/website_hr_recruitment/static/src/js/website_hr_recruitment.editor.js"></script>
</xpath>
</template>
+1 -1
View File
@@ -21,7 +21,7 @@
</div>
</template>
<template id="secure_layout" inherit_id="website.secure_layout" name="Mail customization">
<template id="head" inherit_id="website.layout" name="Mail customization">
<xpath expr="//head" position="inside">
<script type="text/javascript" src="/website_mail/static/src/js/website_mail.js"></script>
</xpath>
@@ -59,7 +59,7 @@ class WebsiteMembership(http.Controller):
google_map_partner_ids = ",".join(map(str, partner_ids))
partners_data = {}
for partner in partner_obj.read(cr, openerp.SUPERUSER_ID, partner_ids, website_partner.white_list, context=context):
for partner in partner_obj.read(cr, openerp.SUPERUSER_ID, partner_ids, request.website.get_partner_white_list_fields(), context=context):
partners_data[partner.get("id")] = partner
# format domain for group_by and memberships
+2 -4
View File
@@ -6,10 +6,8 @@ from openerp.addons.web.http import request
from openerp.addons.website.models import website
import werkzeug
white_list = ["grade_id", "name", "parent_id", 'website_short_description', "website_published",
"website_description", "tel", "fax", "image", "image_small", "image_medium"]
def get_partner_template_value(partner, add_white_list=None):
def get_partner_template_value(partner):
ctx = dict(request.context, show_address=True)
partner_obj = request.registry['res.partner']
partner_id = partner.id
@@ -18,7 +16,7 @@ def get_partner_template_value(partner, add_white_list=None):
partner = None
partner_data = partner_obj.read(
request.cr, openerp.SUPERUSER_ID, [partner_id], white_list + (add_white_list or []), context=ctx)[0]
request.cr, openerp.SUPERUSER_ID, [partner_id], request.website.get_partner_white_list_fields(), context=ctx)[0]
if not partner_data["website_published"]:
return None
+2 -1
View File
@@ -1,2 +1,3 @@
import res_partner
import res_company
import res_company
import website
+10
View File
@@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from openerp.osv import orm
class Website(orm.Model):
_inherit = 'website'
def get_partner_white_list_fields(self, cr, uid, ids, context=None):
return ["name", "parent_id", 'website_short_description', "website_published",
"website_description", "tel", "fax", "image", "image_small", "image_medium"]
@@ -54,7 +54,7 @@
<div class="col-md-8 mt32">
<t t-if="partner">
<div t-field="partner.website_description"/>
<t t-if="editable">
<t groups="base.group_website_publisher">
<h2 class="css_non_editable_mode_hidden">Short Description for List View</h2>
<div class="css_non_editable_mode_hidden" t-field="partner.website_short_description"/>
</t>
+2 -2
View File
@@ -173,8 +173,8 @@ class Ecommerce(http.Controller):
else:
domain.append(("value_id", "in", key_val[1:]))
att_ids = obj.search(request.cr, request.uid, domain, context=request.context)
att = obj.read(request.cr, request.uid, att_ids, ["product_id"], context=request.context)
return [r["product_id"][0] for r in att]
att = obj.read(request.cr, request.uid, att_ids, ["product_tmpl_id"], context=request.context)
return [r["product_tmpl_id"][0] for r in att]
@website.route(['/shop/pricelist'], type='http', auth="public", multilang=True)
def shop_promo(self, code, **post):
+1 -8
View File
@@ -35,17 +35,10 @@ class product_template(osv.Model):
_name = 'product.template'
def _website_url(self, cr, uid, ids, field_name, arg, context=None):
""" TDE-NOTE: as someone wrote this method without any clue on about what it
does, fixing bugs about product_variant_ids not existing will be done
based on the weather, the sun and Lilo's feelings about pigs.
If you see this comment in trunk, this means that the website branch has
been merged without any review, which is quite questionable. """
res = dict.fromkeys(ids, '')
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
for product in self.browse(cr, uid, ids, context=context):
if product.product_variant_ids:
res[product.id] = "%s/shop/product/%s/" % (base_url, product.product_variant_ids[0].id)
res[product.id] = "%s/shop/product/%s/" % (base_url, product.id)
return res
_columns = {
@@ -40,7 +40,7 @@ class attributes(osv.Model):
'name': fields.char('Name', size=64, translate=True, required=True),
'type': fields.selection([('distinct', 'Textual Value'), ('float', 'Numeric Value')], "Type", required=True),
'value_ids': fields.one2many('product.attribute.value', 'attribute_id', 'Values'),
'product_ids': fields.one2many('product.attribute.product', 'attribute_id', 'Products'),
'attr_product_ids': fields.one2many('product.attribute.product', 'attribute_id', 'Products'),
'float_max': fields.function(_get_float_max, type='float', string="Max", store={
'product.attribute.product': (_get_min_max, ['value','attribute_id'], 20),
@@ -60,7 +60,7 @@ class attributes_value(osv.Model):
_columns = {
'name': fields.char('Value', size=64, translate=True, required=True),
'attribute_id': fields.many2one('product.attribute', 'Attribute', required=True),
'product_ids': fields.one2many('product.attribute.product', 'value_id', 'Products'),
'atr_product_ids': fields.one2many('product.attribute.product', 'value_id', 'Products'),
}
class attributes_product(osv.Model):
@@ -70,7 +70,7 @@ class attributes_product(osv.Model):
'value': fields.float('Numeric Value'),
'value_id': fields.many2one('product.attribute.value', 'Textual Value'),
'attribute_id': fields.many2one('product.attribute', 'Attribute', required=True),
'product_id': fields.many2one('product.template', 'Product', required=True),
'product_tmpl_id': fields.many2one('product.template', 'Product', required=True),
'type': fields.related('attribute_id', 'type', type='selection',
selection=[('distinct', 'Distinct'), ('float', 'Float')], string='Type'),
@@ -83,5 +83,5 @@ class attributes_product(osv.Model):
class product_template(osv.Model):
_inherit = "product.template"
_columns = {
'website_attribute_ids': fields.one2many('product.attribute.product', 'product_id', 'Product Attributes'),
'website_attribute_ids': fields.one2many('product.attribute.product', 'product_tmpl_id', 'Product Attributes'),
}
@@ -5,6 +5,7 @@ access_product_category_,product.category.public,product.model_product_category,
access_product_category_public,product.category.public,product.model_product_public_category,base.group_public,1,0,0,0
access_product_pricelist_version_public,product.pricelist.version.public,product.model_product_pricelist_version,base.group_public,1,0,0,0
access_product_pricelist_public,product.pricelist.public,product.model_product_pricelist,base.group_public,1,0,0,0
access_product_pricelist_item_public,product.pricelist.item.public,product.model_product_pricelist_item,base.group_public,1,0,0,0
access_product_product_price_type_public,product.price.type.public,product.model_product_price_type,base.group_public,1,0,0,0
access_sale_order_public,sale.order.public,model_sale_order,base.group_public,1,0,0,0
access_sale_order_line_public,sale.order.line.public,model_sale_order_line,base.group_public,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_product_category_public product.category.public product.model_product_public_category base.group_public 1 0 0 0
6 access_product_pricelist_version_public product.pricelist.version.public product.model_product_pricelist_version base.group_public 1 0 0 0
7 access_product_pricelist_public product.pricelist.public product.model_product_pricelist base.group_public 1 0 0 0
8 access_product_pricelist_item_public product.pricelist.item.public product.model_product_pricelist_item base.group_public 1 0 0 0
9 access_product_product_price_type_public product.price.type.public product.model_product_price_type base.group_public 1 0 0 0
10 access_sale_order_public sale.order.public model_sale_order base.group_public 1 0 0 0
11 access_sale_order_line_public sale.order.line.public model_sale_order_line base.group_public 1 0 0 0
@@ -43,5 +43,6 @@
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
</data>
</openerp>
@@ -36,6 +36,26 @@
height: 100%;
}
.products_pager {
text-align: center;
}
.products_pager > div {
margin: 0 auto;
display: inline-block;
}
.products_pager > div > * {
vertical-align: middle;
float: none;
padding: 0;
}
.products_pager > div > ul {
padding-left: 10px;
}
.products_pager > ul {
margin-left: auto;
margin-right: auto;
}
/* ---- Default Styles Description ---- */
.oe_product .oe_product_image {
position: absolute;
@@ -149,14 +169,8 @@
display: inline-block;
}
.products_pager {
text-align: center;
margin: 10px 0;
}
.products_pager .pagination {
float: none !important;
margin: 0 !important;
padding: 0 !important;
margin: 5px auto !important;
}
}
@media (max-width: 400px) {
@@ -33,6 +33,21 @@
width: 100%
height: 100%
.products_pager
text-align: center
> div
margin: 0 auto
display: inline-block
> *
vertical-align: middle
float: none
padding: 0
> ul
padding-left: 10px
> ul
margin-left: auto
margin-right: auto
/* ---- Default Styles Description ---- */
.oe_product
@@ -136,12 +151,8 @@
height: 300px
display: inline-block
.products_pager
text-align: center
margin: 10px 0
.pagination
float: none !important
margin: 0 !important
padding: 0 !important
margin: 5px auto !important
@media (max-width: 400px)
#products_grid
@@ -355,4 +366,3 @@ ul.wizard li.text-primary .chevron:before
ul.wizard li:first-child
padding-left: 15px
border-radius: 4px 0 0 4px
@@ -113,7 +113,7 @@
},
{
stepId: 'drag-big-picture',
element: '#website-top-navbar [data-snippet-id=big-picture].ui-draggable',
snippet: 'big-picture',
placement: 'bottom',
title: "Drag & Drop a block",
content: "Drag the 'Big Picture' block and drop it in your page.",
@@ -130,12 +130,19 @@
},
{
stepId: 'publish-product',
element: 'button.js_publish_btn',
element: '.js_publish_management button.js_publish_btn.btn-danger',
placement: 'top',
title: "Publish your product",
content: "Click to publish your product so your customers can see it.",
trigger: 'click',
},
{
stepId: 'congratulations',
title: "Congratulations",
content: "Congratulations! You just created and published your first product.",
template: self.popover({ end: "Close Tutorial" }),
backdrop: true,
},
];
return this._super();
},
+38 -30
View File
@@ -4,10 +4,11 @@
<!-- Layout add nav and footer -->
<template id="secure_layout" inherit_id="website.secure_layout">
<xpath expr="//t[@id='editable_scripts_hook']" position="inside">
<script type="text/javascript" src="/website_sale/static/src/js/website_sale.editor.js" t-ignore="true"></script>
<script type="text/javascript" src="/website_sale/static/src/js/website.tour.shop.js" t-ignore="true"></script>
<template id="editor_head" inherit_id="website.editor_head" name="Shop Editor" groups="base.group_website_designer">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/website_sale/static/src/js/website_sale.editor.js"></script>
<script type="text/javascript" src="/website_sale/static/src/js/website.tour.shop.js"></script>
</xpath>
</template>
@@ -41,7 +42,12 @@
<template id="search" name="Search hidden fields">
<input type="hidden" name="category" t-att-value="search.get('category') or ''"/>
<input type="hidden" name="filters" t-att-value="search.get('filters') or ''"/>
<input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search.get('search') or ''"/>
<div class="input-group">
<input type="text" name="search" class="search-query form-control" placeholder="Search..." t-att-value="search.get('search') or ''"/>
<span class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="fa fa-search"/></button>
</span>
</div>
</template>
<template id="products_cart" name="Shopping cart">
@@ -88,18 +94,14 @@
<div id="wrap">
<div class="oe_structure"/>
<div class="container oe_website_sale">
<div class="row">
<div class="col-sm-8 products_pager">
<t t-call="website.pager">
<t t-set="classname">pull-right</t>
<t t-set="style">padding-left: 5px;</t>
</t>
<form action="/shop/" method="get" class="pull-right pagination form-inline" style="padding-right: 5px;">
<t t-call="website_sale.search" />
</form>
</div>
<div class="products_pager">
<div>
<form action="/shop/" method="get" class="pagination form-inline col-md-3">
<t t-call="website_sale.search" />
</form>
<t t-call="website.pager"/>
</div>
</div>
<div class='style_default row'>
<div class="hidden" id="products_grid_before"></div>
<div class="col-md-12" id="products_grid">
@@ -118,7 +120,7 @@
<div class="oe_product_cart" t-att-data-publish="product.website_published and 'on' or 'off'">
<div class="css_options" t-ignore="true" t-if="editable">
<div class="css_options" t-ignore="true" groups="base.group_website_publisher">
<div t-attf-class="dropdown js_options" t-att-data-id="product.id">
<a class="btn btn-default" t-att-id="'dopprod-%s' % product.id" role="button" data-toggle="dropdown">Options <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % product.id">
@@ -178,14 +180,18 @@
</tbody>
</table>
<t t-if="not bins">
<h3 class="text-center text-muted">No product found for this search</h3>
<div class="text-center text-muted">
<h3>No product found</h3>
<t groups="base.group_website_publisher">
<p>Click on "Content" to define a new product or "Help" for more informations.</p>
<p>In the backend's product form contains information to simplify the sale process: price, notes in the quotation, accounting data, procurement methods, etc.</p>
</t>
</div>
</t>
</div>
</div>
<div class="products_pager">
<t t-call="website.pager">
<t t-set="classname">pull-right</t>
</t>
<t t-call="website.pager"/>
</div>
</div>
<div class="oe_structure mb32"/>
@@ -253,13 +259,19 @@
<section class="container mt8">
<div class="row">
<div class="col-sm-5">
<div class="col-sm-4">
<ol class="breadcrumb">
<li><a href="/shop">Products</a></li>
<li t-if="search.get('category')"><a t-href="/shop/" t-keep-query="category,search,filters"><span t-field="category.name"/></a></li>
<li class="active"><span t-field="product.name"/></li>
</ol>
</div><div class="col-sm-3">
</div>
<div class="col-sm-3">
<form action="/shop/" method="get" class="pull-right">
<t t-call="website_sale.search" />
</form>
</div>
<div class="col-sm-4">
<t t-call="website.publish_management">
<t t-set="object" t-value="product"/>
<t t-set="publish_edit" t-value="True"/>
@@ -271,15 +283,11 @@
</ul>
</li>
</t>
</div><div class="col-sm-3 col-sm-offset-1">
<form action="/shop/" method="get" class="pull-right">
<t t-call="website_sale.search" />
</form>
</div>
</div>
</section>
<section class="container oe_website_sale mb16" id="product_detail">
<section class="container oe_website_sale" id="product_detail">
<div class="row">
<div class="col-sm-7 col-md-7 col-lg-7">
<span t-field="product.image" style="max-height: 500px" t-field-options='{"widget": "image", "class": "img img-responsive"}'/>
@@ -471,7 +479,7 @@
</th>
</tr>
<tr class="text-muted">
<td><abbr title="Taxes may be updated after providing shipping address">Incl. Taxes:</abbr></td>
<td><abbr title="Taxes may be updated after providing shipping address">Taxes:</abbr></td>
<td class="text-right">
<span t-field="website_sale_order.amount_tax" t-field-options='{
"widget": "monetary",
@@ -870,7 +878,7 @@
}'/></h3></th>
</tr>
<tr class="text-muted">
<td>Incl. Taxes:</td>
<td>Taxes:</td>
<td class="text-right"><span t-field="website_sale_order.amount_tax" t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
+1 -1
View File
@@ -11,7 +11,7 @@
<record id="action_open_website" model="ir.actions.act_url">
<field name="name">Website Shop</field>
<field name="target">self</field>
<field name="url">/shop?shop-tutorial=true</field>
<field name="url">/shop?tutorial.shop=true</field>
</record>
<record id="base.open_menu" model="ir.actions.todo">
<field name="action_id" ref="action_open_website"/>