Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] pim: Migration to 16.0 + remove completeness dependency #184

Open
wants to merge 92 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
711904d
[ADD] add new features to manage completion rate and completion state…
Jun 10, 2020
b2355d0
[UPD] README.rst
Jun 18, 2020
ca5f2b3
attribute_set_completeness 12.0.1.0.1
Jun 18, 2020
06d7bfd
[10.0][FIX] attribute_set_completeness: Fix one2many
rousseldenis Jun 26, 2020
86d95b5
[10.0][FIX] attribute_set_completeness: Percentage with 100.0
rousseldenis Jun 26, 2020
d9f732d
[10.0][FIX] attribute_set_completeness: Add not completed fields
rousseldenis Jun 26, 2020
f791e52
[10.0][IMP] pre-commit updates
rousseldenis Jun 29, 2020
8504723
[10.0][FIX] attribute_set_completeness: fix search method
Jun 29, 2020
09a11cf
attribute_set_completeness 12.0.1.1.0
Oct 2, 2020
a0eddea
attribute_set_completeness 12.0.1.1.1
Oct 2, 2020
2dcdfa9
[FIX] attribute_set_completeness: speed up completion fields
Jul 7, 2020
dcfb48e
attribute_set_completeness: tests use SavepointComponentCase
simahawk Oct 2, 2020
0336b9a
attribute_set_completeness 12.0.1.2.0
Oct 5, 2020
1cbfb86
[IMP] product_attribute_set_completeness UI
clementmbr Oct 16, 2020
29b634d
[IMP] more accurate domain in attribute_set_completeness's field_ids
clementmbr Oct 16, 2020
7b85889
[IMP] no_create:True on completeness field_id
clementmbr Oct 17, 2020
b896577
attribute_set_completeness 12.0.1.2.1
Oct 20, 2020
65a0c23
[IMP] attribute_set_completeness: black, isort, prettier
xavier-bouquiaux Apr 15, 2021
7b898b3
[14.0][MIG] attribute_set_completeness
xavier-bouquiaux Apr 15, 2021
b061219
[14.0][IMP] attribute_set_completeness: Avoid duplicated strings
rousseldenis Apr 27, 2021
3694cf2
[UPD] Update attribute_set_completeness.pot
Oct 6, 2021
8c7359c
[UPD] README.rst
OCA-git-bot Oct 6, 2021
419bbad
[ADD] icon.png
OCA-git-bot Oct 6, 2021
4a84430
attribute_set_completeness 14.0.1.0.1
OCA-git-bot Oct 6, 2021
29c74cd
[14.0][FIX] attribute_set_completeness
xavier-bouquiaux Jan 27, 2022
d022ecb
[14.0] attribute_set_completeness: store completion state and rate fo…
Feb 1, 2022
0d8c208
attribute_set_completeness 14.0.2.0.0
OCA-git-bot Oct 17, 2022
8eac106
[IMP] attribute_set_completeness: pre-commit stuff
dsolanki-initos Jul 17, 2023
422ea70
[MIG] attribute_set_completeness: Migration to 16.0
dsolanki-initos Jul 17, 2023
3622e62
[ADD] add new features to manage completion rate and completion state…
Jun 10, 2020
26f6c5b
[UPD] README.rst
Jun 18, 2020
ccad78d
product_attribute_set_completeness 12.0.1.0.1
Jun 18, 2020
9cdfdd0
[10.0][FIX] attribute_set_completeness: Add not completed fields
rousseldenis Jun 26, 2020
2af29b0
[10.0][IMP] pre-commit updates
rousseldenis Jun 29, 2020
7c29652
product_attribute_set_completeness: fix completion_rate widget
simahawk Sep 30, 2020
81d589c
product_attribute_set_completeness 12.0.1.1.0
Oct 2, 2020
b1e960d
[FIX] attribute_set_completeness: speed up completion fields
Jul 7, 2020
b4fc37a
product_attribute_set_completeness 12.0.1.2.0
Oct 5, 2020
a58e2f6
[IMP] product_attribute_set_completeness UI
clementmbr Oct 16, 2020
37d994b
[IMP] Hide completeness state and rate if no completeness_ids
clementmbr Oct 17, 2020
f4e1ad9
product_attribute_set_completeness 12.0.1.2.1
Oct 20, 2020
6ffd7c4
[IMP] product_attribute_set_completeness: black, isort, prettier
xavier-bouquiaux Apr 15, 2021
2df2ce5
[14.0][MIG] product_attribute_set_completeness
xavier-bouquiaux Apr 16, 2021
902bd35
[UPD] Update product_attribute_set_completeness.pot
Oct 6, 2021
995033b
[UPD] README.rst
OCA-git-bot Oct 6, 2021
1264225
[ADD] icon.png
OCA-git-bot Oct 6, 2021
7f887c8
product_attribute_set_completeness 14.0.1.0.1
OCA-git-bot Oct 6, 2021
4e6fbc6
[CHG] product_attribute_set_completeness: re-introduce completion_sta…
Feb 2, 2022
d69b52e
[UPD] Update product_attribute_set_completeness.pot
Oct 17, 2022
7fc8e30
product_attribute_set_completeness 14.0.2.0.0
OCA-git-bot Oct 17, 2022
7ebc020
[IMP] product_attribute_set_completeness: pre-commit stuff
dsolanki-initos Jul 20, 2023
e16a96e
[MIG] product_attribute_set_completeness: Migration to 16.0
dsolanki-initos Jul 20, 2023
041b90c
[REF] rename modules based on attribute_set and pim
clementmbr May 18, 2020
a592a39
[IMP] Add REAME to the 4 modules
clementmbr May 19, 2020
93cd05b
[IMP] base.user_admin in Attribute Set and PIM Manager group
clementmbr May 27, 2020
df6f858
[IMP] remove class in super() and other misc improvements
clementmbr May 27, 2020
cc798b0
[UPD] README.rst
Jun 5, 2020
5ae72c5
[CHG] add dedicated product view for PIM and refactor addons structure
Jun 10, 2020
2c4bb52
[UPD] README.rst
Jun 11, 2020
2354b59
pim 12.0.1.1.0
Jun 11, 2020
991a985
[UPD] README.rst
Jun 12, 2020
5d7f916
[13.0] Set modules to installable False
rousseldenis Jun 12, 2020
275287b
[13.0] Set modules version to 13
rousseldenis Jun 12, 2020
c0da6ea
[10.0][FIX] do not replace odoo product defaut tree view by the pim view
Jun 18, 2020
257d5e2
[13.0][MIG] pim
rousseldenis Jun 15, 2020
bb55e5b
[UPD] README.rst
Sep 25, 2020
ea070e9
[MIG] make all modules uninstallable
Feb 18, 2021
e185a72
[MIG] update pre-commit conf from copier
Feb 18, 2021
4f55b21
[IMP] pim: black, isort, prettier
Jan 6, 2021
f2ab043
[MIG] 14.0 pim
Jan 11, 2021
b6925d3
[UPD] README.rst
Mar 4, 2021
27e1027
[UPD] README.rst
OCA-git-bot Mar 17, 2021
c46f4bd
Apply dotfiles
sbidoul May 15, 2021
5e03f25
[UPD] Update pim.pot
May 15, 2021
8dfa9fa
pim 14.0.1.0.1
OCA-git-bot May 15, 2021
00b5221
[UPD] README.rst
OCA-git-bot May 15, 2021
a03f97e
[14.0][MIG] product_attribute_set_completeness
xavier-bouquiaux Apr 16, 2021
ee4901f
pim 14.0.1.0.2
OCA-git-bot Oct 6, 2021
6425fd4
[14.0][FIX] pim
xavier-bouquiaux Dec 10, 2021
4f1cde9
pim 14.0.1.0.3
OCA-git-bot Jan 26, 2023
dad3fec
[14.0] pim: add sequence on product tree view
Jan 26, 2023
5bbc3cb
pim 14.0.1.1.0
OCA-git-bot Jan 26, 2023
c4abab2
[IMP] pim: pre-commit stuff
dsolanki-initos Jul 20, 2023
832748b
[MIG] pim: Migration to 16.0
dsolanki-initos Jul 20, 2023
b92539a
Merge remote-tracking branch 'refs/remotes/initos/16.0-mig-pim' into …
myrrkel Jun 15, 2024
bd31388
Merge remote-tracking branch 'refs/remotes/initos/16.0-mig-product_at…
myrrkel Jun 16, 2024
05dd007
Merge remote-tracking branch 'refs/remotes/initos/16.0-mig-attribute_…
myrrkel Jun 16, 2024
b7056f1
[ADD] pim_product_attribute_set_completeness
myrrkel Jun 16, 2024
0b33767
[IMP] pre-commit
myrrkel Jun 16, 2024
1fb9514
[IMP] pylint
myrrkel Jun 16, 2024
42f3b7f
[FIX] ad missing setup.py
myrrkel Jun 16, 2024
4f1c18e
[FIX] pre-commit
myrrkel Jun 16, 2024
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
89 changes: 89 additions & 0 deletions attribute_set_completeness/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
==========================
Attribute Set Completeness
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f8b14699a8f767d4a9ebd91a042aacd07606905af8292e7f3cb459f23958b77a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fodoo--pim-lightgray.png?logo=github
:target: https://github.com/OCA/odoo-pim/tree/16.0/attribute_set_completeness
:alt: OCA/odoo-pim
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/odoo-pim-16-0/odoo-pim-16-0-attribute_set_completeness
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/odoo-pim&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows the user define a completion rate on the model linked to an attribute set.

**Table of contents**

.. contents::
:local:

Usage
=====

Go on an attribute set and fill in the section 'Completeness'.
Select the fields you want to take in account and set them their proportion on the completeness rate.
Then on the model linked to the attribute set you'll get 2 fields: completion rate and completion state

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/odoo-pim/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/odoo-pim/issues/new?body=module:%20attribute_set_completeness%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~

* Cédric PIGEON <[email protected]>
* Xavier Bouquiaux <[email protected]>
* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <[email protected]>

* Dhara Solanki <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/odoo-pim <https://github.com/OCA/odoo-pim/tree/16.0/attribute_set_completeness>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions attribute_set_completeness/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import components
from . import models
17 changes: 17 additions & 0 deletions attribute_set_completeness/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Attribute Set Completeness",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/odoo-pim",
"depends": ["attribute_set", "component_event"],
"data": [
"views/attribute_set.xml",
"security/attribute_set_completeness.xml",
"views/attribute_set_completeness.xml",
],
"demo": [],
}
3 changes: 3 additions & 0 deletions attribute_set_completeness/components/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2020 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import attribute_set_owner_event_listener
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2020 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.addons.component.core import AbstractComponent
from odoo.addons.component_event import skip_if


class AttributeSetOwnerEventListener(AbstractComponent):
_name = "attribute.set.owner.event.listener"
_inherit = "base.event.listener"

