[FIX]GOLEM Activity Registration Payment : fix cascade on wizard invoicing

This commit is contained in:
Fabien BOURGEOIS 2018-09-26 11:42:35 +02:00
parent 223bc581fd
commit 661aabcfe8
2 changed files with 6 additions and 4 deletions

View File

@ -20,7 +20,7 @@
'name': 'GOLEM Activity Member Registration Payments',
'summary': 'GOLEM Activities Member Registration Payments',
'description': 'GOLEM Activities Member Registration Payments',
'version': '10.0.0.4.0',
'version': '10.0.0.4.1',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',

View File

@ -29,9 +29,11 @@ class GolemActivityRegistrationInvoicingLine(models.TransientModel):
_description = 'GOLEM Activity Registration Invoicing Lines'
invoicing_id = fields.Many2one('golem.activity.registration.invoicing',
required=True)
registration_id = fields.Many2one('golem.activity.registration', required=True)
activity_id = fields.Many2one('golem.activity', required=True, readonly=True)
required=True, ondelete='cascade')
registration_id = fields.Many2one('golem.activity.registration', required=True,
ondelete='cascade')
activity_id = fields.Many2one('golem.activity', required=True, readonly=True,
ondelete='cascade')
price = fields.Monetary()
currency_id = fields.Many2one(related='activity_id.currency_id')