diff --git a/account_mass_reconcile_by_rma_line/README.rst b/account_mass_reconcile_by_rma_line/README.rst new file mode 100644 index 00000000..acb720f3 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/README.rst @@ -0,0 +1,95 @@ +======================================== +Account Mass Reconcile by RMA Order Line +======================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Frma-lightgray.png?logo=github + :target: https://github.com/OCA/rma/tree/14.0/account_mass_reconcile_by_rma_line + :alt: OCA/rma +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/rma-14-0/rma-14-0-account_mass_reconcile_by_rma_line + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/145/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of account_mass_reconcile and +allow an user to reconcile debits and credits of an Account +using the RMA Line as key field. This type of +reconciliation is to be used in the context of the Perpetual Inventory +accounting system, with the accrual account '*Goods Received Not Invoiced*'. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* Go to 'Invoicing / Accounting / Actions / Mass Automatic Reconcile'. + +* Create a new reconciliation profile, and select a new configuration entry + with type 'Advanced. RMA Order line'. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* Christopher Ormaza + +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-ChrisOForgeFlow| image:: https://github.com/ChrisOForgeFlow.png?size=40px + :target: https://github.com/ChrisOForgeFlow + :alt: ChrisOForgeFlow + +Current `maintainer `__: + +|maintainer-ChrisOForgeFlow| + +This module is part of the `OCA/rma `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_mass_reconcile_by_rma_line/__init__.py b/account_mass_reconcile_by_rma_line/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/account_mass_reconcile_by_rma_line/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_mass_reconcile_by_rma_line/__manifest__.py b/account_mass_reconcile_by_rma_line/__manifest__.py new file mode 100644 index 00000000..17573548 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2022 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Account Mass Reconcile by RMA Order Line", + "summary": "Allows to reconcile based on the PO line", + "version": "14.0.1.0.0", + "author": "ForgeFlow, " "Odoo Community Association (OCA)", + "website": "https://github.com/ForgeFlow/stock-rma", + "category": "Finance", + "depends": [ + "account_mass_reconcile", + "account_move_line_rma_order_line", + "rma_account", + ], + "license": "AGPL-3", + "data": ["security/ir.model.access.csv", "views/mass_reconcile.xml"], + "installable": True, + "auto_install": False, + "development_status": "Beta", + "maintainers": ["ChrisOForgeFlow"], +} diff --git a/account_mass_reconcile_by_rma_line/models/__init__.py b/account_mass_reconcile_by_rma_line/models/__init__.py new file mode 100644 index 00000000..fbcdbc24 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/models/__init__.py @@ -0,0 +1,3 @@ +from . import mass_reconcile +from . import base_advanced_reconciliation +from . import advanced_reconciliation diff --git a/account_mass_reconcile_by_rma_line/models/advanced_reconciliation.py b/account_mass_reconcile_by_rma_line/models/advanced_reconciliation.py new file mode 100644 index 00000000..c57a2b80 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/models/advanced_reconciliation.py @@ -0,0 +1,27 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class MassReconcileAdvancedByRmaOrderLine(models.TransientModel): + _name = "mass.reconcile.advanced.by.rma.order.line" + _inherit = "mass.reconcile.advanced" + _description = "Mass Reconcile By Purchase Line" + + @staticmethod + def _skip_line(move_line): + """ + When True is returned on some conditions, the credit move line + will be skipped for reconciliation. Can be inherited to + skip on some conditions. ie: ref or partner_id is empty. + """ + return not (move_line.get("rma_line_id")) + + @staticmethod + def _matchers(move_line): + return (("rma_line_id", move_line["rma_line_id"]),) + + @staticmethod + def _opposite_matchers(move_line): + yield ("rma_line_id", move_line["rma_line_id"]) diff --git a/account_mass_reconcile_by_rma_line/models/base_advanced_reconciliation.py b/account_mass_reconcile_by_rma_line/models/base_advanced_reconciliation.py new file mode 100644 index 00000000..7b1d33ce --- /dev/null +++ b/account_mass_reconcile_by_rma_line/models/base_advanced_reconciliation.py @@ -0,0 +1,13 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class MassReconcileAdvanced(models.AbstractModel): + _inherit = "mass.reconcile.advanced" + + def _selection_columns(self): + aml_cols = super(MassReconcileAdvanced, self)._selection_columns() + aml_cols.append("account_move_line.rma_line_id") + return aml_cols diff --git a/account_mass_reconcile_by_rma_line/models/mass_reconcile.py b/account_mass_reconcile_by_rma_line/models/mass_reconcile.py new file mode 100644 index 00000000..7c24a55c --- /dev/null +++ b/account_mass_reconcile_by_rma_line/models/mass_reconcile.py @@ -0,0 +1,18 @@ +# Copyright 2020 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class AccountMassReconcileMethod(models.Model): + _inherit = "account.mass.reconcile.method" + + def _selection_name(self): + methods = super(AccountMassReconcileMethod, self)._selection_name() + methods += [ + ( + "mass.reconcile.advanced.by.rma.order.line", + "Advanced. RMA order line.", + ), + ] + return methods diff --git a/account_mass_reconcile_by_rma_line/readme/CONTRIBUTORS.rst b/account_mass_reconcile_by_rma_line/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..b647a292 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Christopher Ormaza diff --git a/account_mass_reconcile_by_rma_line/readme/DESCRIPTION.rst b/account_mass_reconcile_by_rma_line/readme/DESCRIPTION.rst new file mode 100644 index 00000000..bf7b70fc --- /dev/null +++ b/account_mass_reconcile_by_rma_line/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +This module extends the functionality of account_mass_reconcile and +allow an user to reconcile debits and credits of an Account +using the RMA Line as key field. This type of +reconciliation is to be used in the context of the Perpetual Inventory +accounting system, with the accrual account '*Goods Received Not Invoiced*'. diff --git a/account_mass_reconcile_by_rma_line/readme/USAGE.rst b/account_mass_reconcile_by_rma_line/readme/USAGE.rst new file mode 100644 index 00000000..5463b6f5 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module, you need to: + +* Go to 'Invoicing / Accounting / Actions / Mass Automatic Reconcile'. + +* Create a new reconciliation profile, and select a new configuration entry + with type 'Advanced. RMA Order line'. diff --git a/account_mass_reconcile_by_rma_line/security/ir.model.access.csv b/account_mass_reconcile_by_rma_line/security/ir.model.access.csv new file mode 100644 index 00000000..ee8f6e31 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_mass_reconcile_advanced_by_rma_order_line,access_mass_reconcile_advanced_by_rma_order_line,model_mass_reconcile_advanced_by_rma_order_line,base.group_user,1,1,1,1 diff --git a/account_mass_reconcile_by_rma_line/static/description/icon.png b/account_mass_reconcile_by_rma_line/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/account_mass_reconcile_by_rma_line/static/description/icon.png differ diff --git a/account_mass_reconcile_by_rma_line/static/description/index.html b/account_mass_reconcile_by_rma_line/static/description/index.html new file mode 100644 index 00000000..a658b429 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/static/description/index.html @@ -0,0 +1,435 @@ + + + + + + +Account Mass Reconcile by RMA Order Line + + + +
+

Account Mass Reconcile by RMA Order Line

+ + +

Beta License: AGPL-3 OCA/rma Translate me on Weblate Try me on Runbot

+

This module extends the functionality of account_mass_reconcile and +allow an user to reconcile debits and credits of an Account +using the RMA Line as key field. This type of +reconciliation is to be used in the context of the Perpetual Inventory +accounting system, with the accrual account ‘Goods Received Not Invoiced’.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Go to ‘Invoicing / Accounting / Actions / Mass Automatic Reconcile’.
  • +
  • Create a new reconciliation profile, and select a new configuration entry +with type ‘Advanced. RMA Order line’.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainer:

+

ChrisOForgeFlow

+

This module is part of the OCA/rma project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_mass_reconcile_by_rma_line/views/mass_reconcile.xml b/account_mass_reconcile_by_rma_line/views/mass_reconcile.xml new file mode 100644 index 00000000..432cb717 --- /dev/null +++ b/account_mass_reconcile_by_rma_line/views/mass_reconcile.xml @@ -0,0 +1,25 @@ + + + + account.mass.reconcile.form + 20 + account.mass.reconcile + + + + + + + + + + diff --git a/oca_dependencies.txt b/oca_dependencies.txt index 81fe809c..95263a93 100644 --- a/oca_dependencies.txt +++ b/oca_dependencies.txt @@ -1,2 +1,3 @@ # See https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#oca_dependencies-txt manufacture +account-reconcile diff --git a/setup/account_mass_reconcile_by_rma_line/odoo/addons/account_mass_reconcile_by_rma_line b/setup/account_mass_reconcile_by_rma_line/odoo/addons/account_mass_reconcile_by_rma_line new file mode 120000 index 00000000..febe94a3 --- /dev/null +++ b/setup/account_mass_reconcile_by_rma_line/odoo/addons/account_mass_reconcile_by_rma_line @@ -0,0 +1 @@ +../../../../account_mass_reconcile_by_rma_line \ No newline at end of file diff --git a/setup/account_mass_reconcile_by_rma_line/setup.py b/setup/account_mass_reconcile_by_rma_line/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/account_mass_reconcile_by_rma_line/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)