Chirag Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1-opw-581235-cpa into lp:openerp-web/6.1.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-581235-cpa/+merge/131854

Hello,

Page view doesn't show o2m field when the field also has a o2m field but 
without values.

When displaying a form that has an one2many field with values which itself has 
an one2many field but without a value the whole first one2many field is made 
invisible. The form's first one2many field is displayed if the inner one2many 
field does have a value.

Demo: Add one o2m form inside res.partner.address.
1) Open any customer in page view.

Observed: res.partner.address doesn't show any field if inner o2m have no value.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-581235-cpa/+merge/131854
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-581235-cpa.
=== modified file 'addons/web/static/src/js/view_page.js'
--- addons/web/static/src/js/view_page.js	2012-05-16 08:26:16 +0000
+++ addons/web/static/src/js/view_page.js	2012-10-29 10:46:30 +0000
@@ -25,7 +25,7 @@
             this.$form_header.find('button.oe_form_button_delete').click(this.on_button_delete);
         },
         do_show: function() {
-            if (this.dataset.index === null) {
+            if (this.dataset.index === null && this.dataset.ids.length) {
                 this.dataset.index = this.previous_index || this.dataset.ids.length - 1;
             }
             this._super.apply(this, arguments);

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to