diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 08dca1c4ca4..11432db99c4 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -141,7 +141,7 @@ class mrp_repair(osv.osv): 'location_id': fields.many2one('stock.location', 'Current Location', select=True, required=True, readonly=True, states={'draft': [('readonly', False)], 'confirmed': [('readonly', True)]}), 'location_dest_id': fields.many2one('stock.location', 'Delivery Location', readonly=True, required=True, states={'draft': [('readonly', False)], 'confirmed': [('readonly', True)]}), 'lot_id': fields.many2one('stock.production.lot', 'Repaired Lot', domain="[('product_id','=', product_id)]", help="Products repaired are all belonging to this lot", oldname="prodlot_id"), - 'guarantee_limit': fields.date('Warranty Expiration', help="The warranty expiration limit is computed as: last move date + warranty defined on selected product. If the current date is below the warranty expiration limit, each operation and fee you will add will be set as 'not to invoiced' by default. Note that you can change manually afterwards.", states={'confirmed': [('readonly', True)]}), + 'guarantee_limit': fields.date('Warranty Expiration', states={'confirmed': [('readonly', True)]}), 'operations': fields.one2many('mrp.repair.line', 'repair_id', 'Operation Lines', readonly=True, states={'draft': [('readonly', False)]}, copy=True), 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', help='Pricelist of the selected partner.'), 'partner_invoice_id': fields.many2one('res.partner', 'Invoicing Address'), diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index 7c22c8307a7..35827cbc04d 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -306,12 +306,12 @@ class sale_order_line(osv.osv): return res # set product uom in context to get virtual stock in current uom - if res.get('value', {}).get('product_uom'): + if 'product_uom' in res.get('value', {}): # use the uom changed by super call - context.update({'uom': res['value']['product_uom']}) + context = dict(context, uom=res['value']['product_uom']) elif uom: # fallback on selected - context.update({'uom': uom}) + context = dict(context, uom=uom) #update of result obtained in super function product_obj = product_obj.browse(cr, uid, product, context=context) diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index e2c00a789bd..828bcbbfa98 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from datetime import datetime +import werkzeug.exceptions import werkzeug.urls import werkzeug.wrappers import simplejson @@ -188,6 +189,11 @@ class WebsiteForum(http.Controller): @http.route(['''/forum//question/= self.forum_id.karma_ask self.can_answer = user.karma >= self.forum_id.karma_answer @@ -309,6 +313,7 @@ class Post(models.Model): self.can_downvote = user.karma >= self.forum_id.karma_downvote self.can_comment = user.karma >= self.karma_comment self.can_comment_convert = user.karma >= self.karma_comment_convert + self.can_view = user.karma >= self.karma_close or post.create_uid.karma > 0 @api.one @api.constrains('post_type', 'forum_id') diff --git a/addons/website_partner/models/res_partner.py b/addons/website_partner/models/res_partner.py index 397d2bbd22f..cad7000a79a 100644 --- a/addons/website_partner/models/res_partner.py +++ b/addons/website_partner/models/res_partner.py @@ -25,7 +25,8 @@ class WebsiteResPartner(osv.Model): _get_private, fnct_inv=_set_private, fnct_search=_search_private, type='boolean', string='Private Profile'), 'website_description': fields.html( - 'Website Partner Full Description' + 'Website Partner Full Description', + strip_style=True ), 'website_short_description': fields.text( 'Website Partner Short Description' diff --git a/openerp/addons/test_new_api/tests/test_related.py b/openerp/addons/test_new_api/tests/test_related.py index b2b65e8b373..b7bb773c056 100644 --- a/openerp/addons/test_new_api/tests/test_related.py +++ b/openerp/addons/test_new_api/tests/test_related.py @@ -146,7 +146,7 @@ class TestHtmlField(common.TransactionCase): % if object.some_field and not object.oriented: % if object.other_field: - + ${object.mako_thing} @@ -173,5 +173,11 @@ class TestHtmlField(common.TransactionCase): # sanitize should have closed tags left open in the original html self.assertIn('
', partner.comment, 'Error in HTML field: content does not seem to have been sanitized despise sanitize=True') self.assertIn('', partner.comment, 'Error in HTML field: content does not seem to have been sanitized despise sanitize=True') + self.assertIn('