Tryton - Issues

 

Issue8021

Title Update 303 file with new format
Priority feature Status resolved
Superseder Nosy List albertca, ced, pokoli, resteve, reviewbot, roundup-bot
Type feature request Components account_es
Assigned To pokoli Keywords review
Reviews 68421002
View: 68421002

Created on 2019-01-21.16:32:58 by pokoli, last changed by roundup-bot.

Messages
New changeset ecf29a696deb by Sergi Almacellas Abellana in branch 'default':
Update model 303 to new format
https://hg.tryton.org/tryton-env/rev/ecf29a696deb
New changeset f552c1e2a74a by Sergi Almacellas Abellana in branch 'default':
Update model 303 to new format
https://hg.tryton.org/modules/account_es/rev/f552c1e2a74a
review68421002 updated at https://codereview.tryton.org/68421002/#ps20001
msg46631 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-01-30.12:51:40
I've implemented msg46181 on latest patchset
msg46181 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-23.13:03:59
OK so as it is a report using the template engine, I think we could just update the report and avoid having to change the python code. So users from old version can use the new template on their version.
msg46142 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-01-22.11:45:11
> Is each future evolution would be solvable by just updating the template?

Well normally the file does not work because new fields are added and the previous template does not set any value for it. This is a fixed size file, so when setting new fields they are normally added at the end. Updating the template sets a fixed value for the previous format so the file will be read correctly after updating it. 

> Should not we version the templates?

I do not think it's worth because only the latest file format is accepted by tax authority.
msg46138 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-22.10:15:43
Is each future evolution would be solvable by just updating the template?
Should not we version the templates?
msg46137 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-01-22.08:14:43
For me there is no need of a new release. As far as new versions support the new changes older versions templates can be manually updated on the database. 

I can propose a change (or upload a new template) for released versions which avoids changing python code.
msg46134 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-22.00:44:27
WTF, what is that for a country? Are they doing on purpose to fail the country business?
So we need a proper solution for such screwed behavior, we are not going to change and make release every time some moron in the country decide to make changes.
msg46131 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2019-01-21.21:55:58
Format changes are frequent, indeed. We (NaN-tic) currently support 4 reports and I'd say that you can expect at least one change per year.
msg46126 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-21.18:55:30
Seriously, the authorities have given only 2 months to update all the systems in the country? If this is a frequent risk, we should probably about a way to update those report without the need to provide a new release.
msg46124 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-01-21.18:46:34
> But how did it happen that a format introduced in Tryton in 2018-10-01 is already invalid 2 months later? 

Because the tax authority published a Modification on 31-10-2018.

> How are we going to prevent this from happening in the future?

I do not think we can do anything to prevent tax authorities from modifying it's file formats. Just keep eyes opens and update them.
msg46123 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-21.18:41:10
But how did it happen that a format introduced in Tryton in 2018-10-01 is already invalid 2 months later? How are we going to prevent this from happening in the future?
msg46122 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-01-21.18:34:05
> How is this working? 

Since 2019 only the new format can be used to upload the file

> Should the system need to be able to generate the former format for the past period? Is not there any version system?

No, I've tested using the new format for older periods and it works as expected

> Is it common to have format changes?

It's not so common but it may happen
msg46115 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-01-21.16:42:44
How is this working? Should the system need to be able to generate the former format for the past period? Is not there any version system? Is it common to have format changes?
New review68421002 at https://codereview.tryton.org/68421002/#ps1
msg46113 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2019-01-21.16:32:58
The 303 file was modified so the format is no longer accepted by the tax authority website. Here is the official announce of the change:

https://www.boe.es/buscar/doc.php?id=BOE-A-2018-14901
History
Date User Action Args
2019-02-06 16:44:16roundup-botsetmessages: + msg46782
2019-02-06 16:44:09roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg46781
2019-01-30 13:15:02reviewbotsetmessages: + msg46635
2019-01-30 12:51:41pokolisetmessages: + msg46631
2019-01-23 13:03:59cedsetmessages: + msg46181
2019-01-22 11:45:11pokolisetmessages: + msg46142
2019-01-22 10:15:43cedsetmessages: + msg46138
2019-01-22 08:14:43pokolisetmessages: + msg46137
2019-01-22 00:44:28cedsetmessages: + msg46134
2019-01-21 21:55:58albertcasetnosy: + albertca
messages: + msg46131

Showing 10 items. Show all history (warning: this could be VERY long)