Merge PR #435 into 14.0

Signed-off-by AaronHForgeFlow
This commit is contained in:
OCA-git-bot
2022-03-03 11:48:11 +00:00
17 changed files with 351 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
=======================================
Account Mass Reconcile by Purchase Line
=======================================
This module extends the functionality of account_mass_reconcile and
allow an user to reconcile debits and credits of an Account
using the PO Line and Product 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
=====
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. 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/12.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<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 smash it by providing detailed and welcomed feedback.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Contributors
------------
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Miquel Raïch <miquel.raich@eficent.com>
* Lois Rilo <lois.rilo@eficent.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://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 https://odoo-community.org.

View File

@@ -0,0 +1 @@
from . import models

View File

@@ -0,0 +1,16 @@
# Copyright 2020 ForgeFlow S.L.
# 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": "14.0.1.0.0",
"author": "ForgeFlow, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-reconcile",
"category": "Finance",
"depends": ["account_mass_reconcile", "account_move_line_purchase_info"],
"license": "AGPL-3",
"data": ["security/ir.model.access.csv", "views/mass_reconcile.xml"],
"installable": True,
"auto_install": False,
}

View File

@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_mass_reconcile_by_purchase_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.ui.view,arch_db:account_mass_reconcile_by_purchase_line.account_mass_reconcile_form
msgid "Advanced. Purchase Order Line"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_create_uid
msgid "Created by"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_create_date
msgid "Created on"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_display_name
msgid "Display Name"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_id
msgid "ID"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line___last_update
msgid "Last Modified on"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_write_date
msgid "Last Updated on"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.ui.view,arch_db:account_mass_reconcile_by_purchase_line.account_mass_reconcile_form
msgid "Match multiple debit vs multiple credit entries. Allow partial reconciliation. The lines should have the same partner, product and PO lines to be reconciled."
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model,name:account_mass_reconcile_by_purchase_line.model_mass_reconcile_advanced
msgid "mass.reconcile.advanced"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model,name:account_mass_reconcile_by_purchase_line.model_mass_reconcile_advanced_by_purchase_line
msgid "mass.reconcile.advanced.by.purchase.line"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model,name:account_mass_reconcile_by_purchase_line.model_account_mass_reconcile_method
msgid "reconcile method for account_mass_reconcile"
msgstr ""

View File

@@ -0,0 +1,80 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_mass_reconcile_by_purchase_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2018-08-12 00:01+0000\n"
"Last-Translator: Osoul <baruni@osoul.ly>\n"
"Language-Team: none\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
"X-Generator: Weblate 3.1.1\n"
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.ui.view,arch_db:account_mass_reconcile_by_purchase_line.account_mass_reconcile_form
msgid "Advanced. Purchase Order Line"
msgstr "متطور. أوامر الشراء"
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_create_uid
msgid "Created by"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_create_date
msgid "Created on"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_display_name
msgid "Display Name"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_id
msgid "ID"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line___last_update
msgid "Last Modified on"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model.fields,field_description:account_mass_reconcile_by_purchase_line.field_mass_reconcile_advanced_by_purchase_line_write_date
msgid "Last Updated on"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.ui.view,arch_db:account_mass_reconcile_by_purchase_line.account_mass_reconcile_form
msgid "Match multiple debit vs multiple credit entries. Allow partial reconciliation. The lines should have the same partner, product and PO lines to be reconciled."
msgstr ""
"تسوية مجموعة قيود مدينة ودائنة. السماح بالتسوية الجزئية. القيود يجب ان تحتوي "
"على نفس الشريك، والمنتج وبند أمر الشراء."
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model,name:account_mass_reconcile_by_purchase_line.model_mass_reconcile_advanced
msgid "mass.reconcile.advanced"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model,name:account_mass_reconcile_by_purchase_line.model_mass_reconcile_advanced_by_purchase_line
msgid "mass.reconcile.advanced.by.purchase.line"
msgstr ""
#. module: account_mass_reconcile_by_purchase_line
#: model:ir.model,name:account_mass_reconcile_by_purchase_line.model_account_mass_reconcile_method
msgid "reconcile method for account_mass_reconcile"
msgstr ""

View File

@@ -0,0 +1,3 @@
from . import mass_reconcile
from . import base_advanced_reconciliation
from . import advanced_reconciliation

View File

@@ -0,0 +1,31 @@
# Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class MassReconcileAdvancedByPurchaseLine(models.TransientModel):
_name = "mass.reconcile.advanced.by.purchase.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("product_id") and move_line.get("purchase_line_id"))
@staticmethod
def _matchers(move_line):
return (
("product_id", move_line["product_id"]),
("purchase_line_id", move_line["purchase_line_id"]),
)
@staticmethod
def _opposite_matchers(move_line):
yield ("product_id", move_line["product_id"])
yield ("purchase_line_id", move_line["purchase_line_id"])

View File

@@ -0,0 +1,14 @@
# 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.purchase_line_id")
aml_cols.append("account_move_line.product_id")
return aml_cols

View File

@@ -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.purchase.line",
"Advanced. Product, purchase order line.",
),
]
return methods

View File

@@ -0,0 +1,3 @@
* Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
* Miquel Raïch <miquel.raich@forgeflow.com>
* Lois Rilo <lois.rilo@forgeflow.com>

View File

@@ -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 PO Line and Product 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*'.

View File

@@ -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. Product, purchase order line'.

View File

@@ -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_purchase_line,access_mass_reconcile_advanced_by_purchase_line,model_mass_reconcile_advanced_by_purchase_line,base.group_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_mass_reconcile_advanced_by_purchase_line access_mass_reconcile_advanced_by_purchase_line model_mass_reconcile_advanced_by_purchase_line base.group_user 1 1 1 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<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
for="reconcile_method"
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>
</odoo>

View File

@@ -0,0 +1 @@
../../../../account_mass_reconcile_by_purchase_line

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)