summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-02-07 12:32:32 +0100
committerChristophe Simonis <chs@odoo.com>2018-02-07 12:32:32 +0100
commit7f153c021a876e3cd697877a03542e8d910a6525 (patch)
tree3e8ed573f7bd99c2ffa4e854708cbab0314c74db /addons
parentd219963192b36ab43f9522244cadb9dcb11ab2fd (diff)
parent80f88ad63b81c1f56aa22251abbfdbbd7d4ebe63 (diff)
[MERGE] forward port branch 9.0 up to 80f88ad63b8
Diffstat (limited to 'addons')
-rw-r--r--addons/crm/models/crm_activity.py9
-rw-r--r--addons/point_of_sale/static/src/js/screens.js1
2 files changed, 6 insertions, 4 deletions
diff --git a/addons/crm/models/crm_activity.py b/addons/crm/models/crm_activity.py
index 4be550c5564..e23d5cffdaf 100644
--- a/addons/crm/models/crm_activity.py
+++ b/addons/crm/models/crm_activity.py
@@ -43,8 +43,9 @@ class CrmActivity(models.Model):
@api.multi
def unlink(self):
- activities = self.search([('subtype_id', '=', self.subtype_id.id)])
- # to ensure that the subtype is only linked the current activity
- if len(activities) == 1:
- self.subtype_id.unlink()
+ for activity in self:
+ activities = self.search([('subtype_id', '=', activity.subtype_id.id)])
+ # to ensure that the subtype is only linked the current activity
+ if len(activities) == 1:
+ activity.subtype_id.unlink()
return super(CrmActivity, self).unlink()
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index 4b6b142cac3..2d61f4b63a9 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -1985,6 +1985,7 @@ var PaymentScreenWidget = ScreenWidget.extend({
invoiced.fail(function(error){
self.invoicing = false;
+ order.finalized = false;
if (error.message === 'Missing Customer') {
self.gui.show_popup('confirm',{
'title': _t('Please select the Customer'),