Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4ccb4af
[NEW mrp_bom_version]
Oct 23, 2014
4b95997
[IMP mrp_bom_version]
Oct 28, 2014
51ea2d6
[FIX] Pylint fixing <mrp_bom_version>
oihane Nov 13, 2014
64d9d5f
[MOD] Issue #528
oihane Jan 13, 2015
c56c3a9
[MOD] Changed default not recalculated, if copy is not set to false
oihane Jan 13, 2015
6d055f8
[IMP mrp_bom_version]
Jan 14, 2015
8443502
[IMP] mrp_bom_version: renamed module mrp_bom_state to mrp_bom_version
InakiZabala May 25, 2015
24c6b64
[IMP] <mrp_bom_version> Renamed file
oihane Jun 2, 2015
51653f0
[IMP] <mrp_bom_version> If BoM exist it is active so state must be 'a…
oihane Jun 2, 2015
5351fe4
[IMP] <mrp_bom_version> Older versions shown in each BoM
oihane Jun 3, 2015
b83875d
[FIX] mrp_bom_version invisble draft button: security rules to approp…
Jun 24, 2015
263cba0
Update README.rst
Jul 24, 2015
556ab22
[IMP] mrp_bom_version: Show in tree buttons draft, activate, new vers…
alfredoavanzosc Jul 29, 2015
697a708
Slovene translations added
sysadminmatmoz Aug 1, 2015
d36f4e4
[IMP] mrp_bom_version: Include folder "tests".
alfredoavanzosc Aug 10, 2015
c0fa386
[IMP] mrp_bom_version: Some improvements
oihane Sep 23, 2015
0dbb2ae
[MIG] mrp_bom_version: migrated from odoomrp-wip
oihane Oct 1, 2015
07399d0
[FIX] Duplicated BoM view causes crash when installing both modules
oihane Oct 2, 2015
11b3896
[IMP] mrp_bom_version: use new api correctly
oihane Oct 5, 2015
ac59f5b
[IMP] mrp_bom_version: Define if draft is active in config parameters
oihane Oct 23, 2015
faf736b
[IMP] mrp_bom_version: Fixed tests
oihane Oct 26, 2015
69aff31
[IMP] mrp_hook+mrp_operations_extension: Adaptation to OCA
pedrobaeza Nov 26, 2015
b202e0a
[FIX] mrp_bom_version: _default_state
pedrobaeza Dec 9, 2015
309655a
[FIX] remove en.po that was erroneously created by transbot
sbidoul Aug 15, 2016
2ac05e5
[FIX] mrp_bom_version: duplicating BoM has same historical BoM as ori…
oihane May 16, 2017
f27504b
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
558a975
Translated using Weblate (Galician)
mvrodriguez Mar 1, 2019
c64a105
Translated using Weblate (Italian)
francesco-ooops Jan 3, 2023
ea094d7
[IMP] mrp_bom_version: pre-commit stuff
Oct 18, 2024
8cd6e82
[MIG] mrp_bom_version: Migration to 16.0
Oct 18, 2024
8b507c0
[IMP] mrp_bom_version: rename field to make more clear
Oct 22, 2024
f0db756
Translated using Weblate (Italian)
mymage Oct 23, 2024
18c79b1
[IMP] mrp_bom_version: pre-commit auto fixes
BhaveshHeliconia Jan 1, 2025
2f8de07
[MIG] mrp_bom_version: Migration to 18.0
BhaveshHeliconia Jan 2, 2025
ed931e9
[16.0][FIX] fix compute_kit_quantities
Kev-Roche Nov 24, 2025
9c7289a
[MIG] mrp_bom_version: Migration to 17.0
dreispt Dec 19, 2025
27a1aff
[FIX] mrp_bom_version: fix tests
dreispt Dec 19, 2025
7fe4a83
[REF] Update dotfiles and make mrp_bom_version a rebel module
dreispt Dec 20, 2025
2a7d1eb
[IMP] mrp_bom_version: fr translation
dreispt Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.29
_commit: v1.35
_src_path: gh:oca/oca-addons-repo-template
additional_ruff_rules: []
ci: GitHub
Expand All @@ -17,7 +17,8 @@ odoo_test_flavor: Both
odoo_version: 17.0
org_name: Odoo Community Association (OCA)
org_slug: OCA
rebel_module_groups: []
rebel_module_groups:
- mrp_bom_version
repo_description: 'TODO: add repo description.'
repo_name: manufacture
repo_slug: manufacture
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test-requirements.txt merge=union
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,31 @@ jobs:
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
include: "mrp_bom_version"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest
include: "mrp_bom_version"
name: test with OCB
makepot: "true"
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
exclude: "mrp_bom_version"
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest
exclude: "mrp_bom_version"
name: test with OCB
makepot: "true"
services:
postgres:
image: postgres:12.0
image: postgres:12
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
ports:
- 5432:5432
env:
INCLUDE: "${{ matrix.include }}"
EXCLUDE: "${{ matrix.exclude }}"
steps:
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ repos:
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/sbidoul/whool
rev: v1.2
rev: v1.3
hooks:
- id: whool-init
- repo: https://github.com/oca/maintainer-tools
rev: d5fab7ee87fceee858a3d01048c78a548974d935
rev: f9b919b9868143135a9c9cb03021089cabba8223
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand Down Expand Up @@ -95,6 +95,7 @@ repos:
additional_dependencies:
- "[email protected]"
- "eslint-plugin-jsdoc@"
- "globals@"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
Expand Down
53 changes: 27 additions & 26 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,25 @@ disable=all
enable=anomalous-backslash-in-string,
api-one-deprecated,
api-one-multi-together,
assignment-from-none,
attribute-deprecated,
class-camelcase,
dangerous-default-value,
dangerous-view-replace-wo-priority,
development-status-allowed,
duplicate-id-csv,
duplicate-key,
duplicate-xml-fields,
duplicate-xml-record-id,
eval-referenced,
eval-used,
incoherent-interpreter-exec-perm,
openerp-exception-warning,
redundant-modulename-xml,
relative-import,
rst-syntax-error,
wrong-tabs-instead-of-spaces,
xml-syntax-error,
assignment-from-none,
attribute-deprecated,
dangerous-default-value,
development-status-allowed,
duplicate-key,
eval-used,
license-allowed,
manifest-author-string,
manifest-deprecated-key,
Expand All @@ -48,56 +54,50 @@ enable=anomalous-backslash-in-string,
method-inverse,
method-required-super,
method-search,
openerp-exception-warning,
pointless-statement,
pointless-string-statement,
print-used,
redundant-keyword-arg,
redundant-modulename-xml,
reimported,
relative-import,
return-in-init,
rst-syntax-error,
sql-injection,
too-few-format-args,
translation-field,
translation-required,
unreachable,
use-vim-comment,
wrong-tabs-instead-of-spaces,
xml-syntax-error,
attribute-string-redundant,
character-not-valid-in-resource-link,
consider-merging-classes-inherited,
context-overridden,
create-user-wo-reset-password,
dangerous-filter-wo-user,
dangerous-qweb-replace-wo-priority,
deprecated-data-xml-node,
deprecated-openerp-xml-node,
duplicate-po-message-definition,
except-pass,
file-not-used,
missing-newline-extrafiles,
old-api7-method-defined,
po-msgstr-variables,
po-syntax-error,
str-format-used,
unnecessary-utf8-coding-comment,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute,
attribute-string-redundant,
consider-merging-classes-inherited,
context-overridden,
except-pass,
invalid-commit,
manifest-maintainers-list,
missing-newline-extrafiles,
missing-readme,
missing-return,
odoo-addons-relative-import,
old-api7-method-defined,
po-msgstr-variables,
po-syntax-error,
renamed-field-parameter,
resource-not-exist,
str-format-used,
test-folder-imported,
translation-contains-variable,
translation-positional-used,
unnecessary-utf8-coding-comment,
website-manifest-key-not-valid-uri,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute,
external-request-timeout,
# messages that do not cause the lint step to fail
consider-merging-classes-inherited,
Expand All @@ -114,7 +114,8 @@ enable=anomalous-backslash-in-string,
old-api7-method-defined,
redefined-builtin,
too-complex,
unnecessary-utf8-coding-comment
unnecessary-utf8-coding-comment,
manifest-external-assets


