Merge lp:~therp-nl/openerp-web/7.0-lp1013636-x2m_honour_required_attribute into lp:openerp-web/7.0

Proposed by Stefan Rijnhart (Opener)
Status: Needs review
Proposed branch: lp:~therp-nl/openerp-web/7.0-lp1013636-x2m_honour_required_attribute
Merge into: lp:openerp-web/7.0
Diff against target: 66 lines (+18/-2)
3 files modified
addons/web/static/src/css/base.css (+6/-0)
addons/web/static/src/css/base.sass (+9/-0)
addons/web/static/src/js/view_form.js (+3/-2)
To merge this branch: bzr merge lp:~therp-nl/openerp-web/7.0-lp1013636-x2m_honour_required_attribute
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp (community) code review, test Approve
OpenERP Core Team Pending
Review via email: mp+156310@code.launchpad.net

Description of the change

This branch, from August 2012 was approved by Xavier in November 2012 (see [1]) but that MP was against trunk and has now conflicts. I am resubmitting against 7.0 here.

[1] https://code.launchpad.net/~therp-nl/openerp-web/7.0-lp1013636-x2m_honour_required_attribute/+merge/116238

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

works fine (in OCB branch)

review: Approve (code review, test)

Unmerged revisions

2755. By Stefan Rijnhart (Opener)

[MRG] merged with lp:openerp-web/7.0 revno 3872

2754. By Stefan Rijnhart (Opener)

[MRG] merged with lp:openerpweb revno 2863 to resolve conflict in merge proposal

2753. By Stefan Rijnhart (Opener)

[FIX] Remove redundant check containing an invalid keyword
[FIX] Move css modifications to sass file

2752. By Stefan Rijnhart (Opener)

[ADD] Support for required *2many fields, including visual hints

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/css/base.css'
2--- addons/web/static/src/css/base.css 2013-03-21 16:47:41 +0000
3+++ addons/web/static/src/css/base.css 2013-03-31 17:14:24 +0000
4@@ -2059,6 +2059,12 @@
5 position: relative;
6 display: inline-block;
7 }
8+.openerp .oe_form_editable .oe_form_required.oe_form_field_one2many table.oe_list_content, .openerp .oe_form_editable .oe_form_required.oe_form_field_many2many table.oe_list_content {
9+ background-color: #d2d2ff !important;
10+}
11+.openerp .oe_form_editable .oe_form_invalid.oe_form_field_one2many table.oe_list_content, .openerp .oe_form_editable .oe_form_invalid.oe_form_field_many2many table.oe_list_content {
12+ background-color: #ff6666 !important;
13+}
14 .openerp .oe_form_invalid input, .openerp .oe_form_invalid select, .openerp .oe_form_invalid textarea {
15 background-color: #ff6666 !important;
16 border: 1px solid #dd0000 !important;
17
18=== modified file 'addons/web/static/src/css/base.sass'
19--- addons/web/static/src/css/base.sass 2013-03-21 16:47:41 +0000
20+++ addons/web/static/src/css/base.sass 2013-03-31 17:14:24 +0000
21@@ -1647,6 +1647,15 @@
22 .oe_form_dropdown_section
23 position: relative
24 display: inline-block
25+ .oe_form_editable
26+ .oe_form_required
27+ &.oe_form_field_one2many, &.oe_form_field_many2many
28+ table.oe_list_content
29+ background-color: #d2d2ff !important
30+ .oe_form_invalid
31+ &.oe_form_field_one2many, &.oe_form_field_many2many
32+ table.oe_list_content
33+ background-color: #ff6666 !important
34 .oe_form_invalid
35 input, select, textarea
36 background-color: #F66 !important
37
38=== modified file 'addons/web/static/src/js/view_form.js'
39--- addons/web/static/src/js/view_form.js 2013-03-28 21:07:18 +0000
40+++ addons/web/static/src/js/view_form.js 2013-03-31 17:14:24 +0000
41@@ -3459,7 +3459,6 @@
42 };
43 instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
44 multi_selection: false,
45- disable_utility_classes: true,
46 init: function(field_manager, node) {
47 this._super(field_manager, node);
48 lazy_build_o2m_kanban_view();
49@@ -3729,6 +3728,9 @@
50 }
51 return $.when(false);
52 },
53+ is_false: function() {
54+ return this.dataset.ids.length == 0;
55+ },
56 is_syntax_valid: function() {
57 if (! this.viewmanager || ! this.viewmanager.views[this.viewmanager.active_view])
58 return true;
59@@ -4222,7 +4224,6 @@
60 */
61 instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
62 multi_selection: false,
63- disable_utility_classes: true,
64 init: function(field_manager, node) {
65 this._super(field_manager, node);
66 this.is_loaded = $.Deferred();