Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
5954 Переглядів

Hi all,

Here i want to show a table in form view, here is what i am tried.

views/templates.xml

<openerp>
 <data>
 <template id="assets_backend" name="backoffice_assets" inherit_id="web.assets_backend">
 <xpath expr="." position="inside">
 <script type="text/javascript" src="/backoffice/static/src/js/back.js"></script>
 </xpath>
 </template>
 </data>
</openerp>

static/src/js/back.js

openerp.backoffice = function(instance) {
     instance.backoffice.Matrix = instance.web.form.FormWidget.extend(instance.web.form.ReinitializeWidgetMixin, {
         init: function() {
         this._super.apply(this, arguments);
         },
     }); 
 instance.web.form.custom_widgets.add('matrix', 'instance.backoffice.Matrix');
};

static/src/xml/back.xml

<templates id="template" xml:space="preserve">
 <t t-name="Matrix">
 <div>
 <b>Hai this is test</b>
 </div>
 </t>
</templates>

views/custom_view.xml

<widget type="matrix"></widget>

But not working, please anyone helpme....

Thanks in advance...

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
трав. 24
1348
1
лип. 24
1781
1
лип. 23
4244
0
бер. 24
3246
1
вер. 22
5997