This script was created as a base or starting point for implementation of JPK_V7M feature in other applications, especially ERPNext.
It can be used stand alone, due to use of input() in get_{some_data}() functions, but it has no "undo" feature, so user must be very careful to make no mistakes. You can try it simply calling: python3 jpk_v7m_creator.py
To reuse the code for your own app with minimal effort, you can make one of these things:
- pass all required arguments calling create_jpk()
- reimplement all get_{some_data} functions to get data from your own app
Please note that some parts:
- Are not implemented
- Will not be implemented
- Are not needed in my case and that's the biggest reason for previous point
Warning: There is no warranty that the app is fully correct. You should check if the xml file generated by this script has no mistakes. Uploading JPK with wrong data can result in some legal consequences!
This is experimental app, provided "as is", with no warranty!