[FIX]Memebr and Activity correct handling of inherits delegated

This commit is contained in:
Fabien Bourgeois 2016-07-08 21:49:21 +02:00
parent eabb116aa7
commit 357383eb7a
2 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,9 @@ class GolemActivity(models.Model):
_inherits = {'product.template': 'product_id'}
_rec_name = 'activity_name'
product_id = fields.Many2one('product.template', required=True,
ondelete='cascade')
# Copy the default code
default_code = fields.Char(copy=True)

View File

@ -49,6 +49,9 @@ class GolemMember(models.Model):
_inherit = 'mail.thread'
_inherits = {'res.partner': 'partner_id'}
partner_id = fields.Many2one('res.partner', required=True,
ondelete='cascade')
@api.model
def _default_season(self):
""" Get default season """