[FIX]GOLEM Activity Session : default_code belong to product template, not session

This commit is contained in:
Fabien Bourgeois 2016-09-09 12:03:34 +02:00
parent 082b450b19
commit d135d09661

View File

@ -54,6 +54,8 @@ class ProductTemplate(models.Model):
# Make default service for type
type = fields.Selection(default='service')
# Copy the default code
default_code = fields.Char(copy=True)
class GolemActivitySession(models.Model):
@ -69,7 +71,6 @@ class GolemActivitySession(models.Model):
product_id = fields.Many2one('product.template', required=True,
ondelete='cascade')
default_code = fields.Char(copy=True) # Copy the default code
@api.model
def _default_name(self):