-
Notifications
You must be signed in to change notification settings - Fork 91
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
[V12] Unable to populate a select field with odoo data #11
Comments
Hi, Which version of the module do you use? |
I tried on the Demo too. and also have installed "formio_sale". So how would I demo: ?
tnx again |
This (for I know currently) only works with Select component. For example - the following shows (product) names from Sale order lines. Also see the URL endpoint (Odoo formio controller) which implements this. See the comment and options to use in URL query-params. |
Yes, I tried that but it doesn't seem to work for me. On your runbot:
I get:
But as you can see, the "filtering part" ("&domain_fields=function&city=Sittard") doesn't work. But I am unable to get the same result into a list element in the form.
|
Ok thanks for checking and the log. |
Can confirm when I'm passing the url directly with following schema it works. https://server_adress/formio/form/data/uuid_from_db?model=res.partner&label=name It looks like the form is not transmitting the uuid to the controller and that's why the function isn't transmitting the desired content to the formio form. Wouldn't it a work around to remove the "if not form" check from the controller? |
Change URLs so Formio JS client doesn't strip the UUID (issue #11)
[UPD] Resolves #11. Change URLs so Formio JS client doesn't strip the…
Hi @ygol, @lieblinger Required steps:
v12: v11: |
By the way, mind the URL in the Select component it's So the correct
|
You could check my v12 demo. It's already deployed over there. Login: demo / demo There's a "Demo Sale 1" form builder, with 2 Select components fetching data from Odoo. However notice (unrelated) issue #20 tough. |
Checked your updated online instance and tried it also on my local odoo and flectra enviroment, but it's stilll not working. I've putted a print statement into the form_data controller function. The print() command is never excuted, so it seems like there's still something wrong. By the way... Before your last commit it only worked with fqdn + /formio/form/data/ + manual uuid in the formio url field. When I putted only /formio/form/data without fqdn in the url field it didn't work. |
Did you merged all my latest changes into your Flectra fork? |
Tested your online demo (link below) right now in edge and chrome with cleared browser cache and it's not working. See screenshot. https://odoo12-b4a887d572e9.victhorious.com/web#id=97&action=114&model=formio.builder&view_type=form&menu_id=83 |
That makes sense. Such events don't work (yet) from the Form Builder. I just tested with the Form: https://odoo12-b4a887d572e9.victhorious.com/web?#id=96&view_type=form&model=formio.form&action=116&menu_id=83 The JSON-RPC request from the Form Builder needs to be blocked somehow. |
That really makes sense 👍 In a Form it works great on flectra and odoo v11. |
Thanks for reviewing @lieblinger. I really appreciate it! |
Closed this issue. No further info received. |
Prefix the "Data Source URLs" with a "/", indicating it's relative. So from now on:
|
Does someone have a working example on how to set this up? |
@framatt see this issue with my examples. If you need more support, send me a DM mail: |
I am trying to create a simple form containing a select field that is populated with odoo data.
Shouldn't I get somethin to select under "Resource" (in the same Data tab)?
I do not have the buttons "Settings in Odoo" and "Odoo" at the top of the builder's view as shown in: https://apps.odoo.com/apps/modules/12.0/formio/intro-screenshot-1.png
Am I missing something?
Thanks in advance.
The text was updated successfully, but these errors were encountered: