Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] mig l10n_br_account_due_list #2268

Merged
merged 23 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f4c44ca
[ADD] l10n_br_account_due_list module
renatonlima Sep 28, 2021
fbe84d0
[UPD] Update l10n_br_account_due_list.pot
oca-travis Sep 30, 2021
03ef154
[UPD] README.rst
OCA-git-bot Sep 30, 2021
b70848b
l10n_br_account_due_list 12.0.2.0.0
OCA-git-bot Sep 30, 2021
9ccbbdb
[MIG] l10n_br_account_due_list: Migration to 13.0
rvalyi Oct 18, 2021
0412129
[UPD] Update l10n_br_account_due_list.pot
oca-travis Oct 18, 2021
45c3c54
[UPD] README.rst
OCA-git-bot Oct 18, 2021
0a9200d
[MIG] l10n_br_account_due_list: Migration to 14.0
rvalyi Oct 18, 2021
2fe7ee0
[UPD] Update l10n_br_account_due_list.pot
oca-travis Oct 19, 2021
14e860e
[UPD] README.rst
OCA-git-bot Oct 19, 2021
63ddf0e
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Nov 9, 2021
5f85f5a
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Jul 28, 2022
be11f1e
[ADD] receivable and payable tests
rvalyi Dec 18, 2022
b321101
[UPD] README.rst
OCA-git-bot Dec 22, 2022
acefed0
l10n_br_account_due_list 14.0.1.0.1
OCA-git-bot Dec 22, 2022
e7f2127
[REF] test cleanup
rvalyi Dec 23, 2022
6fff990
l10n_br_account_due_list 14.0.1.0.2
OCA-git-bot Dec 26, 2022
2792ea7
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Jan 7, 2023
7ca57ba
[IMP] l10n_br_account_due_list: black, isort, prettier
mileo Oct 16, 2022
f143ae3
[MIG][l10n_br_account_due_list] Bump module version to 16.0.1.0.0
mileo Oct 28, 2022
5f6df37
[ADD] oca_dependencies -> account-payment
mileo Oct 28, 2022
384b67c
[MIG][l10n_br_account_due_list] Adapt fields to v16 models
mileo Oct 28, 2022
23db094
[MIG] update tests
rvalyi Dec 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions l10n_br_account_due_list/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
==========================
Brazilian Account Due List
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fl10n--brazil-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_account_due_list
:alt: OCA/l10n-brazil
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-brazil-14-0/l10n-brazil-14-0-l10n_br_account_due_list
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/124/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module creates the financial_move_line_ids field to list the payable or receivable account move line on invoices.

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

* do this ...

Configuration
=============

This module does not need any configuration.

Usage
=====

In the invoice form view, there will be two tabs:

* Receivable in the case of customer invoices and payable in the case of supplier invoices:

.. image:: https://raw.githubusercontent.com/OCA/l10n-brazil/14.0/l10n_br_account_due_list/static/img/l10n_br_account_due_list_receivable.png

* Payments with list of invoice payments:

.. image:: https://raw.githubusercontent.com/OCA/l10n-brazil/14.0/l10n_br_account_due_list/static/img/l10n_br_account_due_list_payable.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-brazil/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/l10n-brazil/issues/new?body=module:%20l10n_br_account_due_list%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* `AKRETION <https://akretion.com/pt-BR/>`_:

* Renato Lima <[email protected]>
* Raphaël Valyi <[email protected]>

* Antonio Neto <[email protected]>

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-renatonlima| image:: https://github.com/renatonlima.png?size=40px
:target: https://github.com/renatonlima
:alt: renatonlima
.. |maintainer-rvalyi| image:: https://github.com/rvalyi.png?size=40px
:target: https://github.com/rvalyi
:alt: rvalyi

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-renatonlima| |maintainer-rvalyi|

