mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[MIG] account_mass_reconcile_by_purchase_line: Migration to 9.0
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
# -*- 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).
|
||||
|
||||
{
|
||||
"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,
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
# -*- 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
|
||||
@@ -1,20 +0,0 @@
|
||||
# -*- 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
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
<record id="view_easy_reconcile_form" model="ir.ui.view">
|
||||
<field name="name">account.easy.reconcile.form</field>
|
||||
<field name="model">account.easy.reconcile</field>
|
||||
<field name="inherit_id" ref="account_easy_reconcile.account_easy_reconcile_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="information" position="inside">
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="4"
|
||||
string="Advanced. Purchase Order Line"/>
|
||||
<label string="Match multiple debit vs multiple credit entries. Allow partial reconciliation.
|
||||
The credit entry GR/IR key (partner, product, purchase order line) is matched vs the debit entry GR/IR key." colspan="4"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="4" string="Advanced. Purchase Order Line"/>
|
||||
<label string="Match multiple debit vs multiple credit entries. Allow partial reconciliation.
|
||||
The credit entry GR/IR key (partner, product, purchase order line) is matched vs the debit entry GR/IR key." colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,33 +0,0 @@
|
||||
# -*- 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 EasyReconcileAdvancedTransactionByPurchaseLine(models.TransientModel):
|
||||
|
||||
_name = 'easy.reconcile.advanced.by.purchase.line'
|
||||
_inherit = 'easy.reconcile.advanced'
|
||||
|
||||
@api.model
|
||||
def _skip_line(self, 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('partner_id') and move_line.get(
|
||||
'product_id') and move_line.get('purchase_line_id')
|
||||
|
||||
@api.model
|
||||
def _matchers(self, move_line):
|
||||
return (('partner_id', move_line['partner_id']),
|
||||
('product_id', move_line['product_id']),
|
||||
('purchase_line_id', move_line['purchase_line_id']))
|
||||
|
||||
@api.model
|
||||
def _opposite_matchers(self, move_line):
|
||||
yield ('partner_id', (move_line['partner_id']))
|
||||
yield ('product_id', (move_line['product_id']))
|
||||
yield ('purchase_line_id', (move_line['purchase_line_id']))
|
||||
@@ -60,9 +60,8 @@ The lines should have the same amount (with the write-off) and the same referenc
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="4" string="Advanced. Partner and Ref"/>
|
||||
<label string="Match multiple debit vs multiple credit entries. Allow partial reconciliation.
|
||||
The lines should have the partner, the credit entry ref. is matched vs the debit entry ref. or name." colspan="4"/>
|
||||
The lines should have the same partner, and the credit entry ref. is matched with the debit entry ref. or name." colspan="4"/>
|
||||
</group>
|
||||
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
||||
@@ -2,41 +2,38 @@
|
||||
:target: https://www.gnu.org/licenses/agpl.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
=======================================================
|
||||
Account Advanced Reconcile Transaction by Purchase Line
|
||||
=======================================================
|
||||
=======================================
|
||||
Account Mass Reconcile by Purchase Line
|
||||
=======================================
|
||||
|
||||
This module will allow a user to reconcile debits and credits of an Account
|
||||
This module extends the functionality of acccount_mass_reconcile and
|
||||
allow an 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'.
|
||||
accounting system, with the accrual account '*Goods Received Not Invoiced*'.
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
* Go to 'Invoicing / Periodic Processing / Reconciliation / Easy Automatic
|
||||
Reconciliation'.
|
||||
To use this module, you need to:
|
||||
|
||||
* Go to 'Accounting / Adviser / Mass Automatic Reconcile'.
|
||||
|
||||
* Create a new reconciliation profile, and select a new configuration entry
|
||||
with type 'Advanced. GR/IR Key as partner, product, purchase order line.'.
|
||||
with type 'Advanced. 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
|
||||
:target: https://runbot.odoo-community.org/runbot/98/9.0
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/OCA/98/issues>`_. In case of trouble, please
|
||||
<https://github.com/OCA/bank-statement-reconcile/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**>`_.
|
||||
help us smashing it by providing a detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
@@ -50,13 +47,14 @@ Contributors
|
||||
------------
|
||||
|
||||
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
|
||||
* Miquel Raïch <miquel.raich@eficent.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: http://odoo-community.org
|
||||
:target: https://odoo-community.org
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
@@ -64,4 +62,4 @@ 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.
|
||||
To contribute to this module, please visit https://odoo-community.org.
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||
# © 2015-17 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 models
|
||||
22
account_mass_reconcile_by_purchase_line/__openerp__.py
Normal file
22
account_mass_reconcile_by_purchase_line/__openerp__.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-17 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": "Account Mass Reconcile by Purchase Line",
|
||||
"summary": "Allows to reconcile based on the PO line",
|
||||
"version": "9.0.1.0.0",
|
||||
"author": "Eficent, "
|
||||
"Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/bank-statement-reconcile",
|
||||
"category": "Finance",
|
||||
"depends": ["account_mass_reconcile",
|
||||
"account_move_line_purchase_info"
|
||||
],
|
||||
"license": "AGPL-3",
|
||||
"data": [
|
||||
"views/mass_reconcile.xml",
|
||||
],
|
||||
"installable": True,
|
||||
"auto_install": False,
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-17 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 mass_reconcile
|
||||
from . import base_reconciliation
|
||||
@@ -1,20 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||
# © 2015-17 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
|
||||
from openerp import api, models
|
||||
|
||||
|
||||
class EasyReconcileAdvanced(models.AbstractModel):
|
||||
|
||||
_inherit = 'easy.reconcile.advanced'
|
||||
class MassReconcileBase(models.AbstractModel):
|
||||
_inherit = 'mass.reconcile.base'
|
||||
|
||||
@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 = super(MassReconcileBase, 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,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-17 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 api, models
|
||||
|
||||
|
||||
class AccountMassReconcileMethod(models.Model):
|
||||
_inherit = 'account.mass.reconcile.method'
|
||||
|
||||
@api.model
|
||||
def _get_all_rec_method(self):
|
||||
methods = super(AccountMassReconcileMethod, self)._get_all_rec_method()
|
||||
methods += [
|
||||
('mass.reconcile.advanced.by.purchase.line',
|
||||
'Advanced. Partner, product, purchase order line.'),
|
||||
]
|
||||
return methods
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<record id="account_mass_reconcile_form" model="ir.ui.view">
|
||||
<field name="name">account.mass.reconcile.form</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="model">account.mass.reconcile</field>
|
||||
<field name="inherit_id" ref="account_mass_reconcile.account_mass_reconcile_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page name="information" position="inside">
|
||||
<group colspan="2" col="2">
|
||||
<separator colspan="4" string="Advanced. Purchase Order Line"/>
|
||||
<label string="Match multiple debit vs multiple credit entries. Allow partial reconciliation.
|
||||
The lines should have the same partner, product and PO lines to be reconciled." colspan="4"/>
|
||||
</group>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
</openerp>
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015 Eficent Business and IT Consulting Services S.L. (www.eficent.com)
|
||||
# © 2015-17 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
|
||||
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2015-17 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 api, models
|
||||
|
||||
|
||||
class MassReconcileAdvancedByPurchaseLine(models.TransientModel):
|
||||
_name = 'mass.reconcile.advanced.by.purchase.line'
|
||||
_inherit = 'mass.reconcile.advanced'
|
||||
|
||||
@api.multi
|
||||
def _skip_line(self, 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('partner_id') and move_line.get(
|
||||
'product_id') and move_line.get('purchase_line_id'))
|
||||
|
||||
@api.multi
|
||||
def _matchers(self, move_line):
|
||||
return (('partner_id', move_line['partner_id']),
|
||||
('product_id', move_line['product_id']),
|
||||
('purchase_line_id', move_line['purchase_line_id']))
|
||||
|
||||
@api.multi
|
||||
def _opposite_matchers(self, move_line):
|
||||
yield ('partner_id', move_line['partner_id'])
|
||||
yield ('product_id', move_line['product_id'])
|
||||
yield ('purchase_line_id', move_line['purchase_line_id'])
|
||||
@@ -1 +1,2 @@
|
||||
account-financial-tools
|
||||
bank-payment
|
||||
|
||||
Reference in New Issue
Block a user