2023-09-28 16:44:08 -04:00
|
|
|
from odoo import models, fields, api, _
|
2023-10-05 15:51:36 -04:00
|
|
|
from odoo.exceptions import UserError
|
2023-09-28 16:44:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class DocumentRevisionSequence(models.Model):
|
|
|
|
|
_inherit = 'ir.sequence'
|
2023-10-05 15:51:36 -04:00
|
|
|
# Would prefer to inherit and make a new model, but the way ir.sequence is
|
|
|
|
|
# implemented has a lot of hard coded references to "ir.sequence" for all the
|
|
|
|
|
# database operations.
|
2023-09-28 16:44:08 -04:00
|
|
|
|
2023-10-05 15:51:36 -04:00
|
|
|
document_id = fields.Many2one('documents.document', 'Document',
|
|
|
|
|
ondelete='cascade')
|