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] attribute_set_completeness: Migration to 16.0 #189

Open
wants to merge 34 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
34 commits
Select commit Hold shift + click to select a range
9a74a02
[ADD] add new features to manage completion rate and completion state…
Jun 10, 2020
19e8b6c
[UPD] README.rst
Jun 18, 2020
e6756e6
attribute_set_completeness 12.0.1.0.1
Jun 18, 2020
3268c68
[10.0][FIX] attribute_set_completeness: Fix one2many
rousseldenis Jun 26, 2020
c0bc031
[10.0][FIX] attribute_set_completeness: Percentage with 100.0
rousseldenis Jun 26, 2020
502faae
[10.0][FIX] attribute_set_completeness: Add not completed fields
rousseldenis Jun 26, 2020
533d18e
[10.0][IMP] pre-commit updates
rousseldenis Jun 29, 2020
564b885
[10.0][FIX] attribute_set_completeness: fix search method
Jun 29, 2020
eeb0e4c
attribute_set_completeness 12.0.1.1.0
Oct 2, 2020
0a318ed
attribute_set_completeness 12.0.1.1.1
Oct 2, 2020
7fba1b3
[FIX] attribute_set_completeness: speed up completion fields
Jul 7, 2020
7a97ff0
attribute_set_completeness: tests use SavepointComponentCase
simahawk Oct 2, 2020
c0cf674
attribute_set_completeness 12.0.1.2.0
Oct 5, 2020
a386c08
[IMP] product_attribute_set_completeness UI
clementmbr Oct 16, 2020
e4ab9d2
[IMP] more accurate domain in attribute_set_completeness's field_ids
clementmbr Oct 16, 2020
2ac4525
[IMP] no_create:True on completeness field_id
clementmbr Oct 17, 2020
7177907
attribute_set_completeness 12.0.1.2.1
Oct 20, 2020
f031d6f
[IMP] attribute_set_completeness: black, isort, prettier
xavier-bouquiaux Apr 15, 2021
bfd23c7
[14.0][MIG] attribute_set_completeness
xavier-bouquiaux Apr 15, 2021
940abbf
[14.0][IMP] attribute_set_completeness: Avoid duplicated strings
rousseldenis Apr 27, 2021
8482bb0
[UPD] Update attribute_set_completeness.pot
Oct 6, 2021
6c84c43
[UPD] README.rst
OCA-git-bot Oct 6, 2021
c996778
[ADD] icon.png
OCA-git-bot Oct 6, 2021
b74e408
attribute_set_completeness 14.0.1.0.1
OCA-git-bot Oct 6, 2021
a8e0ed9
[14.0][FIX] attribute_set_completeness
xavier-bouquiaux Jan 27, 2022
db6f160
[14.0] attribute_set_completeness: store completion state and rate fo…
Feb 1, 2022
0a171a0
attribute_set_completeness 14.0.2.0.0
OCA-git-bot Oct 17, 2022
a9e124e
[UPD] README.rst
OCA-git-bot Sep 3, 2023
051baef
[UPD] Update attribute_set_completeness.pot
Sep 3, 2023
10247dd
Added translation using Weblate (Spanish)
Ivorra78 Mar 17, 2024
612907a
Translated using Weblate (Spanish)
Ivorra78 Mar 17, 2024
5ca3082
Translated using Weblate (Spanish)
Ivorra78 Mar 27, 2024
44c8d96
[IMP] attribute_set_completeness: pre-commit stuff
HeliconiaSolutions Nov 28, 2024
60b45fc
[MIG] attribute_set_completeness: Migration to 16.0
HeliconiaSolutions Nov 28, 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
90 changes: 90 additions & 0 deletions attribute_set_completeness/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
==========================
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/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 <cedric.pigeon@acsone.eu>
* Xavier Bouquiaux <xavier.bouquiaux@acsone.eu>
* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <ivan.todorovich@gmail.com>

* Dhara Solanki <dhara.solanki@initos.com>
* `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_

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