[16.0][FIX] survey_record_generation: backport fixes on linked records and unanswered questions #32
Reference in New Issue
Block a user
No description provided.
Delete Branch "16.0-backport-survey_record_generation-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Backport from 18.0 of
bfe5909and0020f35.Link to already created record at creation (
bfe5909)A NOT required "other_record" field was always set after the loop with a
write(), even when the linked record was already created. This late writetriggers the recomputation of stored computed fields depending on the
relation, overriding the values answered by the user (e.g. with
subscription_oca, a free amount typed by the participant on a
sale.subscription.linewas replaced by the product price).The relation is now given to
create()when the linked record alreadyexists. The deferred write is kept for records created later.
Questions without answer no longer empty fields (
0020f35)When a question was not displayed (conditional question) or skipped, its
field was still given to
create()with aNonevalue, emptying the fieldinstead of keeping its default or computed value.
Fields without value are now left out, which also allows several
conditional questions to fill up the same field.
Backport notes
16.0.1.0.4.test_computed_fields(fake models viaodoo_test_helper)and 2 new tests in
test_survey_record_creation.rc_16.0-ELABORE-LIGHTimage: 28 tests, 0 failed, 0 error.