def _get_skip_if_condition_fields(self, record):
"""Return the field names that trigger the condition"""
attribute_set = record.attribute_set_id
attribute_set_completeness = attribute_set.attribute_set_completeness_ids
field_names = attribute_set_completeness.mapped("field_id.name")
field_names.append("attribute_set_id")
return field_names

def _get_skip_if_condition(self, record, **kwargs):
if not record.attribute_set_id:
return True

Check warning on line 22 in attribute_set_completeness/components/attribute_set_owner_event_listener.py

View check run for this annotation

Codecov / codecov/patch

attribute_set_completeness/components/attribute_set_owner_event_listener.py#L22

Added line #L22 was not covered by tests
if set(self._get_skip_if_condition_fields(record)) & set(kwargs["fields"]):
return False
return True

@skip_if(
lambda self, record, **kwargs: self._get_skip_if_condition(record, **kwargs)
)
def on_record_write(self, record, fields=None):
record._compute_attribute_set_completed_ids()
168 changes: 168 additions & 0 deletions attribute_set_completeness/i18n/attribute_set_completeness.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attribute_set_completeness
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: attribute_set_completeness
#: model:ir.model,name:attribute_set_completeness.model_attribute_set
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__attribute_set_id
msgid "Attribute Set"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model,name:attribute_set_completeness.model_attribute_set_completeness
msgid "Attribute Set Completeness"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_completion_rate
msgid "Attribute Set Completion Rate"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_completion_state
msgid "Attribute Set Completion State"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_completed_ids
msgid "Attribute Set completed criterias"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_not_completed_ids
msgid "Attribute Set not completed criterias"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__available_field_ids
msgid "Attribute Set's fields"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,help:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_completion_rate
msgid "Attribute set completeness percentage"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,help:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_completion_state
msgid "Attribute set completeness status"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model,name:attribute_set_completeness.model_attribute_set_owner_mixin
msgid "Attribute set owner mixin"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields.selection,name:attribute_set_completeness.selection__attribute_set_owner_mixin__attribute_set_completion_state__complete
msgid "Complete"
msgstr ""

