Browse Source

Migration of web_widget_x2many_2d_matrix to 10.0

pull/606/head
jesusVMayor 8 years ago
parent
commit
20e2ca4c00
  1. 4
      web_widget_x2many_2d_matrix/__manifest__.py
  2. 2
      web_widget_x2many_2d_matrix/static/src/css/web_widget_x2many_2d_matrix.css
  3. 7
      web_widget_x2many_2d_matrix/static/src/js/web_widget_x2many_2d_matrix.js
  4. 6
      web_widget_x2many_2d_matrix/static/src/xml/web_widget_x2many_2d_matrix.xml

4
web_widget_x2many_2d_matrix/__manifest__.py

@ -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
web_widget_x2many_2d_matrix/static/src/css/web_widget_x2many_2d_matrix.css

@ -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;
}

7
web_widget_x2many_2d_matrix/static/src/js/web_widget_x2many_2d_matrix.js

@ -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();
},

6
web_widget_x2many_2d_matrix/static/src/xml/web_widget_x2many_2d_matrix.xml

@ -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…
Cancel
Save