diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-06-13 18:18:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-06-13 18:18:17 +0200 |
| commit | a0a11fd5e2d78e5fc0d1503275adade570fe0d42 (patch) | |
| tree | 242f15169ef336a0fa3027a82a463b681aebe71d | |
| parent | dad9265d69a2e9ab21ea37cc15f7cd5f5d93afcf (diff) | |
| parent | 8a19a6a2a34d318d2c5b799a0e8e108fe04a097c (diff) | |
[MERGE] forward port branch saas-11.3 up to 8a19a6a2a34
| -rw-r--r-- | addons/mail/static/src/js/composers/basic_composer.js | 1 | ||||
| -rw-r--r-- | addons/sale/models/sale.py | 1 | ||||
| -rw-r--r-- | addons/stock/data/stock_data.xml | 2 | ||||
| -rw-r--r-- | addons/stock/models/stock_quant.py | 2 | ||||
| -rw-r--r-- | odoo/addons/test_new_api/__manifest__.py | 4 | ||||
| -rw-r--r-- | odoo/http.py | 16 |
6 files changed, 17 insertions, 9 deletions
diff --git a/addons/mail/static/src/js/composers/basic_composer.js b/addons/mail/static/src/js/composers/basic_composer.js index 0e25b3cdccf..e9b60db0d62 100644 --- a/addons/mail/static/src/js/composers/basic_composer.js +++ b/addons/mail/static/src/js/composers/basic_composer.js @@ -447,6 +447,7 @@ var BasicComposer = Widget.extend({ }); attachments = attachments.concat(uploadAttachments); this.set('attachment_ids', attachments); + event.target.value = ""; }, /** * @private diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index d190f32f70d..1d4abad0c7b 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -1260,6 +1260,7 @@ class SaleOrderLine(models.Model): :param additional_domain: domain to restrict AAL to include in computation (required since timesheet is an AAL with a project ...) """ result = {} + # avoid recomputation if no SO lines concerned if not self: return result diff --git a/addons/stock/data/stock_data.xml b/addons/stock/data/stock_data.xml index e3487172f7c..f829035f416 100644 --- a/addons/stock/data/stock_data.xml +++ b/addons/stock/data/stock_data.xml @@ -14,6 +14,8 @@ <!-- Resource: stock.location --> + </data> + <data noupdate="1"> <record id="stock_location_locations" model="stock.location"> <field name="name">Physical Locations</field> <field name="usage">view</field> diff --git a/addons/stock/models/stock_quant.py b/addons/stock/models/stock_quant.py index 438b555a8cd..80bd07e9a80 100644 --- a/addons/stock/models/stock_quant.py +++ b/addons/stock/models/stock_quant.py @@ -428,5 +428,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 diff --git a/odoo/addons/test_new_api/__manifest__.py b/odoo/addons/test_new_api/__manifest__.py index e238f37f779..ec4bdae82bc 100644 --- a/odoo/addons/test_new_api/__manifest__.py +++ b/odoo/addons/test_new_api/__manifest__.py @@ -10,7 +10,9 @@ 'data': [ 'ir.model.access.csv', 'views.xml', - 'demo_data.xml', 'template.xml', ], + 'demo': [ + 'demo_data.xml', + ], } diff --git a/odoo/http.py b/odoo/http.py index d5650e4ef9b..06c7bbe86f8 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -280,13 +280,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 |
