Hi Daniel,
Thank you for all those details.
I tried with your solution but i've got an error (see below) :
ERROR: TestUi.test_01_admin_bank_statement_reconciliation
Traceback (most recent call last):
File "/home/odoo/src/odoo/addons/account/tests/test_reconciliation_widget.py", line 38, in test_01_admin_bank_statement_reconciliation
'bank_statement_reconciliation', login="admin")
File "/home/odoo/src/odoo/odoo/tests/common.py", line 1251, in start_tour
res = self.browser_js(url_path=url_path, code=code, ready=ready, **kwargs)
File "/home/odoo/src/odoo/odoo/tests/common.py", line 1223, in browser_js
self.assertTrue(self.browser._wait_ready(ready), 'The ready "%s" code was always falsy' % ready)
File "/home/odoo/src/odoo/odoo/tests/common.py", line 924, in _wait_ready
res = self._get_message()
File "/home/odoo/src/odoo/odoo/tests/common.py", line 801, in _get_message
raise ChromeBrowserException(descr or pprint.pformat(exception_details))
odoo.tests.common.ChromeBrowserException: SyntaxError: Unexpected token ':'
Any idea for this error!?
Please find below my code : views/clipboard.xml, clipboard.js and button declaration
I've addedd clipboard.xml in manifest file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="safar_module_asset" name="safar_module.assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/safar_module/static/src/js/clipboard.js"/>
</xpath>
</template>
</data>
</odoo>
events: {
“click . class_js_safar”: “read_from_clipboard”,
},
read_from_clipboard: function() {
console.log('alert log')
},
<button name="Recup_safar_config"
string="Récupérer Config"
type="object"
class="class_js_safar"/>
Hope you can help me
Vincent
please check form controller which is dealing create, edit buttons events.
addons/web/static/src/js/views/form/form_controller.js