[REPORTS]
Expand Down
50 changes: 25 additions & 25 deletions .pylintrc-mandatory
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,25 @@ disable=all
enable=anomalous-backslash-in-string,
api-one-deprecated,
api-one-multi-together,
assignment-from-none,
attribute-deprecated,
class-camelcase,
dangerous-default-value,
dangerous-view-replace-wo-priority,
development-status-allowed,
duplicate-id-csv,
duplicate-key,
duplicate-xml-fields,
duplicate-xml-record-id,
eval-referenced,
eval-used,
incoherent-interpreter-exec-perm,
openerp-exception-warning,
redundant-modulename-xml,
relative-import,
rst-syntax-error,
wrong-tabs-instead-of-spaces,
xml-syntax-error,
assignment-from-none,
attribute-deprecated,
dangerous-default-value,
development-status-allowed,
duplicate-key,
eval-used,
license-allowed,
manifest-author-string,
manifest-deprecated-key,
Expand All @@ -40,56 +46,50 @@ enable=anomalous-backslash-in-string,
method-inverse,
method-required-super,
method-search,
openerp-exception-warning,
pointless-statement,
pointless-string-statement,
print-used,
redundant-keyword-arg,
redundant-modulename-xml,
reimported,
relative-import,
return-in-init,
rst-syntax-error,
sql-injection,
too-few-format-args,
translation-field,
translation-required,
unreachable,
use-vim-comment,
wrong-tabs-instead-of-spaces,
xml-syntax-error,
attribute-string-redundant,
character-not-valid-in-resource-link,
consider-merging-classes-inherited,
context-overridden,
create-user-wo-reset-password,
dangerous-filter-wo-user,
dangerous-qweb-replace-wo-priority,
deprecated-data-xml-node,
deprecated-openerp-xml-node,
duplicate-po-message-definition,
except-pass,
file-not-used,
missing-newline-extrafiles,
old-api7-method-defined,
po-msgstr-variables,
po-syntax-error,
str-format-used,
unnecessary-utf8-coding-comment,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute,
attribute-string-redundant,
consider-merging-classes-inherited,
context-overridden,
except-pass,
invalid-commit,
manifest-maintainers-list,
missing-newline-extrafiles,
missing-readme,
missing-return,
odoo-addons-relative-import,
old-api7-method-defined,
po-msgstr-variables,
po-syntax-error,
renamed-field-parameter,
resource-not-exist,
str-format-used,
test-folder-imported,
translation-contains-variable,
translation-positional-used,
unnecessary-utf8-coding-comment,
website-manifest-key-not-valid-uri,
xml-attribute-translatable,
xml-deprecated-qweb-directive,
xml-deprecated-tree-attribute,
external-request-timeout

