3
0
Fork 0

[FIX] web_widget_x2many_2d_matrix: Forced render mode to list on small screens

17.0
Alexandre Díaz 2019-10-11 20:05:27 +02:00 committed by SodexisTeam
parent 38c180c58c
commit 49e39b3767
6 changed files with 28 additions and 1 deletions

View File

@ -215,6 +215,7 @@ Contributors
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Dennis Sluijk <d.sluijk@onestein.nl>
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>
* Alexandre Díaz <alexandre.diaz@tecnativa.com>
Maintainers
~~~~~~~~~~~

View File

@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': '2D matrix for x2many fields',
'version': '12.0.1.1.0',
'version': '12.0.2.0.0',
'author': (
'Therp BV, '
'Tecnativa, '

View File

@ -6,3 +6,4 @@
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Dennis Sluijk <d.sluijk@onestein.nl>
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>
* Alexandre Díaz <alexandre.diaz@tecnativa.com>

View File

@ -575,6 +575,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Jairo Llopis &lt;<a class="reference external" href="mailto:jairo.llopis&#64;tecnativa.com">jairo.llopis&#64;tecnativa.com</a>&gt;</li>
<li>Dennis Sluijk &lt;<a class="reference external" href="mailto:d.sluijk&#64;onestein.nl">d.sluijk&#64;onestein.nl</a>&gt;</li>
<li>Alexey Pelykh &lt;<a class="reference external" href="mailto:alexey.pelykh&#64;brainbeanapps.com">alexey.pelykh&#64;brainbeanapps.com</a>&gt;</li>
<li>Alexandre Díaz &lt;<a class="reference external" href="mailto:alexandre.diaz&#64;tecnativa.com">alexandre.diaz&#64;tecnativa.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">

View File

@ -0,0 +1,23 @@
/* Copyright 2019 Alexandre Díaz
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
odoo.define('web_widget_x2many_2d_matrix.X2Many2dMatrixView', function (require) {
"use strict";
var BasicView = require('web.BasicView');
BasicView.include({
init: function (viewInfo) {
// Force mode='list'
var $arch = $(viewInfo.arch);
var selector = "field[widget='x2many_2d_matrix']";
$arch.find(selector).each(function (i, e) {
$(e).attr('mode', 'list');
});
viewInfo.arch = $arch.prop('outerHTML');
this._super.apply(this, arguments);
},
});
});

View File

@ -6,6 +6,7 @@
<template id="assets_backend" name="web_widget_x2many_2d_matrix assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/2d_matrix_view.js" />
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/2d_matrix_renderer.js" />
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js" />
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js" />