mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
improved with OCA guidelines
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
.. image:: https://img.shields.io/badge/license-AGPLv3-blue.svg
|
||||||
|
:target: https://www.gnu.org/licenses/agpl.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
=======================================================
|
||||||
|
Account Advanced Reconcile Transaction by Purchase Line
|
||||||
|
=======================================================
|
||||||
|
|
||||||
|
This module will allow a user to reconcile debits and credits of an Account
|
||||||
|
using the PO Line, Product and Partner as key fields. 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'.
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
* Go to 'Invoicing / Periodic Processing / Reconciliation / Easy Automatic
|
||||||
|
Reconciliation'.
|
||||||
|
|
||||||
|
* Create a new reconciliation profile, and select a new configuration entry
|
||||||
|
with type 'Advanced. GR/IR Key as partner, product, purchase order line.'.
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
|
:alt: Try me on Runbot
|
||||||
|
:target: https://runbot.odoo-community.org/runbot/98/8.0
|
||||||
|
|
||||||
|
Bug Tracker
|
||||||
|
===========
|
||||||
|
|
||||||
|
Bugs are tracked on `GitHub Issues
|
||||||
|
<https://github.com/OCA/98/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
|
||||||
|
<https://github.com/OCA/
|
||||||
|
98/issues/new?body=module:%20
|
||||||
|
account_advanced_reconcile_transaction_by_purchase_line%0Aversion:%20
|
||||||
|
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20..
|
||||||
|
.%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: http://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
To contribute to this module, please visit http://odoo-community.org.
|
||||||
@@ -1,23 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
#
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
# Author: Romain Deheele. Copyright Camptocamp SA
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from . import easy_reconcile
|
from . import models
|
||||||
from . import base_advanced_reconciliation
|
from . import wizards
|
||||||
from . import advanced_reconciliation
|
|
||||||
|
|||||||
@@ -1,40 +1,21 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
#
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
# Author: Romain Deheele. Copyright Camptocamp SA
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
{'name': 'Advanced Reconcile Transaction by Purchase Line',
|
{
|
||||||
'description': """
|
"name": "Account Advanced Reconcile Transaction by Purchase Line",
|
||||||
Advanced reconciliation method for the module account_advanced_reconcile
|
"summary": "Allows to reconcile based on the PO line",
|
||||||
========================================================================
|
"version": "8.0.1.0.0",
|
||||||
Reconcile rules with transaction_ref
|
"author": "Eficent Business and IT Consulting Services S.L., "
|
||||||
|
"Odoo Community Association (OCA)",
|
||||||
""",
|
"website": "http://www.eficent.com",
|
||||||
'version': '1.0.1',
|
"category": "Generic",
|
||||||
'author': "Camptocamp,Odoo Community Association (OCA)",
|
"depends": ["account_advanced_reconcile",
|
||||||
'category': 'Finance',
|
"account_move_line_purchase_info"
|
||||||
'website': 'http://www.camptocamp.com',
|
],
|
||||||
'depends': ['account_advanced_reconcile',
|
"license": "AGPL-3",
|
||||||
'account_move_line_purchase_info'],
|
"data": [
|
||||||
'data': ['easy_reconcile_view.xml'],
|
"views/easy_reconcile_view.xml",
|
||||||
'demo': [],
|
],
|
||||||
'test': [], # To be ported or migrate to unit tests or scenarios
|
'installable': True,
|
||||||
'auto_install': False,
|
}
|
||||||
'installable': True,
|
|
||||||
'images': []
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Author: Romain Deheele
|
|
||||||
# Copyright 2013 Camptocamp SA
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, api
|
|
||||||
|
|
||||||
|
|
||||||
class EasyReconcileAdvanced(models.AbstractModel):
|
|
||||||
|
|
||||||
_inherit = 'easy.reconcile.advanced'
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _base_columns(self):
|
|
||||||
""" Mandatory columns for move lines queries
|
|
||||||
An extra column aliased as ``key`` should be defined
|
|
||||||
in each query."""
|
|
||||||
aml_cols = super(EasyReconcileAdvanced, self)._base_columns()
|
|
||||||
aml_cols.append('account_move_line.purchase_line_id')
|
|
||||||
aml_cols.append('account_move_line.product_id')
|
|
||||||
return aml_cols
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
##############################################################################
|
|
||||||
#
|
|
||||||
# Author: Romain Deheele
|
|
||||||
# Copyright 2013 Camptocamp SA
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
from openerp import models, api
|
|
||||||
|
|
||||||
|
|
||||||
class AccountEasyReconcileMethod(models.Model):
|
|
||||||
|
|
||||||
_inherit = 'account.easy.reconcile.method'
|
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _get_all_rec_method(self):
|
|
||||||
methods = super(AccountEasyReconcileMethod, self).\
|
|
||||||
_get_all_rec_method()
|
|
||||||
methods += [
|
|
||||||
('easy.reconcile.advanced.by.purchase.line',
|
|
||||||
'Advanced. GR/IR Key as partner, product, purchase order line.'),
|
|
||||||
]
|
|
||||||
return methods
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import easy_reconcile
|
||||||
|
from . import base_advanced_reconciliation
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from openerp import models, api
|
||||||
|
|
||||||
|
|
||||||
|
class EasyReconcileAdvanced(models.AbstractModel):
|
||||||
|
|
||||||
|
_inherit = 'easy.reconcile.advanced'
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _base_columns(self):
|
||||||
|
""" Mandatory columns for move lines queries
|
||||||
|
An extra column aliased as ``key`` should be defined
|
||||||
|
in each query."""
|
||||||
|
aml_cols = super(EasyReconcileAdvanced, self)._base_columns()
|
||||||
|
aml_cols.append('account_move_line.purchase_line_id')
|
||||||
|
aml_cols.append('account_move_line.product_id')
|
||||||
|
return aml_cols
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from openerp import models, api
|
||||||
|
|
||||||
|
|
||||||
|
class AccountEasyReconcileMethod(models.Model):
|
||||||
|
|
||||||
|
_inherit = 'account.easy.reconcile.method'
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_all_rec_method(self):
|
||||||
|
methods = super(AccountEasyReconcileMethod, self).\
|
||||||
|
_get_all_rec_method()
|
||||||
|
methods += [
|
||||||
|
('easy.reconcile.advanced.by.purchase.line',
|
||||||
|
'Advanced. GR/IR Key as partner, product, purchase order line.'),
|
||||||
|
]
|
||||||
|
return methods
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
from . import advanced_reconciliation
|
||||||
@@ -1,22 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
##############################################################################
|
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||||
#
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||||
# Author: Romain Deheele. Copyright Camptocamp SA
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
from openerp import models, api
|
from openerp import models, api
|
||||||
|
|
||||||
@@ -34,7 +18,7 @@ class EasyReconcileAdvancedTransactionByPurchaseLine(models.TransientModel):
|
|||||||
skip on some conditions. ie: ref or partner_id is empty.
|
skip on some conditions. ie: ref or partner_id is empty.
|
||||||
"""
|
"""
|
||||||
return not move_line.get('partner_id') and move_line.get(
|
return not move_line.get('partner_id') and move_line.get(
|
||||||
'product_id') and move_line.get('purchase_line_id')
|
'product_id') and move_line.get('purchase_line_id')
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _matchers(self, move_line):
|
def _matchers(self, move_line):
|
||||||
Reference in New Issue
Block a user