[MERGE] forward port branch saas-14 up to bbb2f605094

This commit is contained in:
Christophe Simonis
2017-01-23 15:03:45 +01:00
+1 -1
View File
@@ -67,7 +67,7 @@ class SaleCouponProgram(models.Model):
@api.model
def create(self, vals):
program = super(SaleCouponProgram, self).create(vals)
if 'discount_line_product_id' not in vals:
if not vals.get('discount_line_product_id', False):
discount_line_product_id = self.env['product.product'].create({
'name': program.reward_id.name_get()[0][1],
'type': 'service',