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'),