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

[ADD] l10n_de_datev #105

Closed
wants to merge 1 commit into from
Closed

[ADD] l10n_de_datev #105

wants to merge 1 commit into from

Conversation

hbrunn
Copy link
Member

@hbrunn hbrunn commented Apr 30, 2022

To configure this module, you need to:

  • Go to your company
  • Fill in the fields in the DATEV tab

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

@tv-openbig
Copy link
Contributor

@hbrunn Hi Holger,
thanks a lot for your contribution.
i get this error on installation:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo/odoo-server/odoo/tools/cache.py", line 88, in lookup
r = d[key]
File "/opt/odoo/odoo-server/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/tools/lru.py", line 44, in getitem
a = self.d[obj].me
KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7fd9f3aff598>, 'account_fiscal_year.fiscalyear')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 652, in _tag_record
f_val = _eval_xml(self, field, self.env)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 138, in _eval_xml
+_process("".join(etree.tostring(n, encoding='unicode') for n in node))
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 127, in _process
self.idref[id] = self.id_get(id)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 741, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 747, in model_id_get
return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1404, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "", line 2, in xmlid_lookup
File "/opt/odoo/odoo-server/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1393, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: account_fiscal_year.fiscalyear

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo-server/odoo/http.py", line 656, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo-server/odoo/http.py", line 314, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/opt/odoo/odoo-server/odoo/http.py", line 698, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo-server/odoo/http.py", line 346, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo-server/odoo/http.py", line 941, in call
return self.method(*args, **kw)
File "/opt/odoo/odoo-server/odoo/http.py", line 519, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo-server/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo-server/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 445, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 561, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/opt/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 421, in load_modules
loaded_modules, update_module, models_to_check)
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/opt/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 802, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 865, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 764, in parse
exc_info[2]
File "/opt/odoo/odoo-server/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 652, in _tag_record
f_val = _eval_xml(self, field, self.env)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 138, in _eval_xml
+_process("".join(etree.tostring(n, encoding='unicode') for n in node))
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 127, in _process
self.idref[id] = self.id_get(id)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 741, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/opt/odoo/odoo-server/odoo/tools/convert.py", line 747, in model_id_get
return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1404, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "", line 2, in xmlid_lookup
File "/opt/odoo/odoo-server/odoo/tools/cache.py", line 93, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1393, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "External ID not found in the system: account_fiscal_year.fiscalyear" while parsing /opt/odoo/custom/addons/l10n_de_datev/views/l10n_de_datev_export.xml:7, near

l10n_de_datev.export





















@tv-openbig tv-openbig self-requested a review May 4, 2022 15:09
@hbrunn
Copy link
Member Author

hbrunn commented May 5, 2022

thanks for the interest, but please wait until this isn't a draft

@tv-openbig
Copy link
Contributor

tv-openbig commented May 5, 2022

thanks for the interest, but please wait until this isn't a draft
@hbrunn

Hi,
does it make sense sense to collaborate about datev export ?
I will provide you access to our repository. We are supporting with
our datev_export module "DATEV Unternehmen Online" format which is a
different format as yours (current branch 12.0). You may call it
alternative way.

There is furthermore a upstream of a datev_base module provided by
elego from Berlin. This format is actually the same as yours.

I can say that i am very interested to provide it under OCA umbrella (at least datev_export).
So far we couldn't fulfill the OCA quality requirements, as that the developers unfortunately
never wrote test cases.

Today i have also a discussion with elego, maybe they will also decide to collaborate with
you on that topic. initos / humanilog is also on board, so it is quite good chance to push
that really important module finally under OCA umbrella.

If you are interested to access the repository i mentioned please drop a mail here:
[email protected]

@hbrunn
Copy link
Member Author

hbrunn commented May 5, 2022

Great there's so much interest with this module. But why would you invite going somewhere else while we can just collaborate here?
The current code for example doesn't generate the accounts file correctly, I would greatly appreciate help there.

@tv-openbig
Copy link
Contributor

tv-openbig commented May 5, 2022

@hbrunn DATEV provides so many format options to import accounting data.
Do you know which of these formats do you want to support ?
Here in this video it shows for example how to import "DATEV Format" into DATEV Kanzlei Rechnungswesen:
https://www.youtube.com/watch?v=hP8BqyVtsfE

