[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:
Iván Todorovich
2018-09-17 11:37:57 -03:00
committed by mreficent
parent ae6338653d
commit 88c85037fb
5 changed files with 35 additions and 1 deletions

View File

@@ -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"""