improved with OCA guidelines

This commit is contained in:
jbeficent
2016-01-26 22:19:35 +01:00
committed by mreficent
parent c2671d34b8
commit d7bfce6fe5
11 changed files with 144 additions and 151 deletions

View File

@@ -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.

View File

@@ -1,23 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# 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/>.
#
##############################################################################
# © 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
from . import advanced_reconciliation
from . import models
from . import wizards

View File

@@ -1,40 +1,21 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# 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/>.
#
##############################################################################
# © 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).
{'name': 'Advanced Reconcile Transaction by Purchase Line',
'description': """
Advanced reconciliation method for the module account_advanced_reconcile
========================================================================
Reconcile rules with transaction_ref
""",
'version': '1.0.1',
'author': "Camptocamp,Odoo Community Association (OCA)",
'category': 'Finance',
'website': 'http://www.camptocamp.com',
'depends': ['account_advanced_reconcile',
'account_move_line_purchase_info'],
'data': ['easy_reconcile_view.xml'],
'demo': [],
'test': [], # To be ported or migrate to unit tests or scenarios
'auto_install': False,
{
"name": "Account Advanced Reconcile Transaction by Purchase Line",
"summary": "Allows to reconcile based on the PO line",
"version": "8.0.1.0.0",
"author": "Eficent Business and IT Consulting Services S.L., "
"Odoo Community Association (OCA)",
"website": "http://www.eficent.com",
"category": "Generic",
"depends": ["account_advanced_reconcile",
"account_move_line_purchase_info"
],
"license": "AGPL-3",
"data": [
"views/easy_reconcile_view.xml",
],
'installable': True,
'images': []
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -1,22 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# 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/>.
#
##############################################################################
# © 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