Open flotho opened 2 years ago
how do you succeed to make this work
I didn't. See https://github.com/OCA/odoorpc/pull/60#issuecomment-806706025, when @sebalix said:
Regarding the issue for v14 _render, we could try to use the HTTP controller to generate the report if possible.
do you mean the idea is to generate a crsf token and then call a report url ?
def render(self, res_ids, data=None):
print("asdfadsf")
report_type = self.report_type.lower().replace('-', '_')
render_func = getattr(self, '_render_' + report_type, None)
if not render_func:
return None
return render_func(res_ids, data=data)
we added in odoo branch code, ir_actions_report.py, next to _render, we added this code and its resolve for us, until official team resolve
Hope this will helps someone have urgency
regards, tejas Xamta Infotech - xamta.in snippetbucket.com (Previous Trade Name)
Yes this still need to be addressed, I wanted to grab the CSRF token from the login web page for instance and use it for methods that required one starting from Odoo 14.0. Will try to implement this for release v0.10.0.
@sebalix Have you found any idea on how to grab the CSRF token for this issue ?
Bests regards, Anael
for the record : https://github.com/OCA/odoorpc/issues/88#issuecomment-1907870776
In v14, Odoo turn the public render method as private : https://github.com/OCA/OCB/commit/d9287caf9408bb4ff85ad734cbca08e44321e205#diff-7ce69a093ea1fb1cf2989e24d52cb8e717ab4f2b3c2006ba5cc67503a3df1aff gives this new signature : https://github.com/OCA/OCB/blob/14.0/odoo/addons/base/models/ir_actions_report.py#L871
Trying to download a report throws this issue :
@MiquelRForgeFlow , how do you succeed to make this work : https://github.com/OCA/odoorpc/commit/187853abe2e1e0873468475b7f2f370cd603ba80#diff-891d7fc45dba1b16d043072a3d345c82fdecfd4e466ee9d90c0288c32dfc2ccfR118 Is there any workaround from your point of view ?