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] edi_account_oca #15

Merged
merged 26 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6fc1d01
[ADD] edi_account
etobella Nov 30, 2020
39b7094
[UPD] Update edi_account.pot
oca-travis Dec 1, 2020
c48ebe2
[UPD] README.rst
OCA-git-bot Dec 1, 2020
d0c3b99
edi_account 13.0.1.0.1
OCA-git-bot Dec 1, 2020
a8d8a3e
[CHG] edi: Use more permissive licence: AGPL-> LGPL
etobella Mar 10, 2021
db30e28
[UPD] README.rst
OCA-git-bot Mar 15, 2021
cc7432c
edi_account 13.0.1.0.2
OCA-git-bot Mar 15, 2021
3c327df
[MIG] edi_account_oca: Migration to 14.0
etobella May 6, 2021
25a0446
[UPD] Update edi_account_oca.pot
oca-travis May 13, 2021
4393af4
[UPD] README.rst
OCA-git-bot May 13, 2021
8cdd63c
Added translation using Weblate (French)
Yvesldff Jun 17, 2021
5cc8f35
Translated using Weblate (French)
Yvesldff Jun 17, 2021
0c67201
[IMP] edi_account: Add a menu for accounting people
etobella Oct 5, 2021
0c33b70
[IMP] edi_account: Add a disable automatic on account.move
etobella Oct 5, 2021
137f329
[UPD] Update edi_account_oca.pot
Dec 9, 2021
00a5b1f
edi_account_oca 14.0.1.1.0
OCA-git-bot Dec 9, 2021
6df3817
Update translation files
oca-transbot Dec 9, 2021
51685c7
[MIG] edi_account_oca: Migration to 15.0
ao-landoo Feb 23, 2022
f259e77
[UPD] Update edi_account_oca.pot
Mar 1, 2022
dcadaeb
[UPD] README.rst
OCA-git-bot Mar 1, 2022
24853ea
[FIX] edi_account_oca: Tests failing
etobella May 13, 2022
f52ddb5
edi_account_oca 15.0.1.0.1
OCA-git-bot May 13, 2022
cdc62de
[UPD] Update edi_account_oca.pot
Feb 2, 2023
e637b3c
Update translation files
weblate Feb 2, 2023
2cb384f
[IMP] edi_account_oca: pre-commit stuff
OriolMForgeFlow Aug 1, 2023
6a3368a
[MIG] edi_account_oca: Migration to 16.0
OriolMForgeFlow Aug 1, 2023
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
96 changes: 96 additions & 0 deletions edi_account_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
===========
Edi Account
===========

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github
:target: https://github.com/OCA/edi/tree/15.0/edi_account_oca
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-15-0/edi-15-0-edi_account_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/226/15.0
:alt: Try me on Runbot

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

This module intends to create a base to be extended by local edi rules
for accounting.

In order to add a new integration for an account, you need to create a listener:

.. code-block:: python

class MyEventListener(Component):
_name = "account.move.event.listener.demo"
_inherit = "base.event.listener"
_apply_on = ["account.move"]

def on_post_account_move(self, move):
"""Add your code here about creation of record"""

A skip if decorator can be added in order to make some checks on the state of the move

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/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/edi/issues/new?body=module:%20edi_account_oca%0Aversion:%2015.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
~~~~~~~

* Creu Blanca

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

* Enric Tobella <etobella@creublanca.es>

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

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

|maintainer-etobella|

This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/15.0/edi_account_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions edi_account_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions edi_account_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2020 Creu Blanca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
"name": "Edi Account",
"summary": """
Define EDI Configuration for Account Moves""",
"version": "16.0.1.0.0",
"license": "LGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"maintainers": ["etobella"],
"development_status": "Beta",
"website": "https://github.com/OCA/edi-framework",
"depends": ["account", "edi_oca", "component_event"],
"data": [
"views/account_journal.xml",
"views/res_partner.xml",
"views/account_move.xml",
"views/edi_exchange_record.xml",
],
"demo": [],
}
30 changes: 30 additions & 0 deletions edi_account_oca/i18n/edi_account.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.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: edi_account
#: model_terms:ir.ui.view,arch_db:edi_account.account_move_form_view
msgid "<span class=\"o_stat_text\">EDI</span>"
msgstr ""

#. module: edi_account
#: model_terms:ir.ui.view,arch_db:edi_account.view_account_journal_form
#: model_terms:ir.ui.view,arch_db:edi_account.view_partner_form
msgid "EDI Configuration"
msgstr ""

#. module: edi_account
#: model:ir.model,name:edi_account.model_account_move
msgid "Journal Entries"
msgstr ""
89 changes: 89 additions & 0 deletions edi_account_oca/i18n/edi_account_oca.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_account_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.account_move_form_view
msgid "<span class=\"o_stat_text\">EDI</span>"
msgstr ""

