openerp - Override Order Confirmation Button -


i trying override order confirmation button using custom module. aim change prefix in order name when order confirmed. example, when quotation a-130715-003 confirmed, name should change ab-130715-003 (note b added).the rest of name should remain unchanged.

here code far.

def action_button_confirm(self, cr, uid, ids, context=none):     """     changes quotation sequence adding b.     """     sale in self.browse(cr, uid, ids, context=none):         sequenc = sale.name         sequenc = sequenc[:1] + 'b' + sequenc[1:]         self.write(cr, uid, [sale.id], {             'name': sequenc         })     return super(sale_offer, self).action_button_confirm(cr, uid, ids, context=context) 

this not working. kindly ideas.

then should edit sequence sale_order , not confirm button. sequences located in ir.sequence or under settings.

these sequences contain prefixes, suffixes, etc...


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -