Use ondelete='CASCADE' for Record.

This commit is contained in:
Albert Cervera i Areny 2022-03-02 01:49:09 +01:00
parent ac58016542
commit 9af0ba0ada
2 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,8 @@ class Record(ModelSQL, ModelView):
required=True, readonly=True)
amount = fields.Numeric('Operation Amount', digits=(16, 2),
readonly=True)
invoice = fields.Many2One('account.invoice', 'Invoice', readonly=True)
invoice = fields.Many2One('account.invoice', 'Invoice', readonly=True,
ondelete='CASCADE')
party_record = fields.Many2One('aeat.347.report.party', 'Party Record',
readonly=True)
party_tax_identifier = fields.Many2One('party.identifier',

View File

@ -76,7 +76,7 @@ requires += get_requires('depends')
tests_require = [
get_require_version('proteus'),
]
tests_require += get_requires('extras_depend')
requires += [get_require_version('trytond_account'),get_require_version('trytond_account_invoice')]