Hi Grover, I copied this code from action_button_confirm in addons/sale and obtain assertion error
do you could you tell me what is wrong ?
Thanks
class sale_order(osv.osv):
_inherit = "sale.order"
_columns = {
'coddebug':fields.integer('Codigo Debug'),
}
def create(self, cr, uid, vals, context=None):
if not context:
context = {}
assert len(vals) == 1, 'This option should only be used for a single id at a time.'
context['coddebug'] = 1
if context.get('send_email'):
self.force_quotation_send(cr, uid, vals, context=context)
new_id = super(sale_order, self).create(cr, uid, vals, context=context)
self.signal_workflow(cr, uid, vals, 'order_confirm')
return new_id