You also can see that there is a ASCII import one menu entry above "Stapelverarbeitung" (which allows upload of DATEV Format). This format seems to be more flexible and probably easier to develop as the tax advisors may do some mapping in advance and obviously it is out of the stratosphere of the interface to be sure that both sides have the same accounts. So basically the datev_base module as well as our datev_export modules doesn't support exchange of master data, as it is to my opinion not a mandatory requirement.

Why ?

In Odoo we do not need a single account per single customer / supplier. It is easy to have the same debitor and creditor accounts on both sides. Also it is required to exchange the income / expense accounts and accounts for the balance sheet touched in odoo.

I assume this "design" solution might reduce complexity a lot. Finally it is also a business decision that Odoo will be the leading system, DATEV is "just" required to do the year end closing, electronical balance sheet and income statement and things like that from DATEV Kanzlei Rechnungswesen as tax advisors wants to use their own "Datev tool" for that purpose.

If i am correct also Odoo EE decided to just create a ASCII file with account move lines.
I do not know if you are open minded about the format at the development stage you are ?
If yes it could make sense to collaborate on that topic with the other stakeholders and i would like to ask them as well if they are willing to collaborate based upon a public repository. Then for sure we may proceed here.

@hbrunn
Copy link
Member Author

hbrunn commented May 9, 2022

@hbrunn DATEV provides so many format options to import accounting data. Do you know which of these formats do you want to support ?

what is documented in https://developer.datev.de/portal/en/dtvf/formate

If i am correct also Odoo EE decided to just create a ASCII file with account move lines. I do not know if you are open minded about the format at the development stage you are ? If yes it could make sense to collaborate on that topic with the other stakeholders and i would like to ask them as well if they are willing to collaborate based upon a public repository. Then for sure we may proceed here.

what I have now nearly works for my customer, so I don't plan any big changes here. In the end, everyone can decide themselves if they want to import only transactions or any of the other files the code currently generates and puts into the zip file - my customer uses a bunch of custom accounts, those you don't want to create manually in DATEV. As you describe, DATEV is here only used for the accountant's year closing, all actual accounting happens in Odoo

@tv-openbig
Copy link
Contributor

@hbrunn DATEV provides so many format options to import accounting data. Do you know which of these formats do you want to support ?

what is documented in https://developer.datev.de/portal/en/dtvf/formate

If i am correct also Odoo EE decided to just create a ASCII file with account move lines. I do not know if you are open minded about the format at the development stage you are ? If yes it could make sense to collaborate on that topic with the other stakeholders and i would like to ask them as well if they are willing to collaborate based upon a public repository. Then for sure we may proceed here.

what I have now nearly works for my customer, so I don't plan any big changes here. In the end, everyone can decide themselves if they want to import only transactions or any of the other files the code currently generates and puts into the zip file - my customer uses a bunch of custom accounts, those you don't want to create manually in DATEV. As you describe, DATEV is here only used for the accountant's year closing, all actual accounting happens in Odoo

It seems we might support several formats in the future. You are working on DATEV Format, we are working on publishing the DATEV formats ASCII and xml (DATEV Unternehmen Online). Our target is OCA 14.0. Last week we have exchanged the current status. We have discussed also naming of the modules. We are thinking about datev_export_ascii and datev_export_xml. Would it make sense to adopt your modules name to datev_export_dtvf in order to avoid naming confusion (at least since 14.0) ? If you are interested you might request access to our meeting protocol: https://docs.google.com/document/d/1qO8j5RPKhybzM7YPbY8ZDucZtIp56ctX5dYCwOuOrGE/edit

@hbrunn
Copy link
Member Author

hbrunn commented May 19, 2022

I'll be happy to rename this to datev_export_dtvf if @OCA/local-germany-maintainers (of which you're 50% as I see now) don't insist on the l10n_de_ prefix?

For the private code and discussions, I'd rather abstain, thanks for the invitation though.

This is now very close to being ready for review, I just need to get around to write proper tests and fix some details, but if you want to test, go ahead please.

And nitpick: It's very probable what your datev_export_ascii module outputs is actually text encoded in some unicode, so I'd suggest to use _text to differentiate from _xml, or if this format is anything like what I'm working on here, _csv[ish]

@tv-openbig
Copy link
Contributor

