bzr revid: rvalyi@gmail.com-20100712185650-napvdmmf39h9xyjz
This commit is contained in:
Raphaël Valyi
2010-07-12 15:56:50 -03:00
9 changed files with 0 additions and 11 deletions
-1
View File
@@ -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)
-2
View File
@@ -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)
@@ -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',
@@ -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',
@@ -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',
-2
View File
@@ -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()
@@ -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
@@ -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:
-1
View File
@@ -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,