[IMP] reload form view after button action and imporve view

bzr revid: rgaopenerp-20120704090923-oaih8y36tuc38m3u
This commit is contained in:
RGA(OpenERP) 2012-07-04 14:39:23 +05:30
parent 81415e4df6
commit 82362ebf05
3 changed files with 9 additions and 2 deletions

View File

@ -980,7 +980,7 @@
<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"/>
@ -997,6 +997,7 @@
<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>

View File

@ -35,4 +35,7 @@
display: inline-block ;
width:100%;
margin: 10px;
}
}
.openerp .oe_extended_form_view .oe_form_field_progressbar.ui-progressbar {
width: 200px !important;
}

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