[MERGE] forward port branch 11.0 up to 242e485b4a

This commit is contained in:
Christophe Simonis
2019-06-12 19:18:42 +02:00
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -470,5 +470,5 @@ class QuantPackage(models.Model):
for quant in self._get_contained_quants():
if quant.product_id not in res:
res[quant.product_id] = 0
res[quant.product_id] += quant.qty
res[quant.product_id] += quant.quantity
return res
+3 -1
View File
@@ -10,7 +10,9 @@
'data': [
'ir.model.access.csv',
'views.xml',
'demo_data.xml',
'template.xml',
],
'demo': [
'demo_data.xml',
],
}
+9 -7
View File
@@ -278,13 +278,15 @@ class WebRequest(object):
_request_stack.pop()
if self._cr:
if exc_type is None and not self._failed:
self._cr.commit()
if self.registry:
self.registry.signal_changes()
elif self.registry:
self.registry.reset_changes()
self._cr.close()
try:
if exc_type is None and not self._failed:
self._cr.commit()
if self.registry:
self.registry.signal_changes()
elif self.registry:
self.registry.reset_changes()
finally:
self._cr.close()
# just to be sure no one tries to re-use the request
self.disable_db = True
self.uid = None