@hbrunn @OSguard

Hello Markus, is it ok for you, if we don't insist on the l10n_de_ prefix for the DATEV modules under l10n-germany repo ?

I'll be happy to rename this to datev_export_dtvf if @OCA/local-germany-maintainers (of which you're 50% as I see now) don't insist on the l10n_de_ prefix?

For the private code and discussions, I'd rather abstain, thanks for the invitation though.

This is now very close to being ready for review, I just need to get around to write proper tests and fix some details, but if you want to test, go ahead please.

And nitpick: It's very probable what your datev_export_ascii module outputs is actually text encoded in some unicode, so I'd suggest to use _text to differentiate from _xml, or if this format is anything like what I'm working on here, _csv[ish]

@marylla Do you understand this advise about the naming of the modules ?

@hbrunn
Copy link
Member Author

hbrunn commented May 19, 2022

If I may explain myself about the ascii thing: This is the name of a specific text encoding that can only represent a very small range of characters, but for historic reasons some people tend to call anything plain text like 'ascii', but technically that's usually not correct because most modern systems don't use the historical ascii for their text encoding

@tv-openbig
Copy link
Contributor

If I may explain myself about the ascii thing: This is the name of a specific text encoding that can only represent a very small range of characters, but for historic reasons some people tend to call anything plain text like 'ascii', but technically that's usually not correct because most modern systems don't use the historical ascii for their text encoding
@hbrunn
This seems to be the case @datev, as they call the format themself ASCII.

@tv-openbig
Copy link
Contributor

@hbrunn I have just installed your latest revision on my database and i get this odoo server error:
File "/opt/odoo/odoo-server/odoo/addons/base/models/ir_model.py", line 1393, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
odoo.tools.convert.ParseError: "External ID not found in the system: account_fiscal_year.fiscalyear" while parsing /opt/odoo/custom/addons/l10n_de_datev/views/l10n_de_datev_export.xml:7, near

l10n_de_datev.export





















@hbrunn
Copy link
Member Author

hbrunn commented May 19, 2022

do you have account_fiscal_year installed and does the date range type this module adds exist? you might have to update this module if it's already installed

@hbrunn hbrunn force-pushed the 12.0-l10n_de_datev branch 2 times, most recently from 4252f9a to 20a22b9 Compare July 4, 2022 13:42
@hbrunn hbrunn marked this pull request as ready for review July 4, 2022 14:10
@tv-openbig
Copy link
Contributor

@hbrunn Sorry for my late review. Reason was that i couldn't fix the issue on my existing database. However on a clean database i could create datev export for my example period:
Bildschirmfoto 2022-07-26 um 09 52 35

Bildschirmfoto 2022-07-26 um 09 56 16
.

Do you have in the meantime a feedback from your customers tax advisor if (real) import in DATEV was successfull.
Unfortunately i cannot do a end-to-end test for that, even the DATEV sandbox doesn't allow to test import of DATEV format which makes it really difficult to see if the exported files really would work in DATEV with the exported accounts due to our l10n_de chart of accounts in Odoo. As you can see in the .csv there might be so called automatic accounts (f.e. income account "8400") and i am not sure if they will go through in DATEV.

Yesterday we have discussed if we should cooperate with a tax advisor to be able to issue end-to-end testing.
I am interested in your opinion.

@hbrunn
Copy link
Member Author

hbrunn commented Jul 26, 2022

yes, testing this with real datev is a problem, and I didn't yet hear back from my customer's accountant, so no external verification yet.

Cooperation with a tax advisor surely is desirable, but I wouldn't know how to fund it

@tv-openbig
Copy link
Contributor

yes, testing this with real datev is a problem, and I didn't yet hear back from my customer's accountant, so no external verification yet.

Cooperation with a tax advisor surely is desirable, but I wouldn't know how to fund it

We have discussed that yesterday in our meeting about further ongoing with the modules "datev_export" (.xml) and datev_base (ascii) targeted to integrate it for 14.0 in l10n-germany. Eventually we may test that together with the tax advisor of one of our german companies or customers. I cannot promise that, but it may happen (@OSevangelist).

Here is something i have found:
https://developer.datev.de/portal/de/dtvf/tools
I can imagine it will help to test at least the correct format.

