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

[14.0][ADD] datev_export_dtvf #118

Open
wants to merge 2 commits into
base: 14.0
Choose a base branch
from
Open
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
29 changes: 29 additions & 0 deletions datev_export/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,32 @@ class ResCompany(models.Model):
size=5,
help="Number from 0 to 99999",
)

datev_account_code_length = fields.Integer(
string="DATEV account code length",
default=5,
)

datev_partner_numbering = fields.Selection(
selection="_selection_datev_partner_numbering",
string="DATEV Partner numbering",
default="none",
)

datev_customer_sequence_id = fields.Many2one(
"ir.sequence", "DATEV sequence for customers"
)

datev_supplier_sequence_id = fields.Many2one(
"ir.sequence", "DATEV sequence for suppliers"
)

def _selection_datev_partner_numbering(self):
reports_installed = (
"l10n_de_datev_reports" in self.env["ir.module.module"]._installed()
)
return (
[("none", "None")]
+ ([("ee", "Enterprises Edition")] if reports_installed else [])
+ [("sequence", "Sequence")]
)
16 changes: 16 additions & 0 deletions datev_export/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,19 @@ class ResConfigSettings(models.TransientModel):
related="company_id.datev_client_number",
readonly=False,
)

datev_account_code_length = fields.Integer(
related="company_id.datev_account_code_length",
readonly=False,
)
datev_partner_numbering = fields.Selection(
related="company_id.datev_partner_numbering", readonly=False
)

datev_customer_sequence_id = fields.Many2one(
related="company_id.datev_customer_sequence_id", readonly=False
)

datev_supplier_sequence_id = fields.Many2one(
related="company_id.datev_supplier_sequence_id", readonly=False
)
104 changes: 104 additions & 0 deletions datev_export/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,110 @@
</div>
</div>
</div>

<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<span class="o_form_label">Account code length</span>
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Account code length
</div>
<div class="content-group">
<div class="mt16">
<field
name="datev_account_code_length"
class="o_light_label"
/>
</div>
</div>
</div>

<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<span class="o_form_label">Partner numbering</span>
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Select the way partners in DATEV export are numbered
</div>
<div class="content-group">
<div class="mt16">
<field
name="datev_partner_numbering"
class="o_light_label"
/>
</div>
</div>
</div>

<div
class="o_setting_left_pane"
attrs="{'invisible': [('datev_partner_numbering', '!=', 'sequence')]}"
/>
<div
class="o_setting_right_pane"
attrs="{'invisible': [('datev_partner_numbering', '!=', 'sequence')]}"
>
<span class="o_form_label">Customer sequence</span>
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
The sequence used to number customers
</div>
<div class="content-group">
<div class="mt16">
<field
name="datev_customer_sequence_id"
class="o_light_label"
attrs="{'required': [('datev_partner_numbering', '=', 'sequence')]}"
domain="[('company_id', 'in', (company_id, False))]"
/>
</div>
</div>
</div>

<div
class="o_setting_left_pane"
attrs="{'invisible': [('datev_partner_numbering', '!=', 'sequence')]}"
/>
<div
class="o_setting_right_pane"
attrs="{'invisible': [('datev_partner_numbering', '!=', 'sequence')]}"
>
<span class="o_form_label">Supplier sequence</span>
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
The sequence used to number suppliers
</div>
<div class="content-group">
<div class="mt16">
<field
name="datev_supplier_sequence_id"
class="o_light_label"
attrs="{'required': [('datev_partner_numbering', '=', 'sequence')]}"
domain="[('company_id', 'in', (company_id, False))]"
/>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
97 changes: 97 additions & 0 deletions datev_export_dtvf/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
=====
DATEV
=====

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-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--germany-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-germany/tree/14.0/datev_export_dtvf
:alt: OCA/l10n-germany
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-germany-14-0/l10n-germany-14-0-datev_export_dtvf
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/l10n-germany&target_branch=14.0
:alt: Try me on Runboat

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

This module implements DATEV exports in the dtvf format.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

#. Go to your company
#. Fill in the fields in the `DATEV` tab
#. For accounts where you want to suppress automatic calculations (for ie taxes), set the according flag

Usage
=====

To use this module, you need to:

#. Go to `Invoicing` / `Reporting` / `DATEV export`
#. Create an export, choose a date range to use as fiscal year, and ranges to export
#. Click ``Generate``

Known issues / Roadmap
======================

* support missing formats
* add empty fields

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-germany/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-germany/issues/new?body=module:%20datev_export_dtvf%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
~~~~~~~

* Hunki Enterprises BV

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

* Holger Brunn <[email protected]> (https://hunki-enterprises.com)

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.

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

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

from . import models
from . import datev
23 changes: 23 additions & 0 deletions datev_export_dtvf/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2022 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "DATEV",
"summary": "Export Data for DATEV (dtvf)",
"version": "14.0.1.0.0",
"development_status": "Beta",
"category": "Accounting",
"website": "https://github.com/OCA/l10n-germany",
"author": "Hunki Enterprises BV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"account",
"date_range",
"datev_export",
],
"data": [
"security/ir.model.access.csv",
"views/account_account.xml",
"views/datev_export_dtvf.xml",
"views/res_partner.xml",
],
}
Loading
Loading