odoo-addon-mrp-attachment-mgmt 16.0.1.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/mrp_attachment_mgmt/README.rst +109 -0
- odoo/addons/mrp_attachment_mgmt/__init__.py +1 -0
- odoo/addons/mrp_attachment_mgmt/__manifest__.py +19 -0
- odoo/addons/mrp_attachment_mgmt/i18n/es.po +98 -0
- odoo/addons/mrp_attachment_mgmt/i18n/it.po +94 -0
- odoo/addons/mrp_attachment_mgmt/i18n/mrp_attachment_mgmt.pot +63 -0
- odoo/addons/mrp_attachment_mgmt/models/__init__.py +4 -0
- odoo/addons/mrp_attachment_mgmt/models/mrp_bom.py +33 -0
- odoo/addons/mrp_attachment_mgmt/models/mrp_production.py +10 -0
- odoo/addons/mrp_attachment_mgmt/models/mrp_workorder.py +24 -0
- odoo/addons/mrp_attachment_mgmt/models/product.py +35 -0
- odoo/addons/mrp_attachment_mgmt/readme/CONFIGURE.rst +3 -0
- odoo/addons/mrp_attachment_mgmt/readme/CONTRIBUTORS.rst +4 -0
- odoo/addons/mrp_attachment_mgmt/readme/DESCRIPTION.rst +2 -0
- odoo/addons/mrp_attachment_mgmt/readme/USAGE.rst +10 -0
- odoo/addons/mrp_attachment_mgmt/static/description/icon.png +0 -0
- odoo/addons/mrp_attachment_mgmt/static/description/index.html +448 -0
- odoo/addons/mrp_attachment_mgmt/tests/__init__.py +3 -0
- odoo/addons/mrp_attachment_mgmt/tests/common.py +93 -0
- odoo/addons/mrp_attachment_mgmt/tests/test_mrp_attachment_mgmt.py +40 -0
- odoo/addons/mrp_attachment_mgmt/views/mrp_bom_view.xml +22 -0
- odoo/addons/mrp_attachment_mgmt/views/mrp_production_views.xml +30 -0
- odoo/addons/mrp_attachment_mgmt/views/product_views.xml +39 -0
- odoo/addons/mrp_attachment_mgmt/views/workorder_attachments_views.xml +30 -0
- odoo_addon_mrp_attachment_mgmt-16.0.1.0.0.2.dist-info/METADATA +127 -0
- odoo_addon_mrp_attachment_mgmt-16.0.1.0.0.2.dist-info/RECORD +28 -0
- odoo_addon_mrp_attachment_mgmt-16.0.1.0.0.2.dist-info/WHEEL +5 -0
- odoo_addon_mrp_attachment_mgmt-16.0.1.0.0.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,109 @@
|
|
1
|
+
===================
|
2
|
+
Mrp Attachment Mgmt
|
3
|
+
===================
|
4
|
+
|
5
|
+
..
|
6
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
7
|
+
!! This file is generated by oca-gen-addon-readme !!
|
8
|
+
!! changes will be overwritten. !!
|
9
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
10
|
+
!! source digest: sha256:aa8781c1fbe86a94327f0904ae05e3bdb29653fef631ae1d22bd1bbf337d0dd1
|
11
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
12
|
+
|
13
|
+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
14
|
+
:target: https://odoo-community.org/page/development-status
|
15
|
+
:alt: Beta
|
16
|
+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
17
|
+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
18
|
+
:alt: License: AGPL-3
|
19
|
+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github
|
20
|
+
:target: https://github.com/OCA/manufacture/tree/16.0/mrp_attachment_mgmt
|
21
|
+
:alt: OCA/manufacture
|
22
|
+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
23
|
+
:target: https://translation.odoo-community.org/projects/manufacture-16-0/manufacture-16-0-mrp_attachment_mgmt
|
24
|
+
:alt: Translate me on Weblate
|
25
|
+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
26
|
+
:target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=16.0
|
27
|
+
:alt: Try me on Runboat
|
28
|
+
|
29
|
+
|badge1| |badge2| |badge3| |badge4| |badge5|
|
30
|
+
|
31
|
+
This module allows to get all attachments of a bill of materials (all levels) on a view.
|
32
|
+
This module allows to get all attachments of a work orders products to produce on a view.
|
33
|
+
|
34
|
+
**Table of contents**
|
35
|
+
|
36
|
+
.. contents::
|
37
|
+
:local:
|
38
|
+
|
39
|
+
Configuration
|
40
|
+
=============
|
41
|
+
|
42
|
+
To configure this module, you need to:
|
43
|
+
|
44
|
+
#. Go to *Manufacturing -> Configuration -> Settings* and check "Work Orders" option.
|
45
|
+
|
46
|
+
Usage
|
47
|
+
=====
|
48
|
+
|
49
|
+
#. Go to *Manufacturing -> Operation > Work Orders* and click in window open button (after the "Start" and "Block" options).
|
50
|
+
#. The smart-button "Attachments" display the attachments of the related product.
|
51
|
+
|
52
|
+
|
53
|
+
#. Go to *Manufacturing -> Products > Bill of material -> Desk Combination*.
|
54
|
+
#. Go to "Attachment" icon related to "Office Chair Black" component and upload some file.
|
55
|
+
#. The smart-button "Attachments" (from Bill of material) display the attachments of all components.
|
56
|
+
|
57
|
+
#. Go to *Manufacturing -> Products > Products -> Desk Combination*.
|
58
|
+
#. The smart-button "Bom Attachments" display the attachments of all components from Bill of material.
|
59
|
+
|
60
|
+
Bug Tracker
|
61
|
+
===========
|
62
|
+
|
63
|
+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
|
64
|
+
In case of trouble, please check there if your issue has already been reported.
|
65
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
66
|
+
`feedback <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_attachment_mgmt%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
67
|
+
|
68
|
+
Do not contact contributors directly about support or help with technical issues.
|
69
|
+
|
70
|
+
Credits
|
71
|
+
=======
|
72
|
+
|
73
|
+
Authors
|
74
|
+
~~~~~~~
|
75
|
+
|
76
|
+
* Tecnativa
|
77
|
+
|
78
|
+
Contributors
|
79
|
+
~~~~~~~~~~~~
|
80
|
+
|
81
|
+
* `Tecnativa <https://www.tecnativa.com>`_:
|
82
|
+
|
83
|
+
* Víctor Martínez
|
84
|
+
* Pedro M. Baeza
|
85
|
+
|
86
|
+
Maintainers
|
87
|
+
~~~~~~~~~~~
|
88
|
+
|
89
|
+
This module is maintained by the OCA.
|
90
|
+
|
91
|
+
.. image:: https://odoo-community.org/logo.png
|
92
|
+
:alt: Odoo Community Association
|
93
|
+
:target: https://odoo-community.org
|
94
|
+
|
95
|
+
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
96
|
+
mission is to support the collaborative development of Odoo features and
|
97
|
+
promote its widespread use.
|
98
|
+
|
99
|
+
.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
|
100
|
+
:target: https://github.com/victoralmau
|
101
|
+
:alt: victoralmau
|
102
|
+
|
103
|
+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
104
|
+
|
105
|
+
|maintainer-victoralmau|
|
106
|
+
|
107
|
+
This module is part of the `OCA/manufacture <https://github.com/OCA/manufacture/tree/16.0/mrp_attachment_mgmt>`_ project on GitHub.
|
108
|
+
|
109
|
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
@@ -0,0 +1 @@
|
|
1
|
+
from . import models
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Copyright 2022 Tecnativa - Víctor Martínez
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
{
|
4
|
+
"name": "Mrp Attachment Mgmt",
|
5
|
+
"version": "16.0.1.0.0",
|
6
|
+
"category": "Manufacturing",
|
7
|
+
"website": "https://github.com/OCA/manufacture",
|
8
|
+
"author": "Tecnativa, Odoo Community Association (OCA)",
|
9
|
+
"license": "AGPL-3",
|
10
|
+
"depends": ["mrp"],
|
11
|
+
"installable": True,
|
12
|
+
"data": [
|
13
|
+
"views/mrp_bom_view.xml",
|
14
|
+
"views/mrp_production_views.xml",
|
15
|
+
"views/product_views.xml",
|
16
|
+
"views/workorder_attachments_views.xml",
|
17
|
+
],
|
18
|
+
"maintainers": ["victoralmau"],
|
19
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
# Translation of Odoo Server.
|
2
|
+
# This file contains the translation of the following modules:
|
3
|
+
# * mrp_attachment_mgmt
|
4
|
+
#
|
5
|
+
msgid ""
|
6
|
+
msgstr ""
|
7
|
+
"Project-Id-Version: Odoo Server 14.0\n"
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
9
|
+
"POT-Creation-Date: 2022-03-08 10:18+0000\n"
|
10
|
+
"PO-Revision-Date: 2022-05-11 12:05+0000\n"
|
11
|
+
"Last-Translator: Víctor Martínez <victor.martinez@tecnativa.com>\n"
|
12
|
+
"Language-Team: \n"
|
13
|
+
"Language: es\n"
|
14
|
+
"MIME-Version: 1.0\n"
|
15
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
16
|
+
"Content-Transfer-Encoding: 8bit\n"
|
17
|
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18
|
+
"X-Generator: Weblate 4.3.2\n"
|
19
|
+
|
20
|
+
#. module: mrp_attachment_mgmt
|
21
|
+
#: code:addons/mrp_attachment_mgmt/models/mrp_workorder.py:0
|
22
|
+
#, python-format
|
23
|
+
msgid ""
|
24
|
+
"%d Product(s) without drawing:\n"
|
25
|
+
"%s"
|
26
|
+
msgstr ""
|
27
|
+
"%d Producto(s) sin dibujo:\n"
|
28
|
+
"%s"
|
29
|
+
|
30
|
+
#. module: mrp_attachment_mgmt
|
31
|
+
#: model:ir.actions.server,name:mrp_attachment_mgmt.action_see_workorder_attachments
|
32
|
+
#: model:ir.actions.server,name:mrp_attachment_mgmt.action_show_production_attachments
|
33
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_form_view
|
34
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_production_form_view
|
35
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.workorder_attachments_mrp_workorder_form_view
|
36
|
+
msgid "Attachments"
|
37
|
+
msgstr "Adjuntos"
|
38
|
+
|
39
|
+
#. module: mrp_attachment_mgmt
|
40
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_bom
|
41
|
+
msgid "Bill of Material"
|
42
|
+
msgstr "Lista de materiales"
|
43
|
+
|
44
|
+
#. module: mrp_attachment_mgmt
|
45
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_product_product_form_view
|
46
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_product_template_form_view
|
47
|
+
msgid "Bom Attachments"
|
48
|
+
msgstr "Adjuntos de Lista de Materiales"
|
49
|
+
|
50
|
+
#. module: mrp_attachment_mgmt
|
51
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_bom__display_name
|
52
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_production__display_name
|
53
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_workorder__display_name
|
54
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_product__display_name
|
55
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_template__display_name
|
56
|
+
msgid "Display Name"
|
57
|
+
msgstr "Nombre mostrado"
|
58
|
+
|
59
|
+
#. module: mrp_attachment_mgmt
|
60
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_bom__id
|
61
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_production__id
|
62
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_workorder__id
|
63
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_product__id
|
64
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_template__id
|
65
|
+
msgid "ID"
|
66
|
+
msgstr "ID"
|
67
|
+
|
68
|
+
#. module: mrp_attachment_mgmt
|
69
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_bom____last_update
|
70
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_production____last_update
|
71
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_workorder____last_update
|
72
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_product____last_update
|
73
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_template____last_update
|
74
|
+
msgid "Last Modified on"
|
75
|
+
msgstr "Última modificación el"
|
76
|
+
|
77
|
+
#. module: mrp_attachment_mgmt
|
78
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_product_product
|
79
|
+
msgid "Product"
|
80
|
+
msgstr "Producto"
|
81
|
+
|
82
|
+
#. module: mrp_attachment_mgmt
|
83
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_product_template
|
84
|
+
msgid "Product Template"
|
85
|
+
msgstr "Plantilla de producto"
|
86
|
+
|
87
|
+
#. module: mrp_attachment_mgmt
|
88
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_production
|
89
|
+
msgid "Production Order"
|
90
|
+
msgstr ""
|
91
|
+
|
92
|
+
#. module: mrp_attachment_mgmt
|
93
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_workorder
|
94
|
+
msgid "Work Order"
|
95
|
+
msgstr "Orden de trabajo"
|
96
|
+
|
97
|
+
#~ msgid "Documents"
|
98
|
+
#~ msgstr "Documentos"
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# Translation of Odoo Server.
|
2
|
+
# This file contains the translation of the following modules:
|
3
|
+
# * mrp_attachment_mgmt
|
4
|
+
#
|
5
|
+
msgid ""
|
6
|
+
msgstr ""
|
7
|
+
"Project-Id-Version: Odoo Server 14.0\n"
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
9
|
+
"PO-Revision-Date: 2023-04-10 19:24+0000\n"
|
10
|
+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
11
|
+
"Language-Team: none\n"
|
12
|
+
"Language: it\n"
|
13
|
+
"MIME-Version: 1.0\n"
|
14
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15
|
+
"Content-Transfer-Encoding: \n"
|
16
|
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
17
|
+
"X-Generator: Weblate 4.14.1\n"
|
18
|
+
|
19
|
+
#. module: mrp_attachment_mgmt
|
20
|
+
#: code:addons/mrp_attachment_mgmt/models/mrp_workorder.py:0
|
21
|
+
#, python-format
|
22
|
+
msgid ""
|
23
|
+
"%d Product(s) without drawing:\n"
|
24
|
+
"%s"
|
25
|
+
msgstr ""
|
26
|
+
"%d Prodotto(i) senza disegno:\n"
|
27
|
+
"%s"
|
28
|
+
|
29
|
+
#. module: mrp_attachment_mgmt
|
30
|
+
#: model:ir.actions.server,name:mrp_attachment_mgmt.action_see_workorder_attachments
|
31
|
+
#: model:ir.actions.server,name:mrp_attachment_mgmt.action_show_production_attachments
|
32
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_form_view
|
33
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_production_form_view
|
34
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.workorder_attachments_mrp_workorder_form_view
|
35
|
+
msgid "Attachments"
|
36
|
+
msgstr "Allegati"
|
37
|
+
|
38
|
+
#. module: mrp_attachment_mgmt
|
39
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_bom
|
40
|
+
msgid "Bill of Material"
|
41
|
+
msgstr "Distinta base"
|
42
|
+
|
43
|
+
#. module: mrp_attachment_mgmt
|
44
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_product_product_form_view
|
45
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_product_template_form_view
|
46
|
+
msgid "Bom Attachments"
|
47
|
+
msgstr "Allegati DiBa"
|
48
|
+
|
49
|
+
#. module: mrp_attachment_mgmt
|
50
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_bom__display_name
|
51
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_production__display_name
|
52
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_workorder__display_name
|
53
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_product__display_name
|
54
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_template__display_name
|
55
|
+
msgid "Display Name"
|
56
|
+
msgstr "Nome visualizzato"
|
57
|
+
|
58
|
+
#. module: mrp_attachment_mgmt
|
59
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_bom__id
|
60
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_production__id
|
61
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_workorder__id
|
62
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_product__id
|
63
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_template__id
|
64
|
+
msgid "ID"
|
65
|
+
msgstr "ID"
|
66
|
+
|
67
|
+
#. module: mrp_attachment_mgmt
|
68
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_bom____last_update
|
69
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_production____last_update
|
70
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_mrp_workorder____last_update
|
71
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_product____last_update
|
72
|
+
#: model:ir.model.fields,field_description:mrp_attachment_mgmt.field_product_template____last_update
|
73
|
+
msgid "Last Modified on"
|
74
|
+
msgstr "Ultima modifica il"
|
75
|
+
|
76
|
+
#. module: mrp_attachment_mgmt
|
77
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_product_product
|
78
|
+
msgid "Product"
|
79
|
+
msgstr "Prodotto"
|
80
|
+
|
81
|
+
#. module: mrp_attachment_mgmt
|
82
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_product_template
|
83
|
+
msgid "Product Template"
|
84
|
+
msgstr "Modello prodotto"
|
85
|
+
|
86
|
+
#. module: mrp_attachment_mgmt
|
87
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_production
|
88
|
+
msgid "Production Order"
|
89
|
+
msgstr "Ordine di produzione"
|
90
|
+
|
91
|
+
#. module: mrp_attachment_mgmt
|
92
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_workorder
|
93
|
+
msgid "Work Order"
|
94
|
+
msgstr "Ordine lavoro"
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Translation of Odoo Server.
|
2
|
+
# This file contains the translation of the following modules:
|
3
|
+
# * mrp_attachment_mgmt
|
4
|
+
#
|
5
|
+
msgid ""
|
6
|
+
msgstr ""
|
7
|
+
"Project-Id-Version: Odoo Server 16.0\n"
|
8
|
+
"Report-Msgid-Bugs-To: \n"
|
9
|
+
"Last-Translator: \n"
|
10
|
+
"Language-Team: \n"
|
11
|
+
"MIME-Version: 1.0\n"
|
12
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13
|
+
"Content-Transfer-Encoding: \n"
|
14
|
+
"Plural-Forms: \n"
|
15
|
+
|
16
|
+
#. module: mrp_attachment_mgmt
|
17
|
+
#. odoo-python
|
18
|
+
#: code:addons/mrp_attachment_mgmt/models/mrp_workorder.py:0
|
19
|
+
#, python-format
|
20
|
+
msgid ""
|
21
|
+
"%(error_count)d Product(s) without drawing:\n"
|
22
|
+
"%(error_msg)s"
|
23
|
+
msgstr ""
|
24
|
+
|
25
|
+
#. module: mrp_attachment_mgmt
|
26
|
+
#: model:ir.actions.server,name:mrp_attachment_mgmt.action_see_workorder_attachments
|
27
|
+
#: model:ir.actions.server,name:mrp_attachment_mgmt.action_show_production_attachments
|
28
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_form_view
|
29
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_production_form_view
|
30
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.workorder_attachments_mrp_workorder_form_view
|
31
|
+
msgid "Attachments"
|
32
|
+
msgstr ""
|
33
|
+
|
34
|
+
#. module: mrp_attachment_mgmt
|
35
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_bom
|
36
|
+
msgid "Bill of Material"
|
37
|
+
msgstr ""
|
38
|
+
|
39
|
+
#. module: mrp_attachment_mgmt
|
40
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_product_product_form_view
|
41
|
+
#: model_terms:ir.ui.view,arch_db:mrp_attachment_mgmt.mrp_bom_see_attachments_product_template_form_view
|
42
|
+
msgid "Bom Attachments"
|
43
|
+
msgstr ""
|
44
|
+
|
45
|
+
#. module: mrp_attachment_mgmt
|
46
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_product_template
|
47
|
+
msgid "Product"
|
48
|
+
msgstr ""
|
49
|
+
|
50
|
+
#. module: mrp_attachment_mgmt
|
51
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_product_product
|
52
|
+
msgid "Product Variant"
|
53
|
+
msgstr ""
|
54
|
+
|
55
|
+
#. module: mrp_attachment_mgmt
|
56
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_production
|
57
|
+
msgid "Production Order"
|
58
|
+
msgstr ""
|
59
|
+
|
60
|
+
#. module: mrp_attachment_mgmt
|
61
|
+
#: model:ir.model,name:mrp_attachment_mgmt.model_mrp_workorder
|
62
|
+
msgid "Work Order"
|
63
|
+
msgstr ""
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Copyright 2022 Tecnativa - Víctor Martínez
|
2
|
+
# Copyright 2023 Tecnativa - Pedro M. Baeza
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
4
|
+
from odoo import api, models
|
5
|
+
|
6
|
+
|
7
|
+
class MrpBom(models.Model):
|
8
|
+
_inherit = "mrp.bom"
|
9
|
+
|
10
|
+
@api.model
|
11
|
+
def _get_components_ids(self, products, recursive=False):
|
12
|
+
"""Gets an objet with the ids of the components, within two arrays:
|
13
|
+
'product_template_ids' and 'product_product_ids'.
|
14
|
+
Set recursive to get ids of child boms."""
|
15
|
+
product_ids = []
|
16
|
+
boms_per_product = super()._bom_find(products)
|
17
|
+
for bom in boms_per_product.values():
|
18
|
+
for bom_line_id in bom.bom_line_ids:
|
19
|
+
product_ids.append(bom_line_id.product_id.id)
|
20
|
+
if recursive:
|
21
|
+
subcomponents = self._get_components_ids(
|
22
|
+
bom_line_id.product_id,
|
23
|
+
recursive=recursive,
|
24
|
+
)
|
25
|
+
product_ids.extend(subcomponents)
|
26
|
+
return product_ids
|
27
|
+
|
28
|
+
def action_see_bom_documents(self):
|
29
|
+
product_ids = self._get_components_ids(
|
30
|
+
self.product_id or self.product_tmpl_id.product_variant_ids, True
|
31
|
+
)
|
32
|
+
products = self.env["product.product"].search([("id", "in", product_ids)])
|
33
|
+
return products._action_show_attachments()
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Copyright 2023 Tecnativa - Pedro M. Baeza
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3
|
+
from odoo import models
|
4
|
+
|
5
|
+
|
6
|
+
class MrpProduction(models.Model):
|
7
|
+
_inherit = "mrp.production"
|
8
|
+
|
9
|
+
def action_show_attachments(self):
|
10
|
+
return self.product_id._action_show_attachments()
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# Copyright 2021 Tecnativa - Víctor Martínez
|
2
|
+
# Copyright 2023 Tecnativa - Pedro M. Baeza
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
4
|
+
from odoo import _, models
|
5
|
+
from odoo.exceptions import UserError
|
6
|
+
|
7
|
+
|
8
|
+
class MrpWorkorder(models.Model):
|
9
|
+
_inherit = "mrp.workorder"
|
10
|
+
|
11
|
+
def action_see_workorder_attachments(self):
|
12
|
+
error = []
|
13
|
+
for product in self.mapped("product_id"):
|
14
|
+
if (
|
15
|
+
product.message_attachment_count == 0
|
16
|
+
and product.product_tmpl_id.message_attachment_count == 0
|
17
|
+
):
|
18
|
+
error.append(product.display_name)
|
19
|
+
if error:
|
20
|
+
raise UserError(
|
21
|
+
_("%(error_count)d Product(s) without drawing:\n%(error_msg)s")
|
22
|
+
% {"error_count": len(error), "error_msg": "\n".join(error)}
|
23
|
+
)
|
24
|
+
return self.product_id._action_show_attachments()
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright 2022 Tecnativa - Víctor Martínez
|
2
|
+
# Copyright 2023 Tecnativa - Pedro M. Baeza
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
4
|
+
from odoo import fields, models
|
5
|
+
|
6
|
+
|
7
|
+
class ProductTemplate(models.Model):
|
8
|
+
_inherit = "product.template"
|
9
|
+
|
10
|
+
def action_see_bom_documents(self):
|
11
|
+
return fields.first(self.bom_ids).action_see_bom_documents()
|
12
|
+
|
13
|
+
|
14
|
+
class ProductProduct(models.Model):
|
15
|
+
_inherit = "product.product"
|
16
|
+
|
17
|
+
def action_see_bom_documents(self):
|
18
|
+
return fields.first(self.bom_ids).action_see_bom_documents()
|
19
|
+
|
20
|
+
def _action_show_attachments(self):
|
21
|
+
"""Returns the action to show the attachments linked to the products
|
22
|
+
recordset or to their templates.
|
23
|
+
"""
|
24
|
+
domain = [
|
25
|
+
"|",
|
26
|
+
"&",
|
27
|
+
("res_model", "=", "product.product"),
|
28
|
+
("res_id", "in", self.ids),
|
29
|
+
"&",
|
30
|
+
("res_model", "=", "product.template"),
|
31
|
+
("res_id", "in", self.product_tmpl_id.ids),
|
32
|
+
]
|
33
|
+
action = self.env["ir.actions.actions"]._for_xml_id("base.action_attachment")
|
34
|
+
action.update({"domain": domain})
|
35
|
+
return action
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#. Go to *Manufacturing -> Operation > Work Orders* and click in window open button (after the "Start" and "Block" options).
|
2
|
+
#. The smart-button "Attachments" display the attachments of the related product.
|
3
|
+
|
4
|
+
|
5
|
+
#. Go to *Manufacturing -> Products > Bill of material -> Desk Combination*.
|
6
|
+
#. Go to "Attachment" icon related to "Office Chair Black" component and upload some file.
|
7
|
+
#. The smart-button "Attachments" (from Bill of material) display the attachments of all components.
|
8
|
+
|
9
|
+
#. Go to *Manufacturing -> Products > Products -> Desk Combination*.
|
10
|
+
#. The smart-button "Bom Attachments" display the attachments of all components from Bill of material.
|
Binary file
|