Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Example of calling JavaScript from Odoo client and filling back in some field?
Re: Example of calling JavaScript from Odoo client and filling back in some field?
Re: Example of calling JavaScript from Odoo client and filling back in some field?
byI think you can also do the custom JS code execution with a client action
For inserting the value somewhere in the form plain old jquery probably can be used :)
Kind Regards,
Kiril
Not really - at least I cannot see it there. The example shows the reverse flow: from JS to Python.
What I need to do is:
*) have a form in Odoo (it's pos.payment.method) and my field on it (let's call it my_field)
*) put a control (button or something similar) on it
*) when I click on the button, JavaScript code is called
*) the result of the JS invocation is put into my_field
Best regards
Radovan
On piatok 27. septembra 2024 10:32:27 CEST Tom Blauwendraat wrote:
> Does this provide some kind of blueprint?
> https://github.com/OCA/pos/blob/16.0/pos_payment_terminal/static/src/js/paym
> ent_terminal.js#L106 [1]
>
> On 9/27/24 10:17, Radovan Skolnik
> wrote:
>
>
> Hello,
>
> I
> am looking for an example on how to call JavaScript from Odoo
> client and feeding the result back to some field(s) on the
> form. There is half of it (calling JavaScript) for example in
> purchase/static/src/toaster_button/toaster_button_widget.js
> but it lacks the other half.
>
> The
> idea here is I need to query a PoS terminal for configuration
> that's residing on the local network. The configuration would
> be later used in PoS to communicate with the terminal.
>
> Thank
> you. Best regards
>
>
> Radovan Skolnik
>
> _______________________________________________
> Mailing-List: https://odoo-community.org/groups/contributors-15 [2]
> Post to: mailto:contributors@odoo-community.org [3]
> Unsubscribe: https://odoo-community.org/groups?unsubscribe [4]
>
>
>
> _______________________________________________
> Mailing-List: https://odoo-community.org/groups/contributors-15 [5]
> Post to: mailto:contributors@odoo-community.org
> Unsubscribe: https://odoo-community.org/groups?unsubscribe [6]
>
>
>
> [1]
> https://github.com/OCA/pos/blob/16.0/pos_payment_terminal/static/src/js/pay
> ment_terminal.js#L106 [2] https://odoo-community.org/groups/contributors-15
> [3] mailto:contributors@odoo-community.org
> [4] https://odoo-community.org/groups?unsubscribe
> [5] https://odoo-community.org/groups/contributors-15
> [6] https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
-- Lambda IS DOOEL - free/open-source information systems implementation & development Kiril Vangelovski - consultant/developer web: https://www.lambda-is.com tel: +38971753823
Reference
-
Example of calling JavaScript from Odoo client and filling back in some field?
byData Dance s.r.o., Radovan Skolnik-
Re: Example of calling JavaScript from Odoo client and filling back in some field?
byData Dance s.r.o., Radovan Skolnik -
Re: Example of calling JavaScript from Odoo client and filling back in some field?
byLambda IS DOOEL, Kiril Vangelovski -
Re: Example of calling JavaScript from Odoo client and filling back in some field?
byTherp, Tom Blauwendraat -
Re: Example of calling JavaScript from Odoo client and filling back in some field?
byData Dance s.r.o., Radovan Skolnik -
Re: Example of calling JavaScript from Odoo client and filling back in some field?
bysagars209 -
Re: Example of calling JavaScript from Odoo client and filling back in some field?
byTherp, Tom Blauwendraat
-