[REPORTS]
Expand Down
63 changes: 63 additions & 0 deletions mrp_bom_version/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

=================
MRP - BoM Version
=================

This module provides a state in the BoM whether to allow their use in
manufacturing.


Usage
=====

The following states are defined:

* **Draft**:
The form will be available for data entry, and may move to "active" state.
* **Active**:
You can modify all of the form fields except for the fields: routing, BoM
lines, and the new field Active, for false default when you create a new BoM.
The "active" state may be passed back to state "draft", if we mark the new
field "Allow re-edit the BoM list", this new field is defined in
*Configuration > Configuration > Manufacturing*. You can configure there also
if those BoM will continue with active check marked as True or not.
The active state may move to state "Historical".
* **Historical**:
This is the last state of the LdM, you can not change any field on the form.

When the MRP BoM list is put to active, a record of who has activated, and when
will include in chatter/log. It also adds a constraint for the sequence field
to be unique.

* **New version** :
By clicking the button version, current BOM is moved to historical state,
and a new BOM is creating based on this but with version number +1 and
changing state to draft


.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/129/8.0


Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
`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**>`_.


Credits
=======

Contributors
------------
* Pedro M. Baeza <[email protected]>
* Ana Juaristi <[email protected]>
* Alfredo de la Fuente <[email protected]>
* Oihane Crucelaegui <[email protected]>

13 changes: 13 additions & 0 deletions mrp_bom_version/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# (c) 2015 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models


def set_active_bom_active_state(env):
"""Set those active BoMs to state 'active'"""
env.cr.execute(
"""UPDATE mrp_bom
SET state = 'active'
WHERE active = True"""
)
33 changes: 33 additions & 0 deletions mrp_bom_version/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# (c) 2015 Alfredo de la Fuente - AvanzOSC
# (c) 2015 Oihane Crucelaegui - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "MRP - BoM version",
"summary": "BoM versioning",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "OdooMRP team,"
"AvanzOSC,"
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/manufacture",
"contributors": [
"Pedro M. Baeza <[email protected]>",
"Ana Juaristi <[email protected]>",
"Alfredo de la Fuente <[email protected]>",
"Oihane Crucelaegui <[email protected]>",
],
"category": "Manufacturing",
"depends": [
"mrp",
],
"data": [
"data/mrp_bom_data.xml",
"security/mrp_bom_version_security.xml",
"views/res_config_view.xml",
"views/mrp_bom_view.xml",
],
"installable": True,
"post_init_hook": "set_active_bom_active_state",
}
Loading