This module is part of the `OCA/l10n-brazil <https://github.com/OCA/l10n-brazil/tree/14.0/l10n_br_account_due_list>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions l10n_br_account_due_list/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import models
19 changes: 19 additions & 0 deletions l10n_br_account_due_list/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2021 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Brazilian Account Due List",
"category": "Localisation",
"development_status": "Production/Stable",
"license": "AGPL-3",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-brazil",
"version": "16.0.1.0.0",
"depends": ["account_due_list"],
"data": [
"views/account_invoice_view.xml",
],
"installable": True,
"auto_install": True,
"maintainers": ["renatonlima", "rvalyi"],
}
63 changes: 63 additions & 0 deletions l10n_br_account_due_list/i18n/l10n_br_account_due_list.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_br_account_due_list
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__display_name
msgid "Display Name"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__financial_move_line_ids
msgid "Financial Move Lines"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__id
msgid "ID"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model,name:l10n_br_account_due_list.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move____last_update
msgid "Last Modified on"
msgstr ""

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payables"
msgstr ""

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__payment_move_line_ids
msgid "Payment Move Lines"
msgstr ""

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payments"
msgstr ""

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Receivables"
msgstr ""
66 changes: 66 additions & 0 deletions l10n_br_account_due_list/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_br_account_due_list
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-01-07 20:39+0000\n"
"Last-Translator: Marcel Savegnago <[email protected]>\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__display_name
msgid "Display Name"
msgstr "Nome Exibido"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__financial_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__financial_move_line_ids
msgid "Financial Move Lines"
msgstr "Linhas de Movimentação Financeira"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__id
msgid "ID"
msgstr "ID"

#. module: l10n_br_account_due_list
#: model:ir.model,name:l10n_br_account_due_list.model_account_move
msgid "Journal Entry"
msgstr "Lançamento de Diário"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move____last_update
msgid "Last Modified on"
msgstr "Última Modificação em"

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payables"
msgstr "Contas a Pagar"

#. module: l10n_br_account_due_list
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_bank_statement_line__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_move__payment_move_line_ids
#: model:ir.model.fields,field_description:l10n_br_account_due_list.field_account_payment__payment_move_line_ids
msgid "Payment Move Lines"
msgstr "Linhas de Movimento para Pagamento"

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Payments"
msgstr "Pagamentos"

#. module: l10n_br_account_due_list
#: model_terms:ir.ui.view,arch_db:l10n_br_account_due_list.invoice_form
msgid "Receivables"
msgstr "Contas a Receber"
3 changes: 3 additions & 0 deletions l10n_br_account_due_list/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from . import account_invoice
41 changes: 41 additions & 0 deletions l10n_br_account_due_list/models/account_invoice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (C) 2021 - TODAY Renato Lima - Akretion
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import api, fields, models


class AccountInvoice(models.Model):
_inherit = "account.move"

financial_move_line_ids = fields.Many2many(
comodel_name="account.move.line",
relation="account_invoice_account_financial_move_line_rel",
compute="_compute_financial",
store=True,
string="Financial Move Lines",
)

payment_move_line_ids = fields.Many2many(
"account.move.line",
string="Payment Move Lines",
compute="_compute_payments",
store=True,
)

@api.depends("line_ids", "state")
def _compute_financial(self):
for move in self:
lines = move.line_ids.filtered(
lambda l: l.account_id.account_type
in ("asset_receivable", "liability_payable")
)
move.financial_move_line_ids = lines.sorted()

@api.depends("line_ids.amount_residual")
def _compute_payments(self):
for move in self:
(
invoice_partials,
exchange_diff_moves,
) = move._get_reconciled_invoices_partials()
move.payment_move_line_ids = [partial[2].id for partial in invoice_partials]
1 change: 1 addition & 0 deletions l10n_br_account_due_list/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module does not need any configuration.
6 changes: 6 additions & 0 deletions l10n_br_account_due_list/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* `AKRETION <https://akretion.com/pt-BR/>`_:

* Renato Lima <[email protected]>
* Raphaël Valyi <[email protected]>

* Antonio Neto <[email protected]>
1 change: 1 addition & 0 deletions l10n_br_account_due_list/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module creates the financial_move_line_ids field to list the payable or receivable account move line on invoices.
Empty file.
3 changes: 3 additions & 0 deletions l10n_br_account_due_list/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To install this module, you need to:

* do this ...
Empty file.
9 changes: 9 additions & 0 deletions l10n_br_account_due_list/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
In the invoice form view, there will be two tabs:

* Receivable in the case of customer invoices and payable in the case of supplier invoices:

.. image:: ../static/img/l10n_br_account_due_list_receivable.png

* Payments with list of invoice payments:

.. image:: ../static/img/l10n_br_account_due_list_payable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading