fix: sync authotp and weighbridge custom fields via json fixtures (backport of #136) - #139
Merged
av-dev2 merged 7 commits intoAug 31, 2026
Conversation
av-dev2
merged commit Aug 31, 2026
a8fae30
into
Aakvatech-Limited:version-16-hotfix
3 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Manual, scoped backport of #136, since the automatic backport failed with a cherry-pick conflict.
Customer.authotp_validated,Sales Invoice.authotp*) were only created viaafter_install, so any site where av_tools was already installed before these fields were added never got them.Vehicle.default_tare_weightinto JSON fixtures underpatches/custom_fields/custom_fields_json/, which the existing genericav_tools.utils.create_custom_fields.executeloader already runs on bothafter_installandafter_migrate.after_migrate.py.Deliberately out of scope:
weighbridge_ticketitem-link fieldsversion-15/version-15-hotfixalso carry aweighbridge_ticketLink field on six Item child doctypes.version-16-hotfixdoes not have that field — it already replaced it with a genericdocument_type/document_reference/target_document_type/target_document_referencedesign directly onWeighbridge Ticket, andtests/test_customizations.py::test_weighbridge_and_otp_custom_fields_existexplicitly asserts the oldweighbridge_ticketfield must not exist. Backporting the old field here would fail that test and reintroduce a superseded pattern, so this PR intentionally leaves that design alone.Test plan
av_tools.utils.create_custom_fields.executeagainst a v15 test site; confirmed the authotp and Vehicle fields sync correctly via the generic loader.test_weighbridge_and_otp_custom_fields_existto call the genericcreate_custom_fields.executeloader instead of importing the now-deleted patch modules directly; the rest of that test (assertingweighbridge_ticketdoes not exist and thedocument_referencefields do) is unchanged.