Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
99 changes: 99 additions & 0 deletions product_abc_classification_finance/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
==================================
Product ABC Classification Finance
==================================

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

.. |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%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/16.0/product_abc_classification_finance
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_abc_classification_finance
: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/product-attribute&target_branch=16.0
:alt: Try me on Runboat

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

This modules includes an ABC analysis computation profile based
on the cost and sale price of sale order lines delivered from a given date by product.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Go to Sales or Inventory menu, then to
Configuration > Products > ABC Classification Profile and create a profile
with levels. The sum of all levels in the profile should equal 100 and all
levels must be unique.

#. Assign the profile to product variants. The cron job will automatically
classify these products into one of the profile's levels based on the total
cost and total sales of delivered products.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/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/product-attribute/issues/new?body=module:%20product_abc_classification_finance%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
~~~~~~~

* AJamal13

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

* Ahmed Jamal <[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.

.. |maintainer-AJamal13| image:: https://github.com/AJamal13.png?size=40px
:target: https://github.com/AJamal13
:alt: AJamal13

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-AJamal13|

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/16.0/product_abc_classification_finance>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions product_abc_classification_finance/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions product_abc_classification_finance/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Product ABC Classification Finance",
"summary": "Financial ABC analysis for products (cost, sale price)",
"version": "16.0.1.0.2",
"category": "Inventory/Inventory",
"author": "AJamal13,Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/product-attribute",
"depends": ["product_abc_classification_sale_stock", "sale_margin"],
"data": [
"security/ir.model.access.csv",
"views/abc_finance_sale_level_history_views.xml",
"views/abc_classification_product_level_views.xml",
"views/abc_classification_profile.xml",
],
"demo": [
"data/abc_classification_finance_demo.xml",
],
"maintainers": ["AJamal13"],
"installable": True,
"application": False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AJamal13 you should add yourself as the official maintainers 😏

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Demo data for product_abc_classification_finance -->
<odoo>
<!-- Classification Levels (copy from sale_stock for consistency) -->
<record id="abc_classification_level_a_fin" model="abc.classification.level">
<field name="name">A</field>
<field name="percentage">80</field>
<field name="percentage_products">20</field>
</record>
<record id="abc_classification_level_b_fin" model="abc.classification.level">
<field name="name">B</field>
<field name="percentage">15</field>
<field name="percentage_products">30</field>
</record>
<record id="abc_classification_level_c_fin" model="abc.classification.level">
<field name="name">C</field>
<field name="percentage">5</field>
<field name="percentage_products">50</field>
</record>

<record
id="abc_classification_profile_finance_cost"
model="abc.classification.profile"
>
<field name="name">Finance Cost Profile</field>
<field name="profile_type">cost</field>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="period">365</field>
<field
name="level_ids"
eval="[(6,0,[ref('abc_classification_level_a_fin'), ref('abc_classification_level_b_fin'), ref('abc_classification_level_c_fin')])]"
/>
</record>
</odoo>
3 changes: 3 additions & 0 deletions product_abc_classification_finance/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import abc_classification_profile
from . import abc_classification_product_level
from . import abc_finance_sale_level_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from odoo import fields, models


class AbcClassificationProductLevel(models.Model):
_inherit = "abc.classification.product.level"

finance_sale_level_history_ids = fields.One2many(
comodel_name="abc.finance.sale.level.history",
inverse_name="product_level_id",
)
Loading