I have been trying (for days) to pass the context from my XML view to my own JavaScript function as I need the active_id.
The JavaScript function gets data from an external source and populates the table with it, but I need to get the current active_id... Please help!!! This has been driving me insane, all I need is the active_id and nothing else. If there is a way to get this from a pre-existent variable within JavaScript, please let me know what it is.
If I need to use Python, I can, but I do not know how to actually populate my table (it can't be a field) from Python as the documentation does not actually say where returned values go...
Here's an example of my code:
<record id="my_module.example_form" model="ir.ui.view">
        <field name="name">my_module.example_form</field>
        <field name="model">res.partner</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Example Form" version="7.0">
             <script type="text/javascript">
                 $('#My_Table').ready(function() {
                     buildAccountsTable(context);
                 });
             </script>
                <table id="My_Table">
                 ...
                </table>
           </form>
         </field>
</record>
 
                        
Hi did you succeed? I need help along the same lines