modifs
authorFabien Pinckaers <fp@tinyerp.com>
Wed, 31 Mar 2010 14:48:00 +0000 (16:48 +0200)
committerFabien Pinckaers <fp@tinyerp.com>
Wed, 31 Mar 2010 14:48:00 +0000 (16:48 +0200)
bzr revid: fp@tinyerp.com-20100331144800-y7e8kso0qsretfpb

addons/account_analytic_plans/account_analytic_plans.py
addons/base_calendar/base_calendar.py
addons/base_report_designer/base_report_designer.py
addons/board/board.py
addons/crm/crm_segmentation.py
addons/crm_profiling/crm_profiling.py
addons/point_of_sale/pos.py
addons/stock/stock.py

index af19707..7f1e385 100644 (file)
@@ -404,7 +404,6 @@ class sale_order_line(osv.osv):
 
                 if rec:
                     pool_inv_line.write(cr, uid, [line.id], {'analytics_id':rec.analytics_id.id}, context=context)
-                    cr.commit()
         return create_ids
 
 sale_order_line()
index 17202c3..3c99b7b 100644 (file)
@@ -562,7 +562,6 @@ are both optional, but if one occurs, so MUST the other"""),
                 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={}):
index bddc9da..311449f 100644 (file)
@@ -60,7 +60,6 @@ class report_xml(osv.osv):
             'report_sxw_content': base64.decodestring(file_sxw),
             'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())),
         })
-        cr.commit()
         db = pooler.get_db_only(cr.dbname)
         interface.register_all(db)
         return True
index 29e8a33..5154a7c 100644 (file)
@@ -57,15 +57,12 @@ class board_board(osv.osv):
 
     def write(self, cr, uid, ids, vals, context={}):
         result = super(board_board, self).write(cr, uid, ids, vals, context)
-        cr.commit()
 
         board = self.pool.get('board.board').browse(cr, uid, ids[0])
 
         view = self.create_view(cr, uid, ids[0], context)
         id = board.view_id.id
         cr.execute("update ir_ui_view set arch=%s where id=%s" , (view, id))
-        cr.commit()
-
         return result
 
     def create(self, cr, user, vals, context=None):
index 2f0e2a1..2844cd0 100644 (file)
@@ -78,10 +78,8 @@ class crm_segmentation(osv.osv):
 
             for partner_id in partners:
                 cr.execute('insert into res_partner_category_rel (category_id,partner_id) values (%s,%s)', (categ['categ_id'][0],partner_id))
-            cr.commit()
 
             self.write(cr, uid, [id], {'state':'not running', 'partner_id':0})
-            cr.commit()
         return True
 
     def process_stop(self, cr, uid, ids, *args):
index 7e70df3..dc019f9 100644 (file)
@@ -243,10 +243,8 @@ class crm_segmentation(osv.osv):
 
             for partner_id in partners:
                 cr.execute('insert into res_partner_category_rel (category_id,partner_id) values (%s,%s)', (categ['categ_id'][0],partner_id))
-            cr.commit()
 
             self.write(cr, uid, [id], {'state':'not running', 'partner_id':0})
-            cr.commit()
         return True
 
 crm_segmentation()
index 4b3f73f..c551ccd 100644 (file)
@@ -158,28 +158,8 @@ class pos_order(osv.osv):
                         if val<o.date_created:
                             val=o.date_created
             if val:
-             #   cr.execute("Update pos_order set date_payment='%s' where id = %d"%(val, order.id))
-             #   cr.commit()
                 res[order.id]=val
         return res
- #       tax_obj = self.pool.get('account.tax')
- #       pay_obj = self.pool.get('pos.payment')
- #       for order in self.browse(cr, uid, ids):
- #           val = 0.0
- #           tot =0.0
- #           for pay in order.payments:
- #               tot+= pay.amount
- #           if order.amount_total==tot:
- #               res[order.id]=time.strftime('%Y-%m-%d')
- #           for line in order.lines:
-
- #               val = reduce(lambda x, y: x+round(y['amount'], 2),
- #                       tax_obj.compute_inv(cr, uid, line.product_id.taxes_id,
- #                           line.price_unit * \
- #                           (1-(line.discount or 0.0)/100.0), line.qty),
- #                           val)
-
- #           res[order.id] = val
 
     def _amount_tax(self, cr, uid, ids, field_name, arg, context):
         res = {}
@@ -565,7 +545,6 @@ class pos_order(osv.osv):
                 val=val and val[0] or None
                 if val:
                     cr.execute("Update pos_order set date_payment='%s' where id = %d"%(val, order.id))
-                    cr.commit()
         return True
 
 
index 7012e23..94fab1d 100644 (file)
@@ -2096,7 +2096,6 @@ class stock_picking_move_wizard(osv.osv_memory):
                 if line.picking_id:
                     picking_obj.write(cr, uid, [line.picking_id.id], {'move_lines': [(1, line.id, {'picking_id': act['picking_id']})]})
                     picking_obj.write(cr, uid, [act['picking_id']], {'move_lines': [(1, line.id, {'picking_id': act['picking_id']})]})
-                    cr.commit()
                     old_picking = picking_obj.read(cr, uid, [line.picking_id.id])[0]
                     if not len(old_picking['move_lines']):
                         picking_obj.write(cr, uid, [old_picking['id']], {'state': 'done'})