#. module: edi_account_oca
#: model:ir.actions.act_window,name:edi_account_oca.act_open_edi_exchange_record_account_move_view
msgid "Account Moves Exchange Record"
msgstr ""

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.account_move_form_view
msgid "Disable"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_bank_statement_line__disable_edi_auto
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__disable_edi_auto
#: model:ir.model.fields,field_description:edi_account_oca.field_account_payment__disable_edi_auto
msgid "Disable Edi Auto"
msgstr ""

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.view_account_journal_form
#: model_terms:ir.ui.view,arch_db:edi_account_oca.view_partner_form
msgid "EDI Configuration"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__edi_config
msgid "Edi Config"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__edi_has_form_config
msgid "Edi Has Form Config"
msgstr ""

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.account_move_form_view
msgid "Electronic Data Interchange"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__exchange_record_ids
msgid "Exchange Record"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__exchange_record_count
msgid "Exchange Record Count"
msgstr ""

#. module: edi_account_oca
#: model:ir.ui.menu,name:edi_account_oca.menu_account_edi_root
msgid "Exchange records"
msgstr ""

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

#. module: edi_account_oca
#: model:ir.ui.menu,name:edi_account_oca.menu_account_edi_exchange_record
msgid "Moves"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,help:edi_account_oca.field_account_bank_statement_line__disable_edi_auto
#: model:ir.model.fields,help:edi_account_oca.field_account_move__disable_edi_auto
#: model:ir.model.fields,help:edi_account_oca.field_account_payment__disable_edi_auto
msgid "When marked, EDI could be avoided"
msgstr ""
95 changes: 95 additions & 0 deletions edi_account_oca/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_account_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-06-17 15:48+0000\n"
"Last-Translator: Yves Le Doeuff <yld@alliasys.fr>\n"
"Language-Team: none\n"
"Language: fr\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.3.2\n"

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.account_move_form_view
msgid "<span class=\"o_stat_text\">EDI</span>"
msgstr ""

#. module: edi_account_oca
#: model:ir.actions.act_window,name:edi_account_oca.act_open_edi_exchange_record_account_move_view
msgid "Account Moves Exchange Record"
msgstr ""

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.account_move_form_view
msgid "Disable"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_bank_statement_line__disable_edi_auto
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__disable_edi_auto
#: model:ir.model.fields,field_description:edi_account_oca.field_account_payment__disable_edi_auto
msgid "Disable Edi Auto"
msgstr ""

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.view_account_journal_form
#: model_terms:ir.ui.view,arch_db:edi_account_oca.view_partner_form
msgid "EDI Configuration"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__edi_config
msgid "Edi Config"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__edi_has_form_config
msgid "Edi Has Form Config"
msgstr ""

#. module: edi_account_oca
#: model_terms:ir.ui.view,arch_db:edi_account_oca.account_move_form_view
msgid "Electronic Data Interchange"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__exchange_record_ids
msgid "Exchange Record"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,field_description:edi_account_oca.field_account_move__exchange_record_count
msgid "Exchange Record Count"
msgstr ""

#. module: edi_account_oca
#: model:ir.ui.menu,name:edi_account_oca.menu_account_edi_root
msgid "Exchange records"
msgstr ""

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

#. module: edi_account_oca
#: model:ir.ui.menu,name:edi_account_oca.menu_account_edi_exchange_record
msgid "Moves"
msgstr ""

#. module: edi_account_oca
#: model:ir.model.fields,help:edi_account_oca.field_account_bank_statement_line__disable_edi_auto
#: model:ir.model.fields,help:edi_account_oca.field_account_move__disable_edi_auto
#: model:ir.model.fields,help:edi_account_oca.field_account_payment__disable_edi_auto
msgid "When marked, EDI could be avoided"
msgstr ""

#~ msgid "Display Name"
#~ msgstr "Nom affiché"
1 change: 1 addition & 0 deletions edi_account_oca/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import account_move
36 changes: 36 additions & 0 deletions edi_account_oca/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2020 Creu Blanca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import fields, models


class AccountMove(models.Model):
_name = "account.move"
_inherit = ["account.move", "edi.exchange.consumer.mixin"]

edi_disable_auto = fields.Boolean(
readonly=True,
states={"draft": [("readonly", False)]},
)

def _post(self, soft=True):
result = super()._post(soft=soft)
# We will use this event to know which documents needs to be executed
if self:
self._event("on_post_account_move").notify(self)
return result

def button_cancel(self):
"""This could be used to notify our provider that we are not accepting the
invoice"""
result = super().button_cancel()
if self:
self._event("on_cancel_account_move").notify(self)
return result

def _invoice_paid_hook(self):
"""This could be used to notify our provider that we are paying"""
result = super()._invoice_paid_hook()
if self:
self._event("on_paid_account_move").notify(self)
return result
1 change: 1 addition & 0 deletions edi_account_oca/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Enric Tobella <etobella@creublanca.es>
16 changes: 16 additions & 0 deletions edi_account_oca/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This module intends to create a base to be extended by local edi rules
for accounting.

In order to add a new integration for an account, you need to create a listener:

.. code-block:: python

class MyEventListener(Component):
_name = "account.move.event.listener.demo"
_inherit = "base.event.listener"
_apply_on = ["account.move"]

def on_post_account_move(self, move):
"""Add your code here about creation of record"""

A skip if decorator can be added in order to make some checks on the state of the move
Binary file added edi_account_oca/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading