mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-22 13:22:19 -06:00
[MIG] document_page_approval: Finish migration
Changes done: - Squash administrative commits - Purge translations - Remove ir.model.access.csv file - Improve tests (change to setUpClass) - Replace name_get() to _compute_display_name() (document_page) - Remove readonly=1 (redudant, it already is) defined in approved_uid and approved_date fields in views - Restore readonly=1 to the state field - Remove duplicate Back to draft button TT51529
This commit is contained in:
@@ -66,5 +66,7 @@ class DocumentPageHistory(models.Model):
|
||||
context=True,
|
||||
)
|
||||
|
||||
def name_get(self):
|
||||
return [(rec.id, "%s #%i" % (rec.page_id.name, rec.id)) for rec in self]
|
||||
@api.depends("page_id", "page_id.name")
|
||||
def _compute_display_name(self):
|
||||
for rec in self:
|
||||
rec.display_name = f"{rec.page_id.name} #{rec.id}"
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
<field name="name">Manager</field>
|
||||
<field name="category_id" ref="document_knowledge.module_category_knowledge" />
|
||||
<field name="implied_ids" eval="[(4, ref('group_document_editor'))]" />
|
||||
<field name="users" eval="[(4, ref('base.user_admin'))]" />
|
||||
<field
|
||||
name="users"
|
||||
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
|
||||
/>
|
||||
</record>
|
||||
<record model="ir.rule" id="document_page_rule">
|
||||
<field name="name">document_page multi-company</field>
|
||||
|
||||
Reference in New Issue
Block a user