mirror of https://github.com/OCA/web.git
Migration of web_widget_x2many_2d_matrix to 10.0
parent
e4afb595f4
commit
ace6e2e833
|
@ -5,7 +5,7 @@
|
|||
|
||||
{
|
||||
"name": "2D matrix for x2many fields",
|
||||
"version": "9.0.1.0.0",
|
||||
"version": "10.0.1.0.0",
|
||||
"author": "Therp BV, "
|
||||
"Tecnativa,"
|
||||
"Odoo Community Association (OCA)",
|
||||
|
@ -21,5 +21,5 @@
|
|||
"qweb": [
|
||||
'static/src/xml/web_widget_x2many_2d_matrix.xml',
|
||||
],
|
||||
'installable': False,
|
||||
"installable": True,
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe_form_field_x2many_2d_matrix .oe_list_content > tbody > tr > td.oe_list_field_cell
|
||||
.oe_form_field_x2many_2d_matrix .oe_list_content > tbody > tr > td.oe_list_field_cell
|
||||
{
|
||||
white-space: normal;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@ odoo.define('web_widget_x2many_2d_matrix.widget', function (require) {
|
|||
var FieldOne2Many = core.form_widget_registry.get('one2many');
|
||||
var Model = require('web.Model');
|
||||
var data = require('web.data');
|
||||
var _ = require('_');
|
||||
var $ = require('$');
|
||||
var $ = require('jquery');
|
||||
|
||||
var WidgetX2Many2dMatrix = FieldOne2Many.extend({
|
||||
template: 'FieldX2Many2dMatrix',
|
||||
|
@ -383,10 +382,10 @@ odoo.define('web_widget_x2many_2d_matrix.widget', function (require) {
|
|||
effective_readonly_change: function()
|
||||
{
|
||||
this.$el
|
||||
.find('tbody td.oe_list_field_cell span.oe_form_field .edit')
|
||||
.find('tbody .read')
|
||||
.toggle(!this.get('effective_readonly'));
|
||||
this.$el
|
||||
.find('tbody td.oe_list_field_cell span.oe_form_field .read')
|
||||
.find('tbody .read')
|
||||
.toggle(this.get('effective_readonly'));
|
||||
this.$el.find('.edit').first().focus();
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<templates>
|
||||
<t t-name="FieldX2Many2dMatrix">
|
||||
<div t-att-class="widget.widget_class">
|
||||
<table class="oe_list_content">
|
||||
<table class="o_list_view table table-condensed table-striped">
|
||||
<thead>
|
||||
<tr class="oe_list_header_columns">
|
||||
<th />
|
||||
|
@ -14,9 +14,9 @@
|
|||
<tbody>
|
||||
<tr t-foreach="widget.get_y_axis_values()" t-as="y" t-att-data-y="y">
|
||||
<th><t t-esc="widget.get_y_axis_label(y)" /></th>
|
||||
<td t-foreach="widget.get_x_axis_values()" t-as="x" t-att-class="'oe_list_field_cell' + (widget.is_numeric ? ' oe_number' : '')" t-att-data-x="x">
|
||||
<td t-foreach="widget.get_x_axis_values()" t-as="x" t-att-class="'' + (widget.is_numeric ? ' oe_number' : '')" t-att-data-x="x">
|
||||
<span t-att-class="widget.get_xy_value_class()">
|
||||
<input class="edit" t-att-data-id="widget.get_xy_id(x, y)" t-att-value="widget.format_xy_value(widget.get_xy_value(x, y))" t-att="widget.get_xy_att(x, y)"/>
|
||||
<input class="edit o_form_input" t-att-data-id="widget.get_xy_id(x, y)" t-att-value="widget.format_xy_value(widget.get_xy_value(x, y))" t-att="widget.get_xy_att(x, y)"/>
|
||||
<span class="read"><t t-esc="widget.format_xy_value(widget.get_xy_value(x, y))" /></span>
|
||||
</span>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue