Skip to content

Commit afa216f

Browse files
committed
Merge PR #1368 into 16.0
Signed-off-by pedrobaeza
2 parents 160867c + 7d7f9fd commit afa216f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+8728
-0
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,17 @@ jobs:
3636
matrix:
3737
include:
3838
- container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
39+
include: "mrp_bom_version"
3940
name: test with Odoo
4041
- container: ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest
42+
include: "mrp_bom_version"
43+
name: test with OCB
44+
makepot: "true"
45+
- container: ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest
46+
exclude: "mrp_bom_version"
47+
name: test with Odoo
48+
- container: ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest
49+
exclude: "mrp_bom_version"
4150
name: test with OCB
4251
makepot: "true"
4352
services:
@@ -49,6 +58,9 @@ jobs:
4958
POSTGRES_DB: odoo
5059
ports:
5160
- 5432:5432
61+
env:
62+
INCLUDE: "${{ matrix.include }}"
63+
EXCLUDE: "${{ matrix.exclude }}"
5264
steps:
5365
- uses: actions/checkout@v3
5466
with:

mrp_bom_version/README.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
2+
:alt: License: AGPL-3
3+
4+
=================
5+
MRP - BoM Version
6+
=================
7+
8+
This module provides a state in the BoM whether to allow their use in
9+
manufacturing.
10+
11+
12+
Usage
13+
=====
14+
15+
The following states are defined:
16+
17+
* **Draft**:
18+
The form will be available for data entry, and may move to "active" state.
19+
* **Active**:
20+
You can modify all of the form fields except for the fields: routing, BoM
21+
lines, and the new field Active, for false default when you create a new BoM.
22+
The "active" state may be passed back to state "draft", if we mark the new
23+
field "Allow re-edit the BoM list", this new field is defined in
24+
*Configuration > Configuration > Manufacturing*. You can configure there also
25+
if those BoM will continue with active check marked as True or not.
26+
The active state may move to state "Historical".
27+
* **Historical**:
28+
This is the last state of the LdM, you can not change any field on the form.
29+
30+
When the MRP BoM list is put to active, a record of who has activated, and when
31+
will include in chatter/log. It also adds a constraint for the sequence field
32+
to be unique.
33+
34+
* **New version** :
35+
By clicking the button version, current BOM is moved to historical state,
36+
and a new BOM is creating based on this but with version number +1 and
37+
changing state to draft
38+
39+
40+
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
41+
:alt: Try me on Runbot
42+
:target: https://runbot.odoo-community.org/runbot/129/8.0
43+
44+
45+
Bug Tracker
46+
===========
47+
48+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
49+
In case of trouble, please check there if your issue has already been reported.
50+
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
51+
`here <https://github.com/OCA/manufacture/issues/new?body=module:%20mrp_bom_version%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
52+
53+
54+
Credits
55+
=======
56+
57+
Contributors
58+
------------
59+
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
60+
* Ana Juaristi <anajuaristi@avanzosc.es>
61+
* Alfredo de la Fuente <alfredodelafuente@avanzosc.es>
62+
* Oihane Crucelaegui <oihanecrucelaegui@avanzosc.es>
63+

mrp_bom_version/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# (c) 2015 Oihane Crucelaegui - AvanzOSC
2+
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
3+
4+
from . import models
5+
6+
7+
def set_active_bom_active_state(cr, registry):
8+
"""Set those active BoMs to state 'active'"""
9+
cr.execute(
10+
"""UPDATE mrp_bom
11+
SET state = 'active'
12+
WHERE active = True"""
13+
)

mrp_bom_version/__manifest__.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# (c) 2015 Alfredo de la Fuente - AvanzOSC
2+
# (c) 2015 Oihane Crucelaegui - AvanzOSC
3+
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
4+
5+
{
6+
"name": "MRP - BoM version",
7+
"summary": "BoM versioning",
8+
"version": "16.0.1.0.0",
9+
"license": "AGPL-3",
10+
"author": "OdooMRP team,"
11+
"AvanzOSC,"
12+
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
13+
"Odoo Community Association (OCA)",
14+
"website": "https://github.com/OCA/manufacture",
15+
"contributors": [
16+
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
17+
"Ana Juaristi <anajuaristi@avanzosc.es>",
18+
"Alfredo de la Fuente <alfredodelafuente@avanzosc.es>",
19+
"Oihane Crucelaegui <oihanecrucelaegui@avanzosc.es>",
20+
],
21+
"category": "Manufacturing",
22+
"depends": [
23+
"mrp",
24+
],
25+
"data": [
26+
"data/mrp_bom_data.xml",
27+
"security/mrp_bom_version_security.xml",
28+
"views/res_config_view.xml",
29+
"views/mrp_bom_view.xml",
30+
],
31+
"installable": True,
32+
"post_init_hook": "set_active_bom_active_state",
33+
}

mrp_bom_version/data/mrp_bom_data.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<odoo>
3+
<record id="mt_active" model="mail.message.subtype">
4+
<field name="name">MRP BoM Active</field>
5+
<field name="res_model">mrp.bom</field>
6+
<field name="default" eval="False" />
7+
<field name="description">MRP BoM Active</field>
8+
</record>
9+
</odoo>

mrp_bom_version/i18n/ar.po

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * mrp_bom_version
4+
#
5+
# Translators:
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: manufacture (8.0)\n"
9+
"Report-Msgid-Bugs-To: \n"
10+
"POT-Creation-Date: 2017-09-01 00:46+0000\n"
11+
"PO-Revision-Date: 2015-10-26 16:08+0000\n"
12+
"Last-Translator: <>\n"
13+
"Language-Team: Arabic (http://www.transifex.com/oca/OCA-manufacture-8-0/"
14+
"language/ar/)\n"
15+
"Language: ar\n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=UTF-8\n"
18+
"Content-Transfer-Encoding: \n"
19+
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
20+
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
21+
22+
#. module: mrp_bom_version
23+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
24+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
25+
msgid "Activate"
26+
msgstr ""
27+
28+
#. module: mrp_bom_version
29+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_search_view
30+
#: selection:mrp.bom,state:0
31+
msgid "Active"
32+
msgstr "نشِط"
33+
34+
#. module: mrp_bom_version
35+
#: field:mrp.config.settings,group_mrp_bom_version:0
36+
msgid "Allow to re-edit BoMs"
37+
msgstr ""
38+
39+
#. module: mrp_bom_version
40+
#: model:ir.model,name:mrp_bom_version.model_mrp_bom
41+
msgid "Bill of Material"
42+
msgstr ""
43+
44+
#. module: mrp_bom_version
45+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
46+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
47+
#: selection:mrp.bom,state:0
48+
msgid "Draft"
49+
msgstr "مسوّدة"
50+
51+
#. module: mrp_bom_version
52+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_search_view
53+
msgid "Group By..."
54+
msgstr ""
55+
56+
#. module: mrp_bom_version
57+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
58+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
59+
#: selection:mrp.bom,state:0
60+
msgid "Historical"
61+
msgstr ""
62+
63+
#. module: mrp_bom_version
64+
#: field:mrp.bom,historical_date:0
65+
msgid "Historical Date"
66+
msgstr ""
67+
68+
#. module: mrp_bom_version
69+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_search_view
70+
msgid "Inactive"
71+
msgstr ""
72+
73+
#. module: mrp_bom_version
74+
#: field:mrp.config.settings,active_draft:0
75+
msgid "Keep re-editing BoM active"
76+
msgstr ""
77+
78+
#. module: mrp_bom_version
79+
#: model:mail.message.subtype,description:mrp_bom_version.mt_active
80+
#: model:mail.message.subtype,name:mrp_bom_version.mt_active
81+
msgid "MRP BoM Active"
82+
msgstr ""
83+
84+
#. module: mrp_bom_version
85+
#: model:res.groups,name:mrp_bom_version.group_mrp_bom_version
86+
msgid "MRP BoM version"
87+
msgstr ""
88+
89+
#. module: mrp_bom_version
90+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
91+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
92+
msgid "New version"
93+
msgstr ""
94+
95+
#. module: mrp_bom_version
96+
#: field:mrp.bom,old_versions:0
97+
msgid "Old Versions"
98+
msgstr ""
99+
100+
#. module: mrp_bom_version
101+
#: field:mrp.bom,parent_bom:0
102+
msgid "Parent BoM"
103+
msgstr ""
104+
105+
#. module: mrp_bom_version
106+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_search_view
107+
#: field:mrp.bom,state:0
108+
msgid "State"
109+
msgstr ""
110+
111+
#. module: mrp_bom_version
112+
#: help:mrp.config.settings,group_mrp_bom_version:0
113+
msgid "The active state may be passed back to state draft"
114+
msgstr ""
115+
116+
#. module: mrp_bom_version
117+
#: help:mrp.config.settings,active_draft:0
118+
msgid ""
119+
"This will allow you to define if those BoM passed back to draft are still "
120+
"activated or not"
121+
msgstr ""
122+
123+
#. module: mrp_bom_version
124+
#: field:mrp.bom,version:0
125+
msgid "Version"
126+
msgstr ""
127+
128+
#. module: mrp_bom_version
129+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
130+
msgid "Versions"
131+
msgstr ""
132+
133+
#. module: mrp_bom_version
134+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
135+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
136+
msgid "You are going to create a new version of this BoM. Are you sure?"
137+
msgstr ""
138+
139+
#. module: mrp_bom_version
140+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
141+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
142+
msgid ""
143+
"You are going to historize an BoM. Doing, not be able to unlock it unless "
144+
"you make a copy. Are you sure you want to proceed?"
145+
msgstr ""
146+
147+
#. module: mrp_bom_version
148+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_form_view
149+
#: view:mrp.bom:mrp_bom_version.mrp_bom_version_tree_view
150+
msgid ""
151+
"You will activate the BoM. If you haven't set a route yet, then you won't be "
152+
"able to do it after this. Are you sure you want to proceed?"
153+
msgstr ""

0 commit comments

Comments
 (0)