summaryrefslogtreecommitdiff
path: root/addons/mrp/security
diff options
context:
space:
mode:
authoramoyaux <arm@odoo.com>2017-05-04 15:51:51 +0200
committeramoyaux <arm@odoo.com>2017-05-05 14:05:49 +0200
commitd193350c6f0348b5badd51d69ff2c840ae379a6a (patch)
treef7b4d4a9fe341ec55351a700bf053ff5537ae37a /addons/mrp/security
parent18c3dbc2e990531bf2ed411580a4e6a8ca0954b3 (diff)
[REF] mrp: ir.attachment handling
Rev[0] and [1] introduced a versioning on product's attachments through an ECO creation or through a stat button on the product form view. These revisions added some fields on the ir attachment model: a many2one and a boolean field with a default value, and due to concerns over the migration of databases with a lot of ir.attachment records (like ours), we adapted the implentation in rev[2][3]. We deemed reasonnable to remove the "active" field, as adding an active field not in the “base” module of the model could impact other modules that did not took into consideration this field. Also, this field only had a meaning when mrp_plm is installed, and ir.attachment is used in various places in contexts across Odoo. So, rev [2] and [3] changed the implementation of the versioning to only link ir.attachment to an ECO record, forgetting the functionality of archiving directly through the product form view stat button (without an ECO). To introduce back this behavior, we chose to create a model to handle the mrp attachments (named “mrp.document”) which inheritS ir.attachment. This way, we keep the behavior of ir.attachment and we do not alter the original table. This commit moved the priority field already set on ir.attachment to mrp.document and adds the active field that will be used in mrp_plm to archive/versioning purposes. linked commit: [0] https://github.com/odoo/enterprise/commit/99138b6711760a7562cb9559663aef6a4208a48f [1] https://github.com/odoo/enterprise/commit/4f88eb409776c1c4bc8f8d71d845b913c3604a54 [2] https://github.com/odoo/enterprise/commit/7e1c73cfc84cd23b6ba87dab713c3078de16568d [3] https://github.com/odoo/enterprise/commit/ee1c4b29b8872dac9c525fcc6acdf80b5ef73131
Diffstat (limited to 'addons/mrp/security')
-rw-r--r--addons/mrp/security/ir.model.access.csv2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/mrp/security/ir.model.access.csv b/addons/mrp/security/ir.model.access.csv
index 47a7e677285..e82ca628e9c 100644
--- a/addons/mrp/security/ir.model.access.csv
+++ b/addons/mrp/security/ir.model.access.csv
@@ -60,3 +60,5 @@ access_mrp_message_mrp_user,mrp.message,model_mrp_message,group_mrp_user,1,0,0,0
access_mrp_message_mrp_manager,mrp.message,model_mrp_message,group_mrp_manager,1,1,1,1
access_stock_move_lots,stock.move.lots,model_stock_move_lots,group_mrp_user,1,1,1,0
access_stock_move_lots_manager,stock.move.lots,model_stock_move_lots,group_mrp_manager,1,1,1,1
+access_mrp_document_mrp_manager,mrp.document group_user,model_mrp_document,group_mrp_manager,1,1,1,1
+access_mrp_document_mrp_user,mrp.document group_user,model_mrp_document,group_mrp_user,1,1,1,1 \ No newline at end of file