Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 38 additions & 0 deletions l10n_fr_fec_group_sale_purchase/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

===============================================
Option to Group lines by sale, purchase journls
===============================================

Usage
=====

* This module extends the features of l10n_fr_account module.

* It enables to group the report lines by sale and purchase journals.

|

.. image:: /l10n_fr_fec_group_sale_purchase/static/src/image/FEC_report_wizard.png
:width: 1100px


|

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

Bugs are tracked on `GitHub Issues
<https://github.com/druidoo/FoodCoops/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.

Credits
=======

Contributors
------------

* La Louve <http://www.lalouve.net/>
* Druidoo <https://www.druidoo.io>
1 change: 1 addition & 0 deletions l10n_fr_fec_group_sale_purchase/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizard
14 changes: 14 additions & 0 deletions l10n_fr_fec_group_sale_purchase/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "France - FEC Group Sale Purchase",
"version": "18.0.1.0.0",
"category": "Localization",
"summary": "Fichier d'Échange Informatisé (FEC) for France",
"author": "Druidoo, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-france",
"license": "AGPL-3",
"depends": ["l10n_fr_fec_oca"],
"data": [
"wizard/account_fr_fec_view.xml",
],
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fr_fec_group_sale_purchase
#
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: l10n_fr_fec_group_sale_purchase
#: model:ir.model,name:l10n_fr_fec_group_sale_purchase.model_account_fr_fec
msgid "Ficher Echange Informatise"
msgstr ""

#. module: l10n_fr_fec_group_sale_purchase
#: model:ir.model.fields,field_description:l10n_fr_fec_group_sale_purchase.field_account_fr_fec__group_sale_purchase
msgid "Group Sale and Purchase Journals"
msgstr ""

3 changes: 3 additions & 0 deletions l10n_fr_fec_group_sale_purchase/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions l10n_fr_fec_group_sale_purchase/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- La Louve \<<http://www.lalouve.net/>\>
- Druidoo \<<https://www.druidoo.io/>\>
- Trobz \<<https://www.trobz.com/>\>
- Phan Hong Phuc \<<[email protected]>\>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions l10n_fr_fec_group_sale_purchase/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import test_fec_export
45 changes: 45 additions & 0 deletions l10n_fr_fec_group_sale_purchase/tests/test_fec_export.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from odoo import Command
from odoo.tests.common import tagged

from odoo.addons.l10n_fr_fec_oca.tests.test_fec_export import TestFECExportOCA


@tagged("post_install_l10n", "post_install", "-at_install")
class TestFECExportGroupSalePurchase(TestFECExportOCA):
def test_fec_export_group_sale_purchase(self):
self.init_invoice(
"out_invoice", self.partner_a, "2019-01-01", amounts=[1000, 2000], post=True
)
inv = self.init_invoice(
"out_invoice", self.partner_a, "2020-01-01", amounts=[1000, 2000]
)
inv.write(
{
"line_ids": [
Command.create(
{
"name": "Note",
"display_type": "line_note",
}
)
]
}
)
inv.action_post()
# Create a new FEC export
fec_export = self.env["l10n_fr.fec.export.wizard"].create(
{
"date_from": "2020-01-01",
"date_to": "2020-12-31",
"group_sale_purchase": True,
}
)
result = fec_export.generate_fec()
self.assertEqual(
result["file_content"].decode(),
"JournalCode|JournalLib|EcritureNum|EcritureDate|CompteNum|CompteLib|CompAuxNum|CompAuxLib|PieceRef|PieceDate|EcritureLib|Debit|Credit|EcritureLet|DateLet|ValidDate|Montantdevise|Idevise\r\n" # noqa: E501
"OUV|Balance initiale|OUVERTURE/2020|20200101|999999|Undistributed Profits/Losses|||-|20200101|/|0,00| 000000000003000,00|||20200101||\r\n" # noqa: E501
f"OUV|Balance initiale|OUVERTURE/2020|20200101|121000|Account Receivable|{self.partner_a.id}|partner_a|-|20200101|/| 000000000003000,00|0,00|||20200101||\r\n" # noqa: E501
f"INV|Customer Invoices|INV/2020/00001|20200101|121000|Account Receivable|{self.partner_a.id}|partner_a|-|20200101|INV/2020/00001| 000000000003000,00|0,00|||20200101| 000000000003000,00|USD\r\n" # noqa: E501
"INV|Customer Invoices|INV/2020/00001|20200101|400000|Product Sales|||-|20200101|test line|0,00| 000000000003000,00|||20200101|-000000000002000,00|USD", # noqa: E501
)
1 change: 1 addition & 0 deletions l10n_fr_fec_group_sale_purchase/wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_fr_fec
Loading
Loading