Attachment locking

attachment_lock
REPOSITORY
REPOSITORYOCA/knowledge
GIT
GIThttps://github.com/OCA/knowledge.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/knowledge/tree/8.0/attachment_lock
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYKnowledge Management
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSHolger Brunn
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/knowledge:
    - attachment_action
odoo/odoo:
    - web
    - base
    - knowledge
    - base_setup
    - web_kanban
    - document
    - mail
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
assets_backend attachment_lock assets ir.ui.view qweb Inherits web.assets_backend
view_ir_attachment_lock_form ir.attachment.lock form New
view_ir_attachment_lock_tree ir.attachment.lock tree New
Models touched (2)

New fields (3)
  • can_lock Boolean
    compute='_compute_locked'
  • lock_ids One2many → ir.attachment.lock
    args: 'ir.attachment.lock', 'attachment_id', 'Locks'
  • locked Boolean
    compute='_compute_locked'
Public methods (2)
  • lock(self, lock_type='exclusive', valid_until=None, data=None)
    @api.multi
  • unlock(self)
    @api.multi

New fields (6)
  • application Selection
    default='manual' required=True args: [('manual', 'Manual lock')]
  • attachment_id Many2one → ir.attachment
    index=True required=True args: 'ir.attachment', 'Attachment'
  • create_uid Many2one → res.users
    default=<expr> required=True args: 'res.users', 'User'
  • lock_type Selection
    default='shared' required=True string='Type' args: [('exclusive', 'Exclusive'), ('shared', 'Shared')]
  • shared_user_ids Many2many → res.users
    args: 'res.users'
  • valid_until Datetime
    default=fields.Datetime.to_string(<expr>) required=True
Public methods (0)

No public methods.