Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
96bb67a
[ADD] add new features to manage completion rate and completion state…
Jun 10, 2020
d77dcce
[10.0][FIX] attribute_set_completeness: Fix one2many
rousseldenis Jun 26, 2020
9b86d0f
[10.0][FIX] attribute_set_completeness: Percentage with 100.0
rousseldenis Jun 26, 2020
f984451
[10.0][FIX] attribute_set_completeness: Add not completed fields
rousseldenis Jun 26, 2020
9c9dab6
[10.0][IMP] pre-commit updates
rousseldenis Jun 29, 2020
4e96295
[10.0][FIX] attribute_set_completeness: fix search method
Jun 29, 2020
99a79b0
[FIX] attribute_set_completeness: speed up completion fields
Jul 7, 2020
776ff81
attribute_set_completeness: tests use SavepointComponentCase
simahawk Oct 2, 2020
89245fe
[IMP] product_attribute_set_completeness UI
clementmbr Oct 16, 2020
e243b4c
[IMP] more accurate domain in attribute_set_completeness's field_ids
clementmbr Oct 16, 2020
21ccf67
[IMP] no_create:True on completeness field_id
clementmbr Oct 17, 2020
36ec31d
[IMP] attribute_set_completeness: black, isort, prettier
xavier-bouquiaux Apr 15, 2021
4a1ad7c
[14.0][MIG] attribute_set_completeness
xavier-bouquiaux Apr 15, 2021
7c13193
[14.0][IMP] attribute_set_completeness: Avoid duplicated strings
rousseldenis Apr 27, 2021
ee2cc06
[14.0][FIX] attribute_set_completeness
xavier-bouquiaux Jan 27, 2022
7d9b544
[14.0] attribute_set_completeness: store completion state and rate fo…
Feb 1, 2022
69e7b8a
Added translation using Weblate (Spanish)
Ivorra78 Mar 17, 2024
0c7f4e0
Translated using Weblate (Spanish)
Ivorra78 Mar 17, 2024
7754ccc
Translated using Weblate (Spanish)
Ivorra78 Mar 27, 2024
2725baf
[IMP] attribute_set_completeness: pre-commit stuff
BhaveshHeliconia Nov 28, 2024
4901185
[MIG] attribute_set_completeness: Migration to 16.0
BhaveshHeliconia Nov 28, 2024
94e4223
fix pre-commit
BhaveshHeliconia Mar 13, 2026
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- 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 @@ -140,7 +140,7 @@ repos:
- --settings=.
exclude: /__init__\.py$
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.1.8
rev: 3.3.2
hooks:
- id: setuptools-odoo-make-default
- id: setuptools-odoo-get-requirements
Expand Down
96 changes: 96 additions & 0 deletions attribute_set_completeness/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================
Attribute Set Completeness
==========================

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

.. |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/license-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]>
* `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_

* Bhavesh Heliconia

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
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()
46 changes: 46 additions & 0 deletions attribute_set_completeness/i18n/attribute_set_completeness.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attribute_set_completeness
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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
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,name:attribute_set_completeness.model_attribute_set_owner_mixin
msgid "Attribute set owner mixin"
msgstr ""

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

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

#. module: attribute_set_completeness
#: model_terms:ir.ui.view,arch_db:attribute_set_completeness.attribute_set_completeness_tree_view
msgid "Total"
msgstr ""
50 changes: 50 additions & 0 deletions attribute_set_completeness/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
msgid ""
msgstr ""
"Project-Id-Version: ametras-xsolutions\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: German\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: ametras-xsolutions\n"
"X-Crowdin-Project-ID: 530964\n"
"X-Crowdin-Language: de\n"
"X-Crowdin-File: /[AmetrasIntelligence.oca-migrated] 16.0/attribute_set_completeness/i18n/attribute_set_completeness.pot\n"
"X-Crowdin-File-ID: 21354\n"
"Language: de_DE\n"
"PO-Revision-Date: 2024-09-25 12:08\n"

#. module: attribute_set_completeness
#: model:ir.model,name:attribute_set_completeness.model_attribute_set
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,name:attribute_set_completeness.model_attribute_set_owner_mixin
msgid "Attribute set owner mixin"
msgstr ""

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

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

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

Loading
Loading