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

[10.0][MIG] Port l10n_nl_xaf_auditfile_export #59

Merged
merged 12 commits into from
Mar 13, 2017

Conversation

astirpe
Copy link
Member

@astirpe astirpe commented Feb 23, 2017

I'm interested in porting module l10n_nl_xaf_auditfile_export to V10.
This is a work in progress. In case someone already started to work on it and wants to open a different PR, I'm ready to close this one.

Module l10n_nl_xaf_auditfile_export for V8 exports accounting data referring to fiscal periods. But periods were removed from the accounting of Odoo since V9. As per the specifications of the XAF auditfile format, reference to fiscal periods seem required (for example <periodNumber>).

Does anyone already analyzed or found a solution about this issue?

@astirpe astirpe mentioned this pull request Feb 23, 2017
3 tasks
@hbrunn hbrunn added this to the 10.0 milestone Feb 23, 2017
@hbrunn
Copy link
Member

hbrunn commented Feb 23, 2017

this looks good at first glance. Before diving into details, did you consider using https://github.com/OCA/server-tools/tree/10.0/date_range for the dates? Most accounting related OCA modules involving intervals use this, so I think it's more convenient for the user to use it here too

@astirpe
Copy link
Member Author

astirpe commented Feb 23, 2017

With this first commit, I assume that the module works with the following limitations:

  • date range represents a fiscal year, by default the actual fiscal year
  • periods are always monthly based
  • period numbers (<periodNumber>) are coded with 3 digits: 1st digit is the last digit of the fiscal year, the other 2 digits are the month (Eg.: period "February 2017" is represented by number 702)

@astirpe
Copy link
Member Author

astirpe commented Feb 23, 2017

@hbrunn Yes, date_range would be useful for easy setting initial and end dates of a fiscal year. Unfortunately doesn't really help for handling periods...

@hbrunn
Copy link
Member

hbrunn commented Feb 23, 2017

How about extending date ranges with the fields you need? This way you don't need assumptions, and also support nonstandard accounting periods, because the user can define the ranges however she sees fit. Then this module (or some helper module) can define a fiscal period date range type, and then you're done. Let's call it account_fiscal_period and let it do the same thing as https://github.com/OCA/account-financial-tools/tree/10.0/account_fiscal_year, but then for periods

@astirpe
Copy link
Member Author

astirpe commented Feb 23, 2017

@hbrunn That idea was discussed during the Sorrento Code sprint for better generating fiscal reports; at the end we all agreed that reintroducing fiscal periods would be unwanted and undesirable.
On the other side, in some cases (like for this module), fiscal periods are needed.

In my opinion, if the limitations I just described above are well accepted from the NL Community, then we could think about keeping this module decoupled from an hypothetical account_fiscal_period. Instead if we really need a more flexible solution, then I'm ready to start or contribute to account_fiscal_period.

Thank you!

@hbrunn
Copy link
Member

hbrunn commented Feb 23, 2017

Let's see what other Dutch community members say. I'd welcome such a module, as the concept of a financial period (in the sense of: I want to easily filter for what I consider my relevant periods for move lines) is hard to knock out of our customers' accountants' minds...

@jvOrsouw
Copy link

jvOrsouw commented Mar 2, 2017

I'm testing it. I went to accounting - settings and changed the last date of the fiscal year. Then when I opened the form for the auditfile, the end-date is still 31st of december. It should be the same as the end date in the accounting settings. The default start date should be 12 months before the end date.

  • The periods in the generated auditfile have the wrong start and end date. Should be the start and end date of the month, and not of the fiscal year.

  • Periods are always monthly based: I fully agree.

  • Period number: that's a very good solution to create understandable period numbers especially with Odoo 10 not having period numbers, and the limitations of a period number maximum of 3 digits.

@astirpe
Copy link
Member Author

astirpe commented Mar 2, 2017

@jvOrsouw thank you for the feedback!

I've just tried in my local PC to change the last date of the fiscal year from the standard Odoo (accounting -> settings) and the module worked correctly. The default end date is the one set in the settings and the default start date is 12 months before the end date.
Anyway there is an OCA module account_fiscal_year that modifies the calculus of the dates, overriding the standard behavior, taking by default the date range defined for the fiscal year. May I ask you to check that account_fiscal_year is installed in your server and that the dates are set accordingly with your fiscal year configuration? You can find the date range settings in Settings -> Date Ranges -> Fiscal year 2017 (or similar). Please let me know!

About the second point, indeed the periods have the wrong start and end date! I'm working on it for a fix. Thank you!

And thanks for confirming the other 2 points!

@jvOrsouw
Copy link

jvOrsouw commented Mar 3, 2017

retested the issue: I noticed that when the module 'account_fiscal_year' is installed, the start and end date look at the fiscal year entered as 'date range'. When I deleted this range, the fiscal period changes to the fiscal year as entered in the accounting settings. That's exactly what I want, so that works exactly as it should.

  • The bug with the start and end date of the periods is fixed, the dates are now the beginning and end date of the month.

this module is working well for me. 👍

Copy link

@espo-tony espo-tony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's my review. Anyway I don't consider it blocking. 👍

raise exceptions.ValidationError(
_('You need to choose consecutive periods!'))
_('Starting date must be anterior ending date!'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the if condition, starting date can be also equal to ending date.
Please, either correct the condition or the error message.

@astirpe
Copy link
Member Author

astirpe commented Mar 9, 2017

I've just moved the menuitem for the exporting action, because there was a crash when installing the module in Odoo Enterprise.

I've also enabled the feature for the groups 'Accountant' and 'Adviser', so that having just the 'Billing' rights is not enough. Please let me know if you agree...

@astirpe astirpe mentioned this pull request Mar 9, 2017
@CasVissers-360ERP
Copy link

I tested the module on an Odoo 10 Enterprise instance. the module works correctly. I'm not sure if adding the year to the period numbering is correct, but it's a nice solution for exporting multiple years. Time will tell.

@hbrunn hbrunn merged commit cb5acbb into OCA:10.0 Mar 13, 2017
@astirpe astirpe deleted the 10_port_l10n_nl_xaf_auditfile_export branch March 13, 2017 07:44
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Nov 29, 2017
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
hbrunn pushed a commit that referenced this pull request Jan 9, 2018
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Oct 1, 2018
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Oct 18, 2018
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
hbrunn pushed a commit that referenced this pull request Nov 29, 2018
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Jan 17, 2020
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Feb 14, 2020
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Mar 19, 2020
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
jeroen-vet pushed a commit to jeroen-vet/l10n-netherlands that referenced this pull request Feb 25, 2021
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
NL66278 pushed a commit to Therp/l10n-netherlands that referenced this pull request Oct 11, 2022
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
astirpe added a commit to onesteinbv/l10n-netherlands that referenced this pull request Jan 17, 2023
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
NL66278 pushed a commit to Therp/l10n-netherlands that referenced this pull request Feb 22, 2023
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
Wodran14 pushed a commit to DynAppsNV/l10n-netherlands that referenced this pull request Mar 25, 2024
* Align code with l10n_nl_xaf_auditfile_export V8

* Porting to V10

* Update readme

* Minor code review

* Fix start and end date of periods + updated readme

* Fix condition when checking dates

* Update Usage in readme according V10 menu names

* Replace bank field with bank_id

* Make menuitem compatible with Odoo enterprise

* Add nl.po file (courtesy of @ploegvde)

* Fix menu name in readme

* Add empty line in chatter between errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants