[MERGE] forward port of branch 7.0 up to 59b76ee
This commit is contained in:
commit
3d80dc2bbf
|
@ -3,8 +3,10 @@ openerp.document = function (instance) {
|
||||||
instance.web.Sidebar.include({
|
instance.web.Sidebar.include({
|
||||||
init : function(){
|
init : function(){
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
|
if (this.getParent().view_type == "form"){
|
||||||
this.items['files'] = [];
|
this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
|
||||||
|
this.items['files'] = [];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
on_attachments_loaded: function(attachments) {
|
on_attachments_loaded: function(attachments) {
|
||||||
//to display number in name if more then one attachment which has same name.
|
//to display number in name if more then one attachment which has same name.
|
||||||
|
|
|
@ -574,22 +574,8 @@ class sale_order(osv.osv):
|
||||||
def action_button_confirm(self, cr, uid, ids, context=None):
|
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.'
|
assert len(ids) == 1, 'This option should only be used for a single id at a time.'
|
||||||
self.signal_order_confirm(cr, uid, ids)
|
self.signal_order_confirm(cr, uid, ids)
|
||||||
|
return True
|
||||||
# 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,
|
|
||||||
}
|
|
||||||
|
|
||||||
def action_wait(self, cr, uid, ids, context=None):
|
def action_wait(self, cr, uid, ids, context=None):
|
||||||
context = context or {}
|
context = context or {}
|
||||||
for o in self.browse(cr, uid, ids):
|
for o in self.browse(cr, uid, ids):
|
||||||
|
|
Loading…
Reference in New Issue