diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 01a7b60aedd..cc74b2a9158 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -482,7 +482,6 @@ class account_move_line(osv.osv): cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'account_move_line_journal_id_period_id_index\'') if not cr.fetchone(): cr.execute('CREATE INDEX account_move_line_journal_id_period_id_index ON account_move_line (journal_id, period_id)') - cr.commit() def _check_no_view(self, cr, uid, ids): lines = self.browse(cr, uid, ids) diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py index 5b8418be430..eaa3366ce47 100644 --- a/addons/account/report/account_journal.py +++ b/addons/account/report/account_journal.py @@ -46,7 +46,6 @@ class journal_print(report_sxw.rml_parse): ids_journal_period = obj_jperiod.search(self.cr, self.uid, [('journal_id','=',journal), ('period_id','=',period)]) if ids_journal_period: self.cr.execute('update account_journal_period set state=%s where journal_id=%s and period_id=%s and state=%s', ('printed',journal,period,'draft')) - self.cr.commit() self.cr.execute('select id from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\' order by ('+ sort_selection +'),id', (period, journal)) ids = map(lambda x: x[0], self.cr.fetchall()) ids_final.append(ids) @@ -56,7 +55,6 @@ class journal_print(report_sxw.rml_parse): line_ids.append(a) return line_ids self.cr.execute('update account_journal_period set state=%s where journal_id=%s and period_id=%s and state=%s', ('printed',journal_id,period_id,'draft')) - self.cr.commit() self.cr.execute('select id from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\' order by date,id', (period_id, journal_id)) ids = map(lambda x: x[0], self.cr.fetchall()) return obj_mline.browse(self.cr, self.uid, ids) diff --git a/addons/auction/wizard/auction_lots_buyer_map.py b/addons/auction/wizard/auction_lots_buyer_map.py index bee39e0d258..f9225b65291 100644 --- a/addons/auction/wizard/auction_lots_buyer_map.py +++ b/addons/auction/wizard/auction_lots_buyer_map.py @@ -90,7 +90,6 @@ class wiz_auc_lots_buyer_map(osv.osv_memory): for rec in recs: if rec.ach_login==datas['ach_login']: lots_obj.write(cr, uid, [rec.id], {'ach_uid': datas['ach_uid']}, context=context) - cr.commit() return {} def fields_view_get(self, cr, uid, view_id=None, view_type='form', diff --git a/addons/auction/wizard/auction_lots_make_invoice.py b/addons/auction/wizard/auction_lots_make_invoice.py index 8cda461e186..ca069c96182 100644 --- a/addons/auction/wizard/auction_lots_make_invoice.py +++ b/addons/auction/wizard/auction_lots_make_invoice.py @@ -73,7 +73,6 @@ class auction_lots_make_invoice(osv.osv_memory): result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter') id = mod_obj.read(cr, uid, result, ['res_id']) lots_ids = order_obj.seller_trans_create(cr, uid, context['active_ids'], context) - cr.commit() return { 'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]", 'name': 'Seller invoices', diff --git a/addons/auction/wizard/auction_lots_make_invoice_buyer.py b/addons/auction/wizard/auction_lots_make_invoice_buyer.py index 5d2e370a81e..9357983c315 100644 --- a/addons/auction/wizard/auction_lots_make_invoice_buyer.py +++ b/addons/auction/wizard/auction_lots_make_invoice_buyer.py @@ -73,7 +73,6 @@ class auction_lots_make_invoice_buyer(osv.osv_memory): for lot in lots: up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid': data['buyer_id']}) lots_ids = order_obj.lots_invoice(cr, uid, context['active_ids'], context, data['number']) - cr.commit() return { 'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]", 'name': 'Buyer invoices', diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 85ec16bda8d..f66cd0ca463 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -690,7 +690,6 @@ true, it will allow you to hide the event alarm information without removing it. cr.execute('Update %s set base_calendar_alarm_id=%s, alarm_id=%s \ where id=%s' % (model_obj._table, \ alarm_id, basic_alarm.id, data.id)) - cr.commit() return True def do_alarm_unlink(self, cr, uid, ids, model, context=None): @@ -714,7 +713,6 @@ true, it will allow you to hide the event alarm information without removing it. alarm_obj.unlink(cr, uid, alarm_ids) cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\ where id=%s' % (model_obj._table, datas.id)) - cr.commit() return True res_alarm() diff --git a/addons/point_of_sale/report/pos_invoice.py b/addons/point_of_sale/report/pos_invoice.py index eb59548758c..66f17562399 100644 --- a/addons/point_of_sale/report/pos_invoice.py +++ b/addons/point_of_sale/report/pos_invoice.py @@ -48,7 +48,6 @@ class pos_invoice(report_sxw.rml_parse): raise osv.except_osv(_('Error !'), _('Please create an invoice for this sale.')) iids.append(order.invoice_id) nids.append(order.invoice_id.id) - self.cr.commit() data['ids'] = nids self.datas = data self.ids = nids diff --git a/addons/point_of_sale/wizard/pos_open_statement.py b/addons/point_of_sale/wizard/pos_open_statement.py index 57274c89d74..7fb33ba7f09 100644 --- a/addons/point_of_sale/wizard/pos_open_statement.py +++ b/addons/point_of_sale/wizard/pos_open_statement.py @@ -70,7 +70,6 @@ class pos_open_statement(osv.osv_memory): # }) period = statement_obj._get_period(cr, uid, context) or None cr.execute("INSERT INTO account_bank_statement(journal_id,company_id,user_id,state,name, period_id,date) VALUES(%d,%d,%d,'open','%s',%d,'%s')"%(journal.id, company_id, uid, number, period, time.strftime('%Y-%m-%d %H:%M:%S'))) - cr.commit() cr.execute("select id from account_bank_statement where journal_id=%d and company_id=%d and user_id=%d and state='open' and name='%s'"%(journal.id, company_id, uid, number)) statement_id = cr.fetchone()[0] if st_id: diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d44c327b699..21e4fd8ce46 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1451,7 +1451,6 @@ class stock_move(osv.osv): if not cursor.fetchone(): cursor.execute('CREATE INDEX stock_move_location_id_location_dest_id_product_id_state \ ON stock_move (location_id, location_dest_id, product_id, state)') - cursor.commit() return res def onchange_lot_id(self, cr, uid, ids, prodlot_id=False, product_qty=False,