[MERGE] forward port of branch 7.0 up to 59b76ee

This commit is contained in:
Christophe Simonis 2014-09-04 17:46:51 +02:00
commit 3d80dc2bbf
2 changed files with 6 additions and 18 deletions

View File

@ -3,8 +3,10 @@ openerp.document = function (instance) {
instance.web.Sidebar.include({
init : function(){
this._super.apply(this, arguments);
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
this.items['files'] = [];
if (this.getParent().view_type == "form"){
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
this.items['files'] = [];
}
},
on_attachments_loaded: function(attachments) {
//to display number in name if more then one attachment which has same name.

View File

@ -574,22 +574,8 @@ class sale_order(osv.osv):
def action_button_confirm(self, cr, uid, ids, context=None):
assert len(ids) == 1, 'This option should only be used for a single id at a time.'
self.signal_order_confirm(cr, uid, ids)
# redisplay the record as a sales order
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sale', 'view_order_form')
view_id = view_ref and view_ref[1] or False,
return {
'type': 'ir.actions.act_window',
'name': _('Sales Order'),
'res_model': 'sale.order',
'res_id': ids[0],
'view_type': 'form',
'view_mode': 'form',
'view_id': view_id,
'target': 'current',
'nodestroy': True,
}
return True
def action_wait(self, cr, uid, ids, context=None):
context = context or {}
for o in self.browse(cr, uid, ids):