Repost Item Valuation currently broken when S3 used for attachments
When some stock values change, a Repost Item Valuation document is created by ERPNext and it uses an attachment to store some data. At some point it calls get_full_path on this file and tries to write data to it. Of course, if the file has been stored in S3, since it is an attachment, this fails.
Could you add this doc type ("Repost Item Valuation") to the DFP_EXTERNAL_STORAGE_IGNORE_S3_UPLOAD_FOR_DOCTYPES list? Maybe this could be a user-configurable option even? Thanks.
Sure @khoran! I try to add it asap ;)
Hi again @khoran just made some fixes and added the feature within this commit in "develop" branch (https://github.com/developmentforpeople/dfp_external_storage/commit/ddea16c961b76c1cdeafd7af7d281b0c1a2301a0) could you check it at your side please? Here you are one of my external storage settings with new field "Doctypes ignored for file attachments":
Please give me feedback and then I will publish to both production branches "version-14" and "version-15".
Thanks for everything @khoran :)
That works great, thank you! I wonder though if you should include the doctypes you list as examples as default values. The Repost Item Valuation failure is easy to miss because it happens in a background work queue. Even when noticed, the error message would not immediately lead one to this plugin and adding it to the ignored set. The consequence of these reposts not running is that all your stock values are off, which is pretty bad (auditors will be unhappy!).
Thank you @khoran !! You are totally right. That doctype is not within default Frappe app, it is an ERPNext one, so we should check for that app before... and add them on demand automatically when creating a new external storage. I will think about it and maybe I can stole some hours this weekend ;)
Hi @khoran as we talked previously, I just added by default both Frappe doctypes affected for new External Storages (https://github.com/developmentforpeople/dfp_external_storage/commit/ba3f7d37273196e39f2a3e1298c977b4f3fc50d7). For ERPNext doctypes we should check if app is installed before add them (I invite you or @MrJico to add those lines and create a pull request :).