rest-framework
rest-framework copied to clipboard
[17.0][MIG] fastapi: Migration to 17.0
Ref: BSRD-708
Depends on:
- [x] https://github.com/OCA/web-api/pull/31
The check failed because of the issue #141747
Thank you, Mr. Chien, for your contribution. It works for me.
@nguyenminhchien Thank you for the migration. Con you remove the dependency on
odoo-addon-endpoint-route-handler @ git+https://github.com/OCA/web-api.git@refs/pull/31/head#subdirectory=endpoint_route_handlerThis one is merged.
Removed, thanks.
/ocabot migration fastapi
@lmignon @sbidoul it seems that Odoo 17 has issues with the addons having a 16.0.x.y.z version, even if they are installable=False
cf. https://github.com/OCA/rest-framework/actions/runs/7634588421/job/20798693591?pr=409#step:7:74
Is this something you prefer reporting as an issue to Odoo or handle in the test scripts or process with a commit updating the versions of the uninstallable addons in the repo?
@lmignon @sbidoul it seems that Odoo 17 has issues with the addons having a 16.0.x.y.z version, even if they are installable=False
cf. https://github.com/OCA/rest-framework/actions/runs/7634588421/job/20798693591?pr=409#step:7:74
Is this something you prefer reporting as an issue to Odoo or handle in the test scripts or process with a commit updating the versions of the uninstallable addons in the repo?
An issue is open on odoo regarding this problem https://github.com/odoo/odoo/issues/141747
After an update of Odoo the following error is raised on the fastapi module
odoo.tools.convert.ParseError: while parsing /opt/odoo/parts/oca_pull/fastapi/security/ir_rule+acl.xml:37 2002Invalid domain: <class 'NameError'>: "name 'authenticated_partner_id' is not defined" while evaluating 2003" ['|', ('user_id', '=', user.id), ('id', '=', authenticated_partner_id)]" To fix this, the following code needs to be changed in
fastapi/models/ir_rule.py
@api.model
def _eval_context(self):
ctx = super()._eval_context()
if "authenticated_partner_id" in self.env.context:
ctx["authenticated_partner_id"] = self.env.context[
"authenticated_partner_id"
]
return ctx
Should be changed to this
@api.model
def _eval_context(self):
ctx = super()._eval_context()
ctx["authenticated_partner_id"] = self.env.context.get("authenticated_partner_id")
return ctx
@rven this looks like https://github.com/OCA/rest-framework/pull/410
@rven this looks like #410
@rven @sbidoul I have picked https://github.com/OCA/rest-framework/pull/410
@nguyenminhchien this pull request is now needed too #416
@nguyenminhchien this pull request is now needed too #416
I picked this one.
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 17.0-ocabot-merge-pr-409-by-lmignon-bump-nobump, awaiting test results.
/ocabot merge nobump
On my way to merge this fine PR! Prepared branch 17.0-ocabot-merge-pr-409-by-dreispt-bump-nobump, awaiting test results.
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 17.0-ocabot-merge-pr-409-by-dreispt-bump-nobump, awaiting test results.
/ocabot merge nobump
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 17.0-ocabot-merge-pr-409-by-dreispt-bump-nobump, awaiting test results.
can someone approve?
Hi @dreispt could you please try again your merge bot command? I believe it wasn't going through previously because of an old pending runboat build, but this has now been fixed thanks to Chien's rebase
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
/ocabot merge nobump
On my way to merge this fine PR! Prepared branch 17.0-ocabot-merge-pr-409-by-lmignon-bump-nobump, awaiting test results.
Hi @dreispt could you please try again your merge bot command? I believe it wasn't going through previously because of an old pending runboat build, but this has now been fixed thanks to Chien's rebase
Yikes, wrong hypothesis :sweat_smile:
Hi @sbidoul the 17.0 branch of this repo is based on 16.0 and some manual changes
Do you think it could now be initialized "normally" through copier?
Hm, weird. Trying again.
/ocabot merge nobump
This PR looks fantastic, let's merge it! Prepared branch 17.0-ocabot-merge-pr-409-by-sbidoul-bump-nobump, awaiting test results.
Ah I understand https://github.com/OCA/rest-framework/pull/409#issuecomment-2132153109 now. The base branch CI was sill configured for 16.0. I ran copier update --trust, answered the questions for 17.0 and rebased.
/ocabot merge nobump
/ocabot merge nobump