[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

@@ -104,6 +104,14 @@ class DocumentPage(models.Model):
readonly=True,
)
company_id = fields.Many2one(
'res.company',
'Company',
help='If set, page is accessible only from this company',
index=True,
ondelete='cascade',
)
@api.multi
def _get_page_index(self, link=True):
"""Return the index of a document."""