mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-22 21:32:18 -06:00
[MIG] document_page_multi_company (#188)
* [MIG] document_page_multi_company Added this feature from the old module directly in document_page
This commit is contained in:
committed by
Pedro M. Baeza
parent
523a1c07ef
commit
a0998d406e
@@ -19,6 +19,16 @@ class DocumentPageHistory(models.Model):
|
||||
content = fields.Text()
|
||||
diff = fields.Text(compute='_compute_diff')
|
||||
|
||||
company_id = fields.Many2one(
|
||||
'res.company',
|
||||
'Company',
|
||||
help='If set, page is accessible only from this company',
|
||||
related='page_id.company_id',
|
||||
store=True,
|
||||
index=True,
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
@api.multi
|
||||
def _compute_diff(self):
|
||||
"""Shows a diff between this version and the previous version"""
|
||||
|
||||
Reference in New Issue
Block a user