[FIX] sale_timesheet : sale_line_id field not exist in sale.order.line

This commit is contained in:
Mehul Patel
2017-11-28 11:45:22 +01:00
committed by jem-odoo
parent ef2a3b1342
commit bf6894c5b1
+1 -1
View File
@@ -199,7 +199,7 @@ class SaleOrderLine(models.Model):
account = self.order_id.analytic_account_id
project = Project.search([('analytic_account_id', '=', account.id)], limit=1)
if not project:
project_name = '%s (%s)' % (account.name, self.sale_line_id.order_partner_id.ref) if self.sale_line_id.order_partner_id.ref else account.name
project_name = '%s (%s)' % (account.name, self.order_partner_id.ref) if self.order_partner_id.ref else account.name
project_id = account.sudo().project_create({
'name': project_name,
'allow_timesheets': self.product_id.service_type == 'timesheet',