[IMP] reload form view after button action and imporve view
authorRGA(OpenERP) <>
Wed, 4 Jul 2012 09:09:23 +0000 (14:39 +0530)
committerRGA(OpenERP) <>
Wed, 4 Jul 2012 09:09:23 +0000 (14:39 +0530)
bzr revid: rgaopenerp-20120704090923-oaih8y36tuc38m3u

addons/account/account_view.xml
addons/account/static/src/css/account.css
addons/account/static/src/js/account.js

index 5cc89bb..bae4d41 100644 (file)
             <field name="type">tree</field>
             <field eval="4" name="priority"/>
             <field name="arch" type="xml">
-                <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" editable="top" on_write="on_create_write">
+                <tree colors="red:state == 'draft';black:reconcile_id > 0" string="Journal Items" editable="top" on_write="on_create_write">
                     <field name="date"/>
                     <field name="period_id"  invisible="1"/>
                     <field name="move_id"/>
                     <field name="amount_currency" attrs="{'readonly':[('state','=','valid')]}"/>
                     <field name="currency_id" attrs="{'readonly':[('state','=','valid')]}"/>
                     <field name="state" invisible="1"/>
+                    <field name="reconcile_id" invisible="1"/>
                 </tree>
             </field>
         </record>
index 07d3a83..d084126 100644 (file)
@@ -35,4 +35,7 @@
   display: inline-block ;
   width:100%;
   margin: 10px;
-}  
\ No newline at end of file
+}  
+.openerp .oe_extended_form_view  .oe_form_field_progressbar.ui-progressbar {
+  width: 200px !important;
+}
\ No newline at end of file
index e4ca9ad..544ec4c 100644 (file)
@@ -136,6 +136,7 @@ instance.account.many2one_pager = instance.web.form.FieldMany2One.extend({
 
 instance.account.list_button = instance.web.form.WidgetButton.extend({
     on_click: function() {
+        var self = this
         var list_view = this.view.getParent().list_view.controller
         ids = list_view.get_selected_ids()
         if (ids.length == 0) {
@@ -158,8 +159,10 @@ instance.account.list_button = instance.web.form.WidgetButton.extend({
             self.do_action(result.result, function () {
                 // reload view
                 list_view.reload();
+                self.getParent().reload()
             });
         });
+        
    }
 })