-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0] [MIG] base_api, openapi #1
[17.0] [MIG] base_api, openapi #1
Conversation
💶 decreased due to creation of base_api 📖 description of error by skipping step about 'server_wide_modules' 🌈 refactoring due to creation of 'base_api' module closes #64
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working if isinstance(v, collections.Mapping):
It should be + fields = [ + 'company_id/id', + 'company_id/name' + ] instead of - fields = [ - company_id, - company_id/name - ]
close #227 > Made via .github/workflows/DINAR-PORT.yml
close #403 > Made via .github/workflows/DINAR-PORT.yml
close #432 > Made via .github/workflows/DINAR-PORT.yml
also, add parameter `field` explicitly
previous commits history: https://github.com/itpp-labs/sync-addons/commits/13.0/openapi > Made via .github/workflows/DINAR-PORT.yml
close #224 > Made via .github/workflows/DINAR-PORT.yml
> Made via .github/workflows/DINAR-PORT.yml
to fix this error: ``` ValueError: Field model_id of model openapi.access is defined as ondelete='restrict' while having ir.model as comodel, the 'restrict' mode is not supported for this type of field as comodel. ```
we don't need to use the internal mechanism of CORS handling because in any way we have to use additional Nginx settings and it causes an error like: "The 'Access-Control-Allow-Origin' header contains multiple values"
for a swagger, clarification is needed about which type of content the method consumes
in docs and fix formatting in the changelog
close #410 > Made via .github/workflows/DINAR-PORT.yml
close #412
close #430 > Made via .github/workflows/DINAR-PORT.yml
Thanks to new feature in v16, the module is not needed to be too hacky anymore See https://github.com/odoo/odoo/blob/48e410477d7f48ff253029301f470e9612f25d59/odoo/addons/test_http/controllers.py#L77-L83
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_logger.warning настораживает, как будто что-то неправильно работает, хотя на самом деле так ожидается. Поэтому вместо try except warning предлагаю переделать на обычные проверки.
openapi/controllers/pinguin.py
Outdated
for k in ["form", "files"]: | ||
try: | ||
del log_data["request_data"][k] | ||
except KeyError: | ||
pass | ||
except KeyError as e: | ||
_logger.warning(f"KeyError encountered: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Переделай на if k in log_data["request_data"] с последующим уделалением. Warning делать не надо.
openapi/controllers/pinguin.py
Outdated
except AttributeError: | ||
pass | ||
except AttributeError as e: | ||
_logger.warning(f"AttributeError encountered: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут предлагаю переделать на hasattr(data, "ids") и убрать warning
Коммит который исправляет замечания выше надо объеденить с существующим коммитом precommit auto fixes. |
f3884c3
to
0012dbe
Compare
[17.0] [MIG] base_api, openapi