@tv-openbig
Copy link
Contributor

yes, testing this with real datev is a problem, and I didn't yet hear back from my customer's accountant, so no external verification yet.

Cooperation with a tax advisor surely is desirable, but I wouldn't know how to fund it

I did some testing with the tool with the data from my test database (with l10n_de_skr03).
The result looks good so far:
2022-07-26

2022-07-26 (1)

2022-07-26 (2)

Finally the remark in this protocol still might lead to issues, as it indeed points to the fact that it could check just the format nothing more (right accounts, taxes and so on). Nevertheless i think it is enough to merge this pull request. What do you think @hbrunn from your experience ?

@hbrunn
Copy link
Member Author

hbrunn commented Jul 26, 2022

during development, this tool happily passed files that failed when importing this into MonKey office which the intermediary I work with uses. So I don't really trust it

@tv-openbig
Copy link
Contributor

during development, this tool happily passed files that failed when importing this into MonKey office which the intermediary I work with uses. So I don't really trust it

Do i understand correct, that the tax advisor uses Monkey Office in order to import from Odoo -> Monkey Office account moves in datev format (as a import source inside of monkey office) ?

@hbrunn
Copy link
Member Author

hbrunn commented Jul 26, 2022

no, that was just the only software available at the moment to test something at all at the intermediary, the actual tax advisor uses the datev software, but hasn't yet verified it works for them

@tv-openbig
Copy link
Contributor

@hbrunn In fact i should add that there was one issue in my first (uncorrected) export example.
In line 7 there is a "0,00 €" line in my wrong export example.
The reason was a 0,02 difference between invoice (100,00 €) and payment (98,98 €), where i used a reconcile model to balance it. Inside the reconcile model i used is a tax configured which lead to 0,00 € tax (19% out of 0,02 € difference). Unfortunatley Odoo creates a account move line for that with the consequence that DATEV marked that line as wrong.
I could correct it by cancelling the reconciliation in Odoo and removal of the tax.

wrong export file (line 7):
EXTF_Buchungsstapel_20220101.csv

corrected file (line 7 removed by tax removal of 0,02 € payment difference):
EXTF_Buchungsstapel_20220101.csv

I assume those 0,00 € line cases could lead in general to errors.
I am not sure if DATEV would ignore such lines (maybe it is just a warning notice in the tool ?).
In general it is discussable if Odoo should create such 0,00 € account move lines.

@tv-openbig
Copy link
Contributor

@hbrunn This is probably interesting for you: odoo/odoo#99426

@hbrunn
Copy link
Member Author

hbrunn commented Sep 1, 2022

thank you @tv-openbig it seems a struggle. I'm here patiently waiting for my customer's accountant to give notice when they have delivered the files generated with this code. Seems to take time.

@tv-openbig
Copy link
Contributor

@hbrunn I am definitely also interested in this feedback. Actually in our module "datev_export_ascii" we follow the approach to put everything into one move line (the tax line would be calculated in DATEV itself either by a automatic account, f.e. income account 8400 exported with 119 € in DATEV automatic splitted into 2 lines income account 8400 100 € and 1776 tax account 19 € or by non-automatic account 8410 119€ with an entry "81" in "Buchungsschlüssel" leading also to 8410 100 € and 1776 19 €. Finally DATEV also takes the information from the exported line out of the field "counterpart account" in order to autoamtically create the 3rd move line regarded from Odoo logic directly in DATEV).

This one line approach might be error prone, especially if we configure the taxes in Odoo (accidently) with a different account as DATEV automatic logic or "Buchungsschlüssel" logic would calculate inside DATEV. Another potential error might be the possibility to edit the taxes in Odoo in case of cent-differences (Odoo sum-up of invoice lines to TOTAL differs to the TOTAL calculation of your supplier which requires to edit the tax in order to pay exactly the TOTAL of the suppliers invoice).

Therefore i would be really glad to get a feedback from your customer, as this appoach to send all move lines exactly as it is in Odoo to DATEV definetly wouldn't be so error prone as in our approach. If i can help with that don't hesitate to ask me.

@github-actions
Copy link

github-actions bot commented Jan 1, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 1, 2023
@github-actions github-actions bot closed this Feb 5, 2023
@tv-openbig tv-openbig reopened this Feb 17, 2023
@tv-openbig
Copy link
Contributor

