diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 409551585fa..3e86c4963b7 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -432,7 +432,7 @@ class account_invoice(osv.osv):
if t['state'] in ('draft', 'cancel') and t['internal_number']== False:
unlink_ids.append(t['id'])
else:
- raise osv.except_osv(_('Invalid Action!'), _('You cannot delete an invoice which is open or paid. You should refund it instead.'))
+ raise osv.except_osv(_('Invalid Action!'), _('You can not delete an invoice which is not cancelled. You should refund it instead.'))
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
return True
diff --git a/addons/account_bank_statement_extensions/account_bank_statement_view.xml b/addons/account_bank_statement_extensions/account_bank_statement_view.xml
index 3d5560856a3..adc2963c803 100644
--- a/addons/account_bank_statement_extensions/account_bank_statement_view.xml
+++ b/addons/account_bank_statement_extensions/account_bank_statement_view.xml
@@ -72,12 +72,12 @@
-
+
-
-
+
+
@@ -100,8 +100,8 @@
-
-
+
+
diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py
index 45ab0c4fbb1..54284dee4da 100644
--- a/addons/audittrail/audittrail.py
+++ b/addons/audittrail/audittrail.py
@@ -346,8 +346,13 @@ class audittrail_objects_proxy(object_proxy):
x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
x2m_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, x2m_model_id)
- #recursive call on x2m fields that need to be checked too
- data.update(self.get_data(cr, SUPERUSER_ID, pool, resource[field], x2m_model, method))
+ field_resource_ids = list(set(resource[field]))
+ if model.model == x2m_model.model:
+ # we need to remove current resource_id from the many2many to prevent an infinit loop
+ if resource_id in field_resource_ids:
+ field_resource_ids.remove(resource_id)
+ data.update(self.get_data(cr, SUPERUSER_ID, pool, field_resource_ids, x2m_model, method))
+
data[(model.id, resource_id)] = {'text':values_text, 'value': values}
return data
@@ -408,6 +413,10 @@ class audittrail_objects_proxy(object_proxy):
x2m_new_values_ids = new_values.get(key, {'value': {}})['value'].get(field_name, [])
# We use list(set(...)) to remove duplicates.
res_ids = list(set(x2m_old_values_ids + x2m_new_values_ids))
+ if model.model == x2m_model.model:
+ # we need to remove current resource_id from the many2many to prevent an infinit loop
+ if resource_id in res_ids:
+ res_ids.remove(resource_id)
for res_id in res_ids:
lines.update(self.prepare_audittrail_log_line(cr, SUPERUSER_ID, pool, x2m_model, res_id, method, old_values, new_values, field_list))
# if the value value is different than the old value: record the change
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 9c2a672caf7..cf22fb44b58 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -283,10 +283,11 @@
stock.tracking
child_ids
-
+
+