@@ -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()
|
||||
|
||||
@@ -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={}):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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'})
|
||||
|
||||
Reference in New Issue
Block a user