Skip to content

Conversation

@jtrh
Copy link
Contributor

@jtrh jtrh commented Jan 14, 2021

  • Add data model for the SII's "Archivo Electrónico de Cesión" (AEC) in XML format.
  • Add data model for the "cesiones" contained in an AEC.
  • Add parser for AECs in XML format.
  • Add tests.

@jtrh jtrh self-assigned this Jan 14, 2021
@jtrh jtrh changed the title rtc: Add data models and parser for AEC rtc: Add data models and parser for AECs Jan 14, 2021
@codecov-io
Copy link

codecov-io commented Jan 14, 2021

Codecov Report

Merging #180 (3713486) into develop (73df96e) will increase coverage by 2.18%.
The diff coverage is 90.02%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #180      +/-   ##
===========================================
+ Coverage    78.65%   80.83%   +2.18%     
===========================================
  Files           28       30       +2     
  Lines         2024     2505     +481     
  Branches       331      377      +46     
===========================================
+ Hits          1592     2025     +433     
- Misses         286      306      +20     
- Partials       146      174      +28     
Impacted Files Coverage Δ
cl_sii/rtc/parse_aec.py 89.74% <89.74%> (ø)
cl_sii/rtc/data_models_aec.py 90.38% <90.38%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73df96e...3713486. Read the comment docs.

@jtrh jtrh force-pushed the feature/add-sii-rtc-aec branch from 505e70b to 63c8210 Compare January 14, 2021 01:54
@jtrh jtrh marked this pull request as ready for review January 14, 2021 02:02
@jtrh jtrh requested a review from glarrain January 14, 2021 02:02
@glarrain glarrain requested a review from yaselc January 14, 2021 13:09
@jtrh jtrh force-pushed the feature/add-sii-rtc-aec branch 2 times, most recently from 3713486 to c20034d Compare January 14, 2021 23:08
- Add a data model for the SII's "Archivo Electrónico de Cesión" (AEC)
  in XML format.
- Add a data model for the "cesiones" contained in an AEC.
@jtrh jtrh force-pushed the feature/add-sii-rtc-aec branch from c20034d to b9e80cd Compare January 14, 2021 23:17
@jtrh jtrh force-pushed the feature/add-sii-rtc-aec branch from b9e80cd to bc6ad3c Compare January 14, 2021 23:19
Copy link

@yaselc yaselc left a comment

Choose a reason for hiding this comment

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

Wow... 🤯
Just add that you should include the "Identificador de Envio" field, from the RPETC email:
RPETC email: attachment / 'Identificador de Envio'
This is a key piece of information to check the status of an AEC submission and can only be obtained from the RPETC email or submitting the AEC.

@jtrh
Copy link
Contributor Author

jtrh commented Jan 15, 2021

Just add that you should include the "Identificador de Envio" field, from the RPETC email:
RPETC email: attachment / 'Identificador de Envio'
This is a key piece of information to check the status of an AEC submission and can only be obtained from the RPETC email or submitting the AEC.

@yaselc Can I extract the "identificador de envío" from the contents of an AEC XML file?

The scope of this pull request is modelling and parsing an AEC in XML format, not other related entities such as the RPETC email, unless those entities are embedded in the AEC XML file.

@jtrh
Copy link
Contributor Author

jtrh commented Jan 15, 2021

The scope of this pull request is modelling and parsing an AEC in XML format, not other related entities such as the RPETC email, unless those entities are embedded in the AEC XML file.

Of course, that does not exclude the possibility of creating a separate data model for the RPETC Email Message in a future pull request.

@yaselc
Copy link

yaselc commented Jan 15, 2021

@yaselc Can I extract the "identificador de envío" from the contents of an AEC XML file?

The scope of this pull request is modelling and parsing an AEC in XML format, not other related entities such as the RPETC email, unless those entities are embedded in the AEC XML file.

Makes sense, but I'm thinking here of the use case that FP generates the AEC and submits it to the SII, the response is the "Identificador de Envio" and FP will want to store this AEC together with the "Identificador de Envio" to later check its status.
Even if the responsibility for generating and submitting the AEC were assigned to FD, it would still need to store it.

@glarrain
Copy link
Contributor

Of course, that does not exclude the possibility of creating a separate data model for the RPETC Email Message in a future pull request.

I agree

@jtrh
Copy link
Contributor Author

jtrh commented Jan 15, 2021

@yaselc Can I extract the "identificador de envío" from the contents of an AEC XML file?
The scope of this pull request is modelling and parsing an AEC in XML format, not other related entities such as the RPETC email, unless those entities are embedded in the AEC XML file.

Makes sense, but I'm thinking here of the use case that FP generates the AEC and submits it to the SII, the response is the "Identificador de Envio" and FP will want to store this AEC together with the "Identificador de Envio" to later check its status.
Even if the responsibility for generating and submitting the AEC were assigned to FD, it would still need to store it.

@yaselc: We can store the submission identifier in an optional field of the AEC Django model of FD CL Data.

@jtrh jtrh merged commit fc60932 into develop Jan 15, 2021
@jtrh jtrh deleted the feature/add-sii-rtc-aec branch January 15, 2021 16:05
@jtrh jtrh mentioned this pull request Jan 17, 2021
@jtrobles-cdd jtrobles-cdd added enhancement New feature or request and removed feature labels Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: rtc enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants