rest-framework icon indicating copy to clipboard operation
rest-framework copied to clipboard

[MIG] model_serializer: Migration to 15.0

Open fdegrave opened this issue 3 years ago • 4 comments

GenericMinimalSerializer had to be adapted since it made use of the "id" and "display_name" field definitions on the "base" model. But since 15.0 those magic fields are not defined on abstract models anymore (therefore not on "base"), but they are added dynamically when the model class is created through the metaclass.

In order to work around the issue the simplest solution was to explicitly define the "id" and "display_name" marshmallow fields in GenericMinimalSerializer.

fdegrave avatar Jul 17 '22 11:07 fdegrave

Hi @lmignon,I guess no one will merge this since there is no maintainer for this module. Should I set myself as the maintainer?

fdegrave avatar Jul 28 '22 13:07 fdegrave

@fdegrave You're welcome to become the maintainer...

lmignon avatar Jul 28 '22 14:07 lmignon

@fdegrave Once you've put yourself as maintainer, I'll merge your PR. (ping me once it's done)

lmignon avatar Jul 28 '22 14:07 lmignon

@lmignon whenever you have time! Thanks

fdegrave avatar Aug 03 '22 19:08 fdegrave

/ocabot merge

lmignon avatar Aug 22 '22 06:08 lmignon

Hi @lmignon. Your command failed:

Required option bumpversion_mode for command merge. Possible values : major, minor, patch, nobump.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase* ocabot migration {MODULE_NAME}

More information

OCA-git-bot avatar Aug 22 '22 06:08 OCA-git-bot

/ocabot merge minor

lmignon avatar Aug 22 '22 06:08 lmignon

Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 15.0-ocabot-merge-pr-271-by-lmignon-bump-minor, awaiting test results.

OCA-git-bot avatar Aug 22 '22 06:08 OCA-git-bot

Congratulations, your PR was merged at 895e6b7459a842aa222a511e0483d46eae4d8011. Thanks a lot for contributing to OCA. ❤️

OCA-git-bot avatar Aug 22 '22 06:08 OCA-git-bot