#. module: attribute_set_completeness
#: model_terms:ir.ui.view,arch_db:attribute_set_completeness.attribute_set_form_view
msgid "Completeness"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set__attribute_set_completeness_ids
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__attribute_set_completeness_ids
msgid "Completeness Requirements"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__completion_rate
msgid "Completion Rate"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__completion_rate_progress
msgid "Completion Rate Progress"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__create_uid
msgid "Created by"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__create_date
msgid "Created on"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set__display_name
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__display_name
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__display_name
msgid "Display Name"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__field_description
msgid "Field Description"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__field_id
msgid "Field Name"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,help:attribute_set_completeness.field_attribute_set_completeness__available_field_ids
msgid "Fields related to the Attribute set's attributes"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set__id
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__id
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin__id
msgid "ID"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set____last_update
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness____last_update
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_owner_mixin____last_update
msgid "Last Modified on"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__write_uid
msgid "Last Updated by"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__write_date
msgid "Last Updated on"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields,field_description:attribute_set_completeness.field_attribute_set_completeness__model_id
msgid "Model"
msgstr ""

#. module: attribute_set_completeness
#: model:ir.model.fields.selection,name:attribute_set_completeness.selection__attribute_set_owner_mixin__attribute_set_completion_state__not_complete
msgid "Not complete"
msgstr ""

#. module: attribute_set_completeness
#: model_terms:ir.ui.view,arch_db:attribute_set_completeness.attribute_set_completeness_tree_view
msgid "Total"
msgstr ""

#. module: attribute_set_completeness
#: code:addons/attribute_set_completeness/models/attribute_set.py:0
#, python-format
msgid "Total of completion rate must be 100 %"
msgstr ""
27 changes: 27 additions & 0 deletions attribute_set_completeness/migrations/14.0.1.0.1/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2022 Acsone SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

# when migrating to v14, 2 fields have been renamed
# completion_rate -> attribute_set_completion_rate
# completion_state -> attribute_set_completion_state
from openupgradelib import openupgrade

field_renames = [
(
"attribute.set.owner.mixin",
"attribute.set.owner.mixin",
"completion_rate",
"attribute_set_completion_rate",
),
(
"attribute.set.owner.mixin",
"attribute.set.owner.mixin",
"completion_state",
"attribute_set_completion_state",
),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env, field_renames)
3 changes: 3 additions & 0 deletions attribute_set_completeness/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import attribute_set_completeness
from . import attribute_set
from . import attribute_set_owner_mixin
25 changes: 25 additions & 0 deletions attribute_set_completeness/models/attribute_set.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models
from odoo.exceptions import ValidationError


class AttributeSet(models.Model):
_inherit = "attribute.set"

attribute_set_completeness_ids = fields.One2many(
comodel_name="attribute.set.completeness",
inverse_name="attribute_set_id",
string="Completeness Requirements",
auto_join=True,
)

@api.constrains("attribute_set_completeness_ids")
def _check_attribute_set_completeness_ids(self):
for attr_set in self:
completion_config = attr_set.attribute_set_completeness_ids
if completion_config:
total = sum([rule.completion_rate for rule in completion_config])
if total != 100.0:
raise ValidationError(_("Total of completion rate must be 100 %"))
Loading
Loading