[FIX] sale_service_rating: rating of issue

* When an issue was set in stage that has a rating email template
  and that the project was set on 'rating when changing state',
  there was a warning with Failed to render template.
  There was a small error in a condition that fired exception.
This commit is contained in:
Dhaval Suthar
2016-08-26 11:35:41 +02:00
committed by Pierre Masereel
parent 4ccc1f9bc8
commit 5cef19c165
+1 -1
View File
@@ -8,6 +8,6 @@ class Task(models.Model):
_inherit = 'project.task'
def rating_get_partner_id(self):
if self.partner_id or self.self.order_id.partner_id:
if self.partner_id or self.sale_line_id.order_id.partner_id:
return self.partner_id or self.sale_line_id.order_id.partner_id
return super(Task, self).rating_get_partner_id()