@hbrunn This export could be interesting if all lines would have BU-Schlüssel 40.
https://apps.datev.de/help-center/documents/1046108

Therefore this module could help if is would be used just once a year in order to push 1:1 all account moves out of Odoo to DATEV. This makes sense if the tax advisor provides just end-of-year accounting in order to prepare the balance sheet and the P&L. The monthly vat declarations would come out of odoo for example with the module l10n_de_tax_statement.

I assume we have this case very often. i still see sense in your module, especially if there would be the option to use this "40" instead the values out of the field l10n_de_datev_code (account.tax).

@tv-openbig tv-openbig removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 17, 2023
@hbrunn
Copy link
Member Author

hbrunn commented Feb 17, 2023

I assume we have this case very often. i still see sense in your module, especially if there would be the option to use this "40" instead the values out of the field l10n_de_datev_code (account.tax).

I'll be happy to implement this, would that be an option on the export wizard? This btw is exactly the workflow my customer uses, and they imported the file to https://www.monkey-office.de - so the original datev applications might indeed need this code.

@tv-openbig
Copy link
Contributor

@hbrunn @Cedric-Pigeon We have exactly that demand now for a ACSone customer, where we would be able to test that together with the tax advisor. Unfortunately they have v14. However it would be for sure a good chance for a real end-to-end test (Odoo -> Tax Advisor). Furthermore i would be able to document this use case in the readme folder, if you want.

@hbrunn
Copy link
Member Author

hbrunn commented Feb 21, 2023

sounds good!

@tv-openbig
Copy link
Contributor

@hbrunn

still i am checking if entry "40" in the field "Bu-Schlüssel" would help to import many lines into DATEV. As i don't have DATEV by myself to do end-to-end test i have created an export now in order to let it check by someone with a DATEV software installed. I am expecting very soon a feedback.

In the meantime i have checked a complex account move with many account move accounts and many account move counterpart accounts lines. The results should be the same in DATEV as in Odoo. I have checked that in a excel sheet and the values are the same.
l10n_de_datev_komplexer_Buchungssatz

So this complex account move also fits. Therefore it seems your account / counterpart account logic seems to be ok for the use case to do a bulk export of everything from a fiscal year. Still i think there are some rough edges especially as it is not possible to select an existing fiscal year. The selection field is empty even if you have already fiscal years. I could fix that by deleting at first all fiscal years, then i used your module to re-create the fiscal years again.

Furthermore there is no way to set a exported year back to draft in order to re-create a export or to select a different choice of fiscal periods on the lines (for example in order to export just a month from one fiscal year).

If i delete a fiscal year there is no way to create it again for the same fiscal year.

Bildschirmfoto 2023-02-24 um 15 12 15

This problem is tied to my opinion to the empty selection field i mentioned already.

If i would then try to create the year form by "create and edit" in the field "fiscalyear_id" then i get the message "Fiscal year already exists ...". Finally i have to delete the fiscal year before i can re-create it again in your field "fiscalyear_id" by entering for example "2021" and then clicking on "create and edit".

It seems there are no negative side effects to delete a fiscal year from the past in order to re-create it again, but at least it is very confusing. I am afraid normal users will be lost especially if they have already existing fiscal years.

Finally i would like to ask you if you would be open-minded to re-name the module to "datev_export_dtvf" for a PR towards 14.0 branch. I promise to do further testing based on v14 and documentation, which explains what to do in Odoo, what to do in DATEV and explaining the use case for this module in comparison to the modules datev_export_xml and datev_export_ascii.

@hbrunn
Copy link
Member Author

hbrunn commented Feb 26, 2023

Finally i would like to ask you if you would be open-minded to re-name the module to "datev_export_dtvf" for a PR towards 14.0 branch. I promise to do further testing based on v14 and documentation, which explains what to do in Odoo, what to do in DATEV and explaining the use case for this module in comparison to the modules datev_export_xml and datev_export_ascii.

sure, agreed with the rename. I think you can just take this for the v14 version and then I'll close this PR, as I won't be developing this further in v12. I'll keep the PR open until the v14 one arrives

@hbrunn
Copy link
Member Author

hbrunn commented Mar 17, 2023

superseded by #118

@hbrunn hbrunn closed this Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants