Closed carmenbianca closed 1 year ago
@chienandalu I've implemented and pushed your suggestions. Thank you for the review.
/ocabot merge patch
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-157-by-pedrobaeza-bump-patch, awaiting test results.
Congratulations, your PR was merged at 3ee9de544580a07b820c189b5142ed203562b276. Thanks a lot for contributing to OCA. ❤️
This is an additional sanity check to make sure that fields that are expected to be available are actually available.
The situation here is a little tricky. Especially as pertains date_from and date_to; these fields are
required=True
nowhere. Not on the product, not on the membership invoice, and not on the membership line. However, they are set as required in the product and membership line views. If these values are ever empty, it's a sure sign that something went wrong somewhere, because the user should not be able to reach such a state via the UI.One sure way to reach that state was via the demo data, however, which had no start and end dates. This is now fixed.
The situation for the variable period fields is similar. These fields should never be empty when the membership type is variable, and it's not typically possible to empty these values via the UI. For convenience's sake, I simply set them to required an sich, with a default value.