Hello, I am having trouble to extend the account_payment_widget.js to use into my module. Here is how I am doing it:
1-Copied the file account_payment_widget.js into my_module/static/src/js/my_account_payement_wigdet.js
2-Made a change in the file (added one line to insert the invoice state in var options): odoo.define('my_module.mypayment', function (require) {"use strict"; var ShowPaymentLineWidgetExtend = require('account.account_payment_widget') ShowPaymentLineWidgetExtend.ShowPaymentLineWidget.include({ render_value: function() { /*..same original code..*/ _.each(this.$('.js_payment_info'), function(k, v){ var options = { 'content': QWeb.render('PaymentPopOver', { 'invoice_state': info.content[v].invoice_state, // <--Added this line /*..same original code..*/ core.form_widget_registry.add('payment', ShowPaymentLineWidgetExtend); });
3- Inserted the below view into the manifest:
<template id="assets_backend" name="My Module CSS Assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/my_module/static/src/css/my.css"/>
<link rel="stylesheet" href="/my_module/static/src/xml/account_payment.xml"/>
<script type="text/javascript" src="/my_module/static/src/js/my_account_payment_widget.js"></script>
</xpath> </template>
4- After restart, the page gets stuck when trying to get the js:
2016-11-28 15:47:48,368 4752 INFO mydb openerp.modules.loading: Modules loaded.
2016-11-28 15:47:48,375 4752 INFO mydb openerp.models: Computing parent left and right for table ir_ui_menu...
2016-11-28 15:47:48,496 4752 INFO mydb openerp.models: Computing parent left and right for table product_category...
2016-11-28 15:47:48,510 4752 INFO mydb openerp.addons.base.res.res_config: getting next operation2016-11-28 15:47:48,515 4752 INFO mydb openerp.addons.base.res.res_config: getting next ir.actions.todo
2016-11-28 15:47:48,546 4752 INFO mydb openerp.addons.base.res.res_config: next action is None2016-11-28 15:47:48,624 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:47:48] "POST /web/dataset/call_button HTTP/1.1" 200 -
2016-11-28 15:47:49,073 4752 INFO mydb openerp.addons.base.ir.ir_http: Generating routing map2016-11-28 15:47:49,900 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:47:49] "POST /web/menu/load_needaction HTTP/1.1" 200 -
2016-11-28 15:47:49,931 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:47:49] "POST /web/dataset/call_kw/ir.module.module/read HTTP/1.1" 200 -
2016-11-28 15:47:56,394 4752 INFO mydb openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [248, 247]
2016-11-28 15:47:58,953 4752 INFO mydb openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [249]
2016-11-28 15:47:59,117 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:47:59] "GET /web/? HTTP/1.1" 200 -
2016-11-28 15:47:59,298 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:47:59] "GET /web/content/262-32cec62/web.assets_backend.0.css HTTP/1.1" 200 -
2016-11-28 15:47:59,654 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:47:59] "GET /web/content/263-32cec62/web.assets_backend.1.css HTTP/1.1" 200 -
2016-11-28 15:48:00,025 4752 INFO mydb werkzeug: 127.0.0.1 - - [28/Nov/2016 15:48:00] "GET /web/content/264-32cec62/web.assets_backend.js HTTP/1.1" 200 -
Please advise.