diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py
index 136731fbac6..3d3905ed249 100644
--- a/addons/account/__terp__.py
+++ b/addons/account/__terp__.py
@@ -31,7 +31,7 @@
Taxes management
Budgets
""",
- "website" : "http://tinyerp.com/module_account.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [
],
diff --git a/addons/account/account.py b/addons/account/account.py
index 30a18ac6efe..5908fa737e0 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -448,7 +448,7 @@ class account_journal(osv.osv):
'account_control_ids': fields.many2many('account.account', 'account_account_type_rel', 'journal_id','account_id', 'Account', domain=[('type','<>','view'), ('type', '<>', 'closed')]),
'active': fields.boolean('Active'),
- 'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tell Tiny ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
+ 'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tell Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account'),
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account'),
'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal."),
@@ -606,8 +606,8 @@ class account_period(osv.osv):
if role.name=='Period':
mode = 'draft'
for id in ids:
- cr.execute('update account_journal_period set state=%s where period_id=%d', (mode, id))
- cr.execute('update account_period set state=%s where id=%d', (mode, id))
+ cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
+ cr.execute('update account_period set state=%s where id=%s', (mode, id))
return True
account_period()
@@ -637,7 +637,7 @@ class account_journal_period(osv.osv):
def _check(self, cr, uid, ids, context={}):
for obj in self.browse(cr, uid, ids, context):
- cr.execute('select * from account_move_line where journal_id=%d and period_id=%d limit 1', (obj.journal_id.id, obj.period_id.id))
+ cr.execute('select * from account_move_line where journal_id=%s and period_id=%s limit 1', (obj.journal_id.id, obj.period_id.id))
res = cr.fetchall()
if res:
raise osv.except_osv(_('Error !'), _('You can not modify/delete a journal with entries for this period !'))
@@ -882,7 +882,7 @@ class account_move(osv.osv):
# find the first line of this move with the current mode
# or create it if it doesn't exist
- cr.execute('select id from account_move_line where move_id=%d and centralisation=%s limit 1', (move.id, mode))
+ cr.execute('select id from account_move_line where move_id=%s and centralisation=%s limit 1', (move.id, mode))
res = cr.fetchone()
if res:
line_id = res[0]
@@ -901,16 +901,16 @@ class account_move(osv.osv):
# find the first line of this move with the other mode
# so that we can exclude it from our calculation
- cr.execute('select id from account_move_line where move_id=%d and centralisation=%s limit 1', (move.id, mode2))
+ cr.execute('select id from account_move_line where move_id=%s and centralisation=%s limit 1', (move.id, mode2))
res = cr.fetchone()
if res:
line_id2 = res[0]
else:
line_id2 = 0
- cr.execute('select sum('+mode+') from account_move_line where move_id=%d and id<>%d', (move.id, line_id2))
+ cr.execute('select sum('+mode+') from account_move_line where move_id=%s and id<>%s', (move.id, line_id2))
result = cr.fetchone()[0] or 0.0
- cr.execute('update account_move_line set '+mode2+'=%f where id=%d', (result, line_id))
+ cr.execute('update account_move_line set '+mode2+'=%s where id=%s', (result, line_id))
return True
#
@@ -1625,7 +1625,7 @@ class account_config_wizard(osv.osv_memory):
mod_obj.write(cr , uid, [id] ,{'state' : 'to install'})
mod_obj.download(cr, uid, [id], context=context)
cr.commit()
- cr.execute("select m.id as id from ir_module_module_dependency d inner join ir_module_module m on (m.name=d.name) where d.module_id=%d and m.state='uninstalled'",(id,))
+ cr.execute("select m.id as id from ir_module_module_dependency d inner join ir_module_module m on (m.name=d.name) where d.module_id=%s and m.state='uninstalled'",(id,))
ret = cr.fetchall()
if len(ret):
for r in ret:
diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py
index 7981bac255e..603b77bc36b 100644
--- a/addons/account/account_analytic_line.py
+++ b/addons/account/account_analytic_line.py
@@ -82,7 +82,7 @@ class account_analytic_line(osv.osv):
def view_header_get(self, cr, user, view_id, view_type, context):
if context.get('account_id', False):
- cr.execute('select name from account_analytic_account where id=%d', (context['account_id'],))
+ cr.execute('select name from account_analytic_account where id=%s', (context['account_id'],))
res = cr.fetchone()
res = _('Entries: ')+ (res[0] or '')
return res
diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py
index a1d47dd027d..69afa0987fe 100644
--- a/addons/account/account_bank_statement.py
+++ b/addons/account/account_bank_statement.py
@@ -37,7 +37,7 @@ class account_bank_statement(osv.osv):
return False
def _default_balance_start(self, cr, uid, context={}):
- cr.execute('select id from account_bank_statement where journal_id=%d order by date desc limit 1', (1,))
+ cr.execute('select id from account_bank_statement where journal_id=%s order by date desc limit 1', (1,))
res = cr.fetchone()
if res:
return self.browse(cr, uid, [res[0]], context)[0].balance_end
@@ -313,7 +313,7 @@ class account_bank_statement(osv.osv):
cursor.execute('SELECT balance_end_real \
FROM account_bank_statement \
- WHERE journal_id = %d \
+ WHERE journal_id = %s \
ORDER BY date DESC,id DESC LIMIT 1', (journal_id,))
res = cursor.fetchone()
balance_start = res and res[0] or 0.0
@@ -513,8 +513,8 @@ class account_bank_statement_line(osv.osv):
cursor.execute('SELECT sum(debit-credit) \
FROM account_move_line \
WHERE (reconcile_id is null) \
- AND partner_id = %d \
- AND account_id=%d', (partner_id, account_id))
+ AND partner_id = %s \
+ AND account_id=%s', (partner_id, account_id))
res = cursor.fetchone()
balance = res and res[0] or 0.0
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index 453ec9e9067..d32e2c7b003 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -133,7 +133,7 @@ class account_move_line(osv.osv):
from \
account_move_line \
where \
- journal_id=%d and period_id=%d and create_uid=%d and state=%s \
+ journal_id=%s and period_id=%s and create_uid=%s and state=%s \
order by id desc limit 1',
(context['journal_id'], context['period_id'], uid, 'draft'))
res = cr.fetchone()
@@ -148,7 +148,7 @@ class account_move_line(osv.osv):
from \
account_move_line \
where \
- journal_id=%d and period_id=%d and create_uid=%d \
+ journal_id=%s and period_id=%s and create_uid=%s \
order by id desc',
(context['journal_id'], context['period_id'], uid))
res = cr.fetchone()
@@ -191,10 +191,7 @@ class account_move_line(osv.osv):
account = move.journal_id.default_debit_account_id
data['account_id'] = account.id
- if account and account.tax_ids:
- for tax in self.pool.get('account.tax').compute_inv(cr,uid,[account.tax_ids[0]],total,1.00):
- total -= tax['amount']
- data['account_tax_id'] = account.tax_ids[0].id
+
s = -total
data['debit'] = s>0 and s or 0.0
data['credit'] = s<0 and -s or 0.0
@@ -219,9 +216,9 @@ class account_move_line(osv.osv):
res={}
# TODO group the foreach in sql
for id in ids:
- cr.execute('SELECT date,account_id FROM account_move_line WHERE id=%d', (id,))
+ cr.execute('SELECT date,account_id FROM account_move_line WHERE id=%s', (id,))
dt, acc = cr.fetchone()
- cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE account_id=%d AND (date<%s OR (date=%s AND id<=%d))', (acc,dt,dt,id))
+ cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE account_id=%s AND (date<%s OR (date=%s AND id<=%s))', (acc,dt,dt,id))
res[id] = cr.fetchone()[0]
return res
@@ -284,11 +281,11 @@ class account_move_line(osv.osv):
elif (x[2] is False) and (x[1] == '<>' or x[1] == '!='):
qu1.append('(i.id IS NOT NULL)')
else:
- qu1.append('(i.id %s %s)' % (x[1], '%d'))
+ qu1.append('(i.id %s %s)' % (x[1], '%s'))
qu2.append(x[2])
elif x[1] == 'in':
if len(x[2]) > 0:
- qu1.append('(i.id in (%s))' % (','.join(['%d'] * len(x[2]))))
+ qu1.append('(i.id in (%s))' % (','.join(['%s'] * len(x[2]))))
qu2 += x[2]
else:
qu1.append(' (False)')
@@ -350,7 +347,7 @@ class account_move_line(osv.osv):
dt = time.strftime('%Y-%m-%d')
if ('journal_id' in context) and ('period_id' in context):
cr.execute('select date from account_move_line ' \
- 'where journal_id=%d and period_id=%d ' \
+ 'where journal_id=%s and period_id=%s ' \
'order by id desc limit 1',
(context['journal_id'], context['period_id']))
res = cr.fetchone()
@@ -436,13 +433,11 @@ class account_move_line(osv.osv):
date = now().strftime('%Y-%m-%d')
part = self.pool.get('res.partner').browse(cr, uid, partner_id)
- if part.property_payment_term and part.property_payment_term.line_ids:# Compute Maturity Date in val !
- line = part.property_payment_term.line_ids[0]
- next_date = mx.DateTime.strptime(date, '%Y-%m-%d') + RelativeDateTime(days=line.days)
- if line.condition == 'end of month':
- next_date += RelativeDateTime(day=-1)
- next_date = next_date.strftime('%Y-%m-%d')
- val['date_maturity'] = next_date
+ if part.property_payment_term and part.property_payment_term.line_ids:
+ payterm = part.property_payment_term.line_ids[0]
+ res = self.pool.get('account.payment.term').compute(cr, uid, payterm.id, 100, date)
+ if res:
+ val['date_maturity'] = res[0][0]
if not account_id:
id1 = part.property_account_payable.id
id2 = part.property_account_receivable.id
@@ -452,6 +447,16 @@ class account_move_line(osv.osv):
val['account_id'] = id2
elif jt=='purchase':
val['account_id'] = id1
+ if val['account_id']:
+ d = self.onchange_account_id(cr, uid, ids, val['account_id'])
+ val.update(d['value'])
+ return {'value':val}
+
+ def onchange_account_id(self, cr, uid, ids, account_id=False):
+ val = {}
+ if account_id:
+ tax_ids = self.pool.get('account.account').browse(cr, uid, account_id).tax_ids
+ val['account_tax_id'] = tax_ids and tax_ids[0].id or False
return {'value':val}
#
@@ -610,15 +615,15 @@ class account_move_line(osv.osv):
def view_header_get(self, cr, user, view_id, view_type, context):
if context.get('account_id', False):
- cr.execute('select code from account_account where id=%d', (context['account_id'],))
+ cr.execute('select code from account_account where id=%s', (context['account_id'],))
res = cr.fetchone()
res = _('Entries: ')+ (res[0] or '')
return res
if (not context.get('journal_id', False)) or (not context.get('period_id', False)):
return False
- cr.execute('select code from account_journal where id=%d', (context['journal_id'],))
+ cr.execute('select code from account_journal where id=%s', (context['journal_id'],))
j = cr.fetchone()[0] or ''
- cr.execute('select code from account_period where id=%d', (context['period_id'],))
+ cr.execute('select code from account_period where id=%s', (context['period_id'],))
p = cr.fetchone()[0] or ''
if j or p:
return j+(p and (':'+p) or '')
@@ -658,7 +663,7 @@ class account_move_line(osv.osv):
elif field.field=='account_tax_id':
attrs.append('domain="[(\'parent_id\',\'=\',False)]"')
elif field.field=='account_id' and journal.id:
- attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'<>\',\'view\'), (\'type\',\'<>\',\'closed\')]"')
+ attrs.append('domain="[(\'journal_id\', \'=\', '+str(journal.id)+'),(\'type\',\'<>\',\'view\'), (\'type\',\'<>\',\'closed\')]" on_change="onchange_account_id(account_id)"')
if field.readonly:
attrs.append('readonly="1"')
if field.required:
@@ -668,7 +673,7 @@ class account_move_line(osv.osv):
if field.field in ('amount_currency','currency_id'):
attrs.append('on_change="onchange_currency(account_id,amount_currency,currency_id,date,((\'journal_id\' in context) and context[\'journal_id\']) or {})"')
if field.field == 'partner_id':
- attrs.append('on_change="onchange_partner_id(move_id,partner_id,account_id,debit,credit,((\'journal_id\' in context) and context[\'journal_id\']) or {})"')
+ attrs.append('on_change="onchange_partner_id(move_id,partner_id,account_id,debit,credit,date,((\'journal_id\' in context) and context[\'journal_id\']) or {})"')
if field.field in widths:
attrs.append('width="'+str(widths[field.field])+'"')
xml += '''\n''' % (field.field,' '.join(attrs))
@@ -711,7 +716,7 @@ class account_move_line(osv.osv):
return result
def _update_journal_check(self, cr, uid, journal_id, period_id, context={}):
- cr.execute('select state from account_journal_period where journal_id=%d and period_id=%d', (journal_id, period_id))
+ cr.execute('select state from account_journal_period where journal_id=%s and period_id=%s', (journal_id, period_id))
result = cr.fetchall()
for (state,) in result:
if state=='done':
@@ -762,7 +767,7 @@ class account_move_line(osv.osv):
if not move_id:
if journal.centralisation:
# use the first move ever created for this journal and period
- cr.execute('select id, state, name from account_move where journal_id=%d and period_id=%d order by id limit 1', (context['journal_id'],context['period_id']))
+ cr.execute('select id, state, name from account_move where journal_id=%s and period_id=%s order by id limit 1', (context['journal_id'],context['period_id']))
res = cr.fetchone()
if res:
if res[1] != 'draft':
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index c73b829f14b..85a2d50f84b 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -134,7 +134,7 @@
- />
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index c57626d5720..96da3233651 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -33,7 +33,6 @@ from tools.translate import _
class account_invoice(osv.osv):
def _amount_all(self, cr, uid, ids, name, args, context={}):
res = {}
- print ids
for invoice in self.browse(cr,uid,ids, context=context):
res[invoice.id] = {
'amount_untaxed': 0.0,
@@ -117,9 +116,7 @@ class account_invoice(osv.osv):
def _get_invoice_line(self, cr, uid, ids, context={}):
result = {}
for line in self.pool.get('account.invoice.line').browse(cr, uid, ids, context=context):
- print '\t', line.invoice_id
result[line.invoice_id.id] = True
- print result
return result.keys()
def _get_invoice_tax(self, cr, uid, ids, context={}):
@@ -371,14 +368,14 @@ class account_invoice(osv.osv):
return False
ok = True
for id in res:
- cr.execute('select reconcile_id from account_move_line where id=%d', (id,))
+ cr.execute('select reconcile_id from account_move_line where id=%s', (id,))
ok = ok and bool(cr.fetchone()[0])
return ok
def button_reset_taxes(self, cr, uid, ids, context={}):
ait_obj = self.pool.get('account.invoice.tax')
for id in ids:
- cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%d", (id,))
+ cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,))
for taxe in ait_obj.compute(cr, uid, id).values():
ait_obj.create(cr, uid, taxe)
return True
@@ -664,13 +661,13 @@ class account_invoice(osv.osv):
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_invoice SET number=%s ' \
- 'WHERE id=%d', (number, id))
+ 'WHERE id=%s', (number, id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
- 'WHERE move_id=%d AND (ref is null OR ref = \'\')',
+ 'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
- 'WHERE account_move_line.move_id = %d ' \
+ 'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
return True
@@ -705,7 +702,7 @@ class account_invoice(osv.osv):
for inv in invs:
part=inv['partner_id'] and inv['partner_id'][0]
pc = pr = 0.0
- cr.execute('select sum(quantity*price_unit) from account_invoice_line where invoice_id=%d', (inv['id'],))
+ cr.execute('select sum(quantity*price_unit) from account_invoice_line where invoice_id=%s', (inv['id'],))
total = inv['amount_untaxed']
if inv['type'] in ('in_invoice','in_refund'):
partnertype='supplier'
@@ -1115,7 +1112,7 @@ class account_invoice_tax(osv.osv):
def move_line_get(self, cr, uid, invoice_id):
res = []
- cr.execute('SELECT * FROM account_invoice_tax WHERE invoice_id=%d', (invoice_id,))
+ cr.execute('SELECT * FROM account_invoice_tax WHERE invoice_id=%s', (invoice_id,))
for t in cr.dictfetchall():
if not t['amount'] \
and not t['tax_code_id'] \
diff --git a/addons/account/project/project.py b/addons/account/project/project.py
index 65433812843..338d243e2e7 100644
--- a/addons/account/project/project.py
+++ b/addons/account/project/project.py
@@ -222,7 +222,7 @@ class account_analytic_journal(osv.osv):
'name' : fields.char('Journal name', size=64, required=True),
'code' : fields.char('Journal code', size=8),
'active' : fields.boolean('Active'),
- 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When a document (eg: an invoice) needs to create analytic entries, Tiny ERP will look for a matching journal of the same type."),
+ 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When a document (eg: an invoice) needs to create analytic entries, Open ERP will look for a matching journal of the same type."),
'line_ids' : fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
}
_defaults = {
diff --git a/addons/account/project/report/account_journal.py b/addons/account/project/report/account_journal.py
index 77530e1a06b..d305547aa91 100644
--- a/addons/account/project/report/account_journal.py
+++ b/addons/account/project/report/account_journal.py
@@ -29,12 +29,12 @@ from report import report_sxw
#
class journal_print(report_sxw.rml_parse):
def lines(self, journal_id, *args):
- self.cr.execute('select id from account_analytic_line where journal_id=%d order by date,id', (journal_id,))
+ self.cr.execute('select id from account_analytic_line where journal_id=%s order by date,id', (journal_id,))
ids = map(lambda x: x[0], self.cr.fetchall())
res = self.pool.get('account.analytic.line').browse(self.cr, self.uid, ids)
return res
def _sum_lines(self, journal_id):
- self.cr.execute('select sum(amount) from account_analytic_line where journal_id=%d', (journal_id,))
+ self.cr.execute('select sum(amount) from account_analytic_line where journal_id=%s', (journal_id,))
return self.cr.fetchone()[0] or 0.0
def __init__(self, cr, uid, name, context):
super(journal_print, self).__init__(cr, uid, name, context)
diff --git a/addons/account/project/report/analytic_check.py b/addons/account/project/report/analytic_check.py
index 73df2b693cc..0c8a3b43cd3 100644
--- a/addons/account/project/report/analytic_check.py
+++ b/addons/account/project/report/analytic_check.py
@@ -49,19 +49,19 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code']):
self.cr.execute("SELECT sum(debit), sum(credit) \
FROM account_move_line \
- WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %d", (date1, date2, a['id']))
+ WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %s", (date1, date2, a['id']))
(gd, gc) = self.cr.fetchone()
gd = gd or 0.0
gc = gc or 0.0
self.cr.execute("SELECT abs(sum(amount)) AS balance \
FROM account_analytic_line \
- WHERE date>=%s AND date<=%s AND amount>0 AND general_account_id = %d", (date1, date2, a['id']))
+ WHERE date>=%s AND date<=%s AND amount>0 AND general_account_id = %s", (date1, date2, a['id']))
(ad,) = self.cr.fetchone()
ad = ad or 0.0
self.cr.execute("SELECT abs(sum(amount)) AS balance \
FROM account_analytic_line \
- WHERE date>=%s AND date<=%s AND amount<0 AND general_account_id = %d", (date1, date2, a['id']))
+ WHERE date>=%s AND date<=%s AND amount<0 AND general_account_id = %s", (date1, date2, a['id']))
(ac,) = self.cr.fetchone()
ac = ac or 0.0
@@ -85,19 +85,19 @@ class account_analytic_analytic_check(report_sxw.rml_parse):
# for a in acc_obj.read(self.cr, self.uid, self.ids, ['name', 'code','sign']):
# self.cr.execute("SELECT sum(debit), sum(credit) \
# FROM account_move_line \
-# WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %d", (date1, date2, a['id']))
+# WHERE date>=%s AND date<=%s AND state<>'draft' AND account_id = %s", (date1, date2, a['id']))
# (gd, gc) = self.cr.fetchone()
# gd = gd or 0.0
# gc = gc or 0.0
#
# self.cr.execute("SELECT abs(sum(amount)) AS balance \
# FROM account_analytic_line \
-# WHERE date>=%s AND date<=%s AND amount*%d>0 AND general_account_id = %d", (date1, date2, a['sign'], a['id']))
+# WHERE date>=%s AND date<=%s AND amount*%s>0 AND general_account_id = %s", (date1, date2, a['sign'], a['id']))
# (ad,) = self.cr.fetchone()
# ad = ad or 0.0
# self.cr.execute("SELECT abs(sum(amount)) AS balance \
# FROM account_analytic_line \
-# WHERE date>=%s AND date<=%s AND amount*%d<0 AND general_account_id = %d", (date1, date2, a['sign'], a['id']))
+# WHERE date>=%s AND date<=%s AND amount*%s<0 AND general_account_id = %s", (date1, date2, a['sign'], a['id']))
# (ac,) = self.cr.fetchone()
# ac = ac or 0.0
#
diff --git a/addons/account/project/report/analytic_journal.py b/addons/account/project/report/analytic_journal.py
index 4f2a116c10a..659852d3c2b 100644
--- a/addons/account/project/report/analytic_journal.py
+++ b/addons/account/project/report/analytic_journal.py
@@ -38,7 +38,7 @@ class account_analytic_journal(report_sxw.rml_parse):
})
def _lines(self, journal_id, date1, date2):
- self.cr.execute('SELECT DISTINCT move_id FROM account_analytic_line WHERE (date>=%s) AND (date<=%s) AND (journal_id=%d) AND (move_id is not null)', (date1, date2, journal_id,))
+ self.cr.execute('SELECT DISTINCT move_id FROM account_analytic_line WHERE (date>=%s) AND (date<=%s) AND (journal_id=%s) AND (move_id is not null)', (date1, date2, journal_id,))
ids = map(lambda x: x[0], self.cr.fetchall())
return self.pool.get('account.move.line').browse(self.cr, self.uid, ids)
@@ -49,11 +49,11 @@ class account_analytic_journal(report_sxw.rml_parse):
return self.pool.get('account.analytic.line').browse(self.cr, self.uid, ids)
def _sum_general(self, journal_id, date1, date2):
- self.cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE id IN (SELECT move_id FROM account_analytic_line WHERE (date>=%s) AND (date<=%s) AND (journal_id=%d) AND (move_id is not null))', (date1, date2, journal_id,))
+ self.cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE id IN (SELECT move_id FROM account_analytic_line WHERE (date>=%s) AND (date<=%s) AND (journal_id=%s) AND (move_id is not null))', (date1, date2, journal_id,))
return self.cr.fetchall()[0][0] or 0
def _sum_analytic(self, journal_id, date1, date2):
- self.cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE date>=%s AND date<=%s AND journal_id=%d", (date1, date2, journal_id))
+ self.cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE date>=%s AND date<=%s AND journal_id=%s", (date1, date2, journal_id))
res = self.cr.dictfetchone()
return res['sum'] or 0
diff --git a/addons/account/project/report/cost_ledger.py b/addons/account/project/report/cost_ledger.py
index 63acbc36e91..5cf7b89564c 100644
--- a/addons/account/project/report/cost_ledger.py
+++ b/addons/account/project/report/cost_ledger.py
@@ -42,7 +42,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
def _lines_g(self, account_id, date1, date2):
self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id \
FROM account_account AS aa, account_analytic_line AS aal \
- WHERE (aal.account_id=%d) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \
+ WHERE (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \
GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (account_id, date1, date2))
res = self.cr.dictfetchall()
@@ -60,7 +60,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
def _lines_a(self, general_account_id, account_id, date1, date2):
self.cr.execute("SELECT aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj FROM account_analytic_line AS aal, account_analytic_journal AS aaj \
- WHERE (aal.general_account_id=%d) AND (aal.account_id=%d) AND (aal.date>=%s) AND (aal.date<=%s) \
+ WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) \
AND (aal.journal_id=aaj.id) \
ORDER BY aal.date, aaj.code, aal.code", (general_account_id, account_id, date1, date2))
res = self.cr.dictfetchall()
@@ -78,11 +78,11 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
return res
def _account_sum_debit(self, account_id, date1, date2):
- self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id=%d AND date>=%s AND date<=%s AND amount>0", (account_id, date1, date2))
+ self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount>0", (account_id, date1, date2))
return self.cr.fetchone()[0] or 0.0
def _account_sum_credit(self, account_id, date1, date2):
- self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id=%d AND date>=%s AND date<=%s AND amount<0", (account_id, date1, date2))
+ self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount<0", (account_id, date1, date2))
return self.cr.fetchone()[0] or 0.0
def _account_sum_balance(self, account_id, date1, date2):
diff --git a/addons/account/project/report/inverted_analytic_balance.py b/addons/account/project/report/inverted_analytic_balance.py
index 22b2a37e81a..834c38232ff 100644
--- a/addons/account/project/report/inverted_analytic_balance.py
+++ b/addons/account/project/report/inverted_analytic_balance.py
@@ -61,7 +61,7 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
ids = map(lambda x: x.id, accounts)
self.cr.execute("SELECT sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity, aaa.code AS code, aaa.name AS name, account_id \
FROM account_analytic_line AS aal, account_analytic_account AS aaa \
- WHERE aal.account_id=aaa.id AND aal.account_id IN ("+','.join(map(str, ids))+") AND aal.general_account_id=%d AND aal.date>=%s AND aal.date<=%s \
+ WHERE aal.account_id=aaa.id AND aal.account_id IN ("+','.join(map(str, ids))+") AND aal.general_account_id=%s AND aal.date>=%s AND aal.date<=%s \
GROUP BY aal.account_id, general_account_id, aaa.code, aaa.name ORDER BY aal.account_id", (general_account_id, date1, date2))
res = self.cr.dictfetchall()
diff --git a/addons/account/project/report/quantity_cost_ledger.py b/addons/account/project/report/quantity_cost_ledger.py
index a97d30040fe..0d6241fa30f 100644
--- a/addons/account/project/report/quantity_cost_ledger.py
+++ b/addons/account/project/report/quantity_cost_ledger.py
@@ -41,7 +41,7 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
self.cr.execute("SELECT sum(aal.unit_amount) AS quantity, \
aa.code AS code, aa.name AS name, aa.id AS id \
FROM account_account AS aa, account_analytic_line AS aal \
- WHERE (aal.account_id=%d) AND (aal.date>=%s) \
+ WHERE (aal.account_id=%s) AND (aal.date>=%s) \
AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \
AND aa.active \
GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code",
@@ -51,7 +51,7 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
self.cr.execute("SELECT sum(aal.unit_amount) AS quantity, \
aa.code AS code, aa.name AS name, aa.id AS id \
FROM account_account AS aa, account_analytic_line AS aal \
- WHERE (aal.account_id=%d) AND (aal.date>=%s) \
+ WHERE (aal.account_id=%s) AND (aal.date>=%s) \
AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \
AND aa.active \
AND (aal.journal_id IN (" +
@@ -68,7 +68,7 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
aaj.code AS cj \
FROM account_analytic_line AS aal, \
account_analytic_journal AS aaj \
- WHERE (aal.general_account_id=%d) AND (aal.account_id=%d) \
+ WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \
AND (aal.date>=%s) AND (aal.date<=%s) \
AND (aal.journal_id=aaj.id) \
ORDER BY aal.date, aaj.code, aal.code",
@@ -80,7 +80,7 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
aaj.code AS cj \
FROM account_analytic_line AS aal, \
account_analytic_journal AS aaj \
- WHERE (aal.general_account_id=%d) AND (aal.account_id=%d) \
+ WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \
AND (aal.date>=%s) AND (aal.date<=%s) \
AND (aal.journal_id=aaj.id) AND (aaj.id IN (" +
','.join(map(str, journal_ids)) + ")) \
@@ -93,13 +93,13 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
if not journals or not journals[0][2]:
self.cr.execute("SELECT sum(unit_amount) \
FROM account_analytic_line \
- WHERE account_id=%d AND date>=%s AND date<=%s",
+ WHERE account_id=%s AND date>=%s AND date<=%s",
(account_id, date1, date2))
else:
journal_ids = journals[0][2]
self.cr.execute("SELECT sum(unit_amount) \
FROM account_analytic_line \
- WHERE account_id = %d AND date >= %s AND date <= %s \
+ WHERE account_id = %s AND date >= %s AND date <= %s \
AND journal_id IN (" +
','.join(map(str, journal_ids)) + ")",
(account_id, date1, date2))
diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py
index a0aef896250..85596741a3c 100755
--- a/addons/account/report/account_balance.py
+++ b/addons/account/report/account_balance.py
@@ -52,7 +52,7 @@ class account_balance(report_sxw.rml_parse):
fisc_id = form['fiscalyear']
if not (fisc_id):
return ''
- self.cr.execute("select name from account_fiscalyear where id = %d" %(int(fisc_id)))
+ self.cr.execute("select name from account_fiscalyear where id = %s" , (int(fisc_id),))
res=self.cr.fetchone()
return res and res[0] or ''
@@ -226,4 +226,4 @@ class account_balance(report_sxw.rml_parse):
def _sum_debit(self):
return self.sum_debit
-report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=False)
\ No newline at end of file
+report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=False)
diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py
index 38e410ca70d..06898020f08 100644
--- a/addons/account/report/account_journal.py
+++ b/addons/account/report/account_journal.py
@@ -44,9 +44,9 @@ class journal_print(report_sxw.rml_parse):
for period in period_id:
ids_journal_period = self.pool.get('account.journal.period').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=%d and period_id=%d and state=%s', ('printed',journal,period,'draft'))
+ 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=%d and journal_id=%d and state<>\'draft\' order by ('+ sort_selection +'),id', (period, journal))
+ 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)
line_ids = []
@@ -54,18 +54,18 @@ class journal_print(report_sxw.rml_parse):
a = self.pool.get('account.move.line').browse(self.cr, self.uid, line_id )
line_ids.append(a)
return line_ids
- self.cr.execute('update account_journal_period set state=%s where journal_id=%d and period_id=%d and state=%s', ('printed',journal_id,period_id,'draft'))
+ 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=%d and journal_id=%d and state<>\'draft\' order by date,id', (period_id, journal_id))
+ 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 self.pool.get('account.move.line').browse(self.cr, self.uid, ids )
def _sum_debit(self, period_id, journal_id):
- self.cr.execute('select sum(debit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id))
+ self.cr.execute('select sum(debit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
return self.cr.fetchone()[0] or 0.0
def _sum_credit(self, period_id, journal_id):
- self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id))
+ self.cr.execute('select sum(credit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
return self.cr.fetchone()[0] or 0.0
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print,header=False)
report_sxw.report_sxw('report.account.journal.period.print.wiz', 'account.journal.period', 'addons/account/report/wizard_account_journal.rml', parser=journal_print,header=False)
diff --git a/addons/account/report/aged_trial_balance.py b/addons/account/report/aged_trial_balance.py
index 8ffdb1b566b..0688c2a2274 100755
--- a/addons/account/report/aged_trial_balance.py
+++ b/addons/account/report/aged_trial_balance.py
@@ -66,7 +66,7 @@ class aged_trial_report(rml_parse.rml_parse):
"AND ((reconcile_id IS NULL) " \
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
"AND (line.partner_id=res_partner.id) " \
- "AND (account_account.company_id = %d) " \
+ "AND (account_account.company_id = %s) " \
"ORDER BY res_partner.name", (form['date1'],form['company_id']))
partners = self.cr.dictfetchall()
## mise a 0 du total
@@ -82,10 +82,10 @@ class aged_trial_report(rml_parse.rml_parse):
"FROM account_move_line AS line, account_account " \
"WHERE (line.account_id=account_account.id) " \
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
- "AND (COALESCE(date_maturity,date) < %s) AND (partner_id=%d) " \
+ "AND (COALESCE(date_maturity,date) < %s) AND (partner_id=%s) " \
"AND ((reconcile_id IS NULL) " \
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
- "AND (account_account.company_id = %d) " \
+ "AND (account_account.company_id = %s) " \
"AND account_account.active",
(form['date1'], partner['id'],form['date1'], form['company_id']))
before = self.cr.fetchone()
@@ -98,10 +98,10 @@ class aged_trial_report(rml_parse.rml_parse):
"FROM account_move_line AS line, account_account " \
"WHERE (line.account_id=account_account.id) " \
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
- "AND (COALESCE(date_maturity,date) > %s) AND (partner_id=%d) " \
+ "AND (COALESCE(date_maturity,date) > %s) AND (partner_id=%s) " \
"AND ((reconcile_id IS NULL) " \
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
- "AND (account_account.company_id = %d) " \
+ "AND (account_account.company_id = %s) " \
"AND account_account.active",
(form['date1'], partner['id'],form['date1'], form['company_id']))
after = self.cr.fetchone()
@@ -113,10 +113,10 @@ class aged_trial_report(rml_parse.rml_parse):
"WHERE (line.account_id=account_account.id) " \
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
"AND (COALESCE(date_maturity,date) BETWEEN %s AND %s) " \
- "AND (partner_id = %d) " \
+ "AND (partner_id = %s) " \
"AND ((reconcile_id IS NULL) " \
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
- "AND (account_account.company_id = %d) " \
+ "AND (account_account.company_id = %s) " \
"AND account_account.active",
(form[str(i)]['start'], form[str(i)]['stop'],partner['id'],form['date1'] ,form['company_id']))
during = self.cr.fetchone()
@@ -127,10 +127,10 @@ class aged_trial_report(rml_parse.rml_parse):
"FROM account_move_line AS line, account_account " \
"WHERE (line.account_id = account_account.id) " \
"AND (account_account.type IN " + self.ACCOUNT_TYPE + ") " \
- "AND (partner_id = %d) " \
+ "AND (partner_id = %s) " \
"AND ((reconcile_id IS NULL) " \
"OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s ))) " \
- "AND (account_account.company_id = %d) " \
+ "AND (account_account.company_id = %s) " \
"AND account_account.active",
(partner['id'],form['date1'],form['company_id']))
total = self.cr.fetchone()
diff --git a/addons/account/report/central_journal.py b/addons/account/report/central_journal.py
index 8b8932782b6..5ce24cef8be 100644
--- a/addons/account/report/central_journal.py
+++ b/addons/account/report/central_journal.py
@@ -43,22 +43,22 @@ class journal_print(report_sxw.rml_parse):
for period in period_id:
ids_journal_period = self.pool.get('account.journal.period').search(self.cr,self.uid, [('journal_id','=',journal),('period_id','=',period)])
if ids_journal_period:
- self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%d and l.journal_id=%d and l.state<>\'draft\' group by a.id, a.code, a.name, l.journal_id, l.period_id', (period, journal))
+ self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%s and l.journal_id=%s and l.state<>\'draft\' group by a.id, a.code, a.name, l.journal_id, l.period_id', (period, journal))
res = self.cr.dictfetchall()
a = {'journal':self.pool.get('account.journal').browse(self.cr, self.uid, journal),'period':self.pool.get('account.period').browse(self.cr, self.uid, period)}
res[0].update(a)
ids_final.append(res)
return ids_final
- self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%d and l.journal_id=%d and l.state<>\'draft\' group by a.id, a.code, a.name', (period_id, journal_id))
+ self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%s and l.journal_id=%s and l.state<>\'draft\' group by a.id, a.code, a.name', (period_id, journal_id))
res = self.cr.dictfetchall()
return res
def _sum_debit(self, period_id, journal_id):
- self.cr.execute('select sum(debit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id))
+ self.cr.execute('select sum(debit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
return self.cr.fetchone()[0] or 0.0
def _sum_credit(self, period_id, journal_id):
- self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id=%d and state<>\'draft\'', (period_id, journal_id))
+ self.cr.execute('select sum(credit) from account_move_line where period_id=%s and journal_id=%s and state<>\'draft\'', (period_id, journal_id))
return self.cr.fetchone()[0] or 0.0
report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/central_journal.rml',parser=journal_print, header=False)
report_sxw.report_sxw('report.account.central.journal.wiz', 'account.journal.period', 'addons/account/report/wizard_central_journal.rml',parser=journal_print, header=False)
diff --git a/addons/account/report/general_journal.py b/addons/account/report/general_journal.py
index 6894ccdc81c..0499fc064fb 100644
--- a/addons/account/report/general_journal.py
+++ b/addons/account/report/general_journal.py
@@ -75,7 +75,7 @@ class journal_print(report_sxw.rml_parse):
periods.append(data.period_id.id)
for period in periods:
period_data = self.pool.get('account.period').browse(self.cr, self.uid, period)
- self.cr.execute('select j.code, j.name, sum(l.debit) as debit, sum(l.credit) as credit from account_move_line l left join account_journal j on (l.journal_id=j.id) where period_id=%d and journal_id in (' + ','.join(map(str, journal_id)) + ') and l.state<>\'draft\' group by j.id, j.code, j.name', (period,))
+ self.cr.execute('select j.code, j.name, sum(l.debit) as debit, sum(l.credit) as credit from account_move_line l left join account_journal j on (l.journal_id=j.id) where period_id=%s and journal_id in (' + ','.join(map(str, journal_id)) + ') and l.state<>\'draft\' group by j.id, j.code, j.name', (period,))
res = self.cr.dictfetchall()
res[0].update({'period_name':period_data.name})
res[0].update({'pid':period})
@@ -83,27 +83,27 @@ class journal_print(report_sxw.rml_parse):
return lines_data
if not self.journal_ids:
return []
- self.cr.execute('select j.code, j.name, sum(l.debit) as debit, sum(l.credit) as credit from account_move_line l left join account_journal j on (l.journal_id=j.id) where period_id=%d and journal_id in (' + self.journal_ids + ') and l.state<>\'draft\' group by j.id, j.code, j.name', (period_id,))
+ self.cr.execute('select j.code, j.name, sum(l.debit) as debit, sum(l.credit) as credit from account_move_line l left join account_journal j on (l.journal_id=j.id) where period_id=%s and journal_id in (' + self.journal_ids + ') and l.state<>\'draft\' group by j.id, j.code, j.name', (period_id,))
res = self.cr.dictfetchall()
return res
def _sum_debit_period(self, period_id,journal_id=None):
if type(journal_id)==type([]):
- self.cr.execute('select sum(debit) from account_move_line where period_id=%d and journal_id in (' + ','.join(map(str, journal_id)) + ') and state<>\'draft\'', (period_id,))
+ self.cr.execute('select sum(debit) from account_move_line where period_id=%s and journal_id in (' + ','.join(map(str, journal_id)) + ') and state<>\'draft\'', (period_id,))
return self.cr.fetchone()[0] or 0.0
if not self.journal_ids:
return 0.0
- self.cr.execute('select sum(debit) from account_move_line where period_id=%d and journal_id in (' + self.journal_ids + ') and state<>\'draft\'', (period_id,))
+ self.cr.execute('select sum(debit) from account_move_line where period_id=%s and journal_id in (' + self.journal_ids + ') and state<>\'draft\'', (period_id,))
return self.cr.fetchone()[0] or 0.0
def _sum_credit_period(self, period_id,journal_id=None):
if type(journal_id)==type([]):
- self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id in (' + ','.join(map(str, journal_id)) + ') and state<>\'draft\'', (period_id,))
+ self.cr.execute('select sum(credit) from account_move_line where period_id=%s and journal_id in (' + ','.join(map(str, journal_id)) + ') and state<>\'draft\'', (period_id,))
return self.cr.fetchone()[0] or 0.0
if not self.journal_ids:
return 0.0
- self.cr.execute('select sum(credit) from account_move_line where period_id=%d and journal_id in (' + self.journal_ids + ') and state<>\'draft\'', (period_id,))
+ self.cr.execute('select sum(credit) from account_move_line where period_id=%s and journal_id in (' + self.journal_ids + ') and state<>\'draft\'', (period_id,))
return self.cr.fetchone()[0] or 0.0
def _sum_debit(self,period_id=None,journal_id=None):
diff --git a/addons/account/report/general_ledger.py b/addons/account/report/general_ledger.py
index aef67140939..64ee26229f8 100755
--- a/addons/account/report/general_ledger.py
+++ b/addons/account/report/general_ledger.py
@@ -289,13 +289,13 @@ class general_ledger(rml_parse.rml_parse):
FROM account_move_line as l
LEFT JOIN res_currency c on (l.currency_id=c.id)
JOIN account_journal j on (l.journal_id=j.id)
- AND account_id = %d
+ AND account_id = %%s
AND %s
- WHERE l.date<='%s'
- AND l.date>='%s'
- ORDER by %s"""%(account.id,self.query,self.date_borne['max_date'],self.date_borne['min_date'],sorttag)
+ WHERE l.date<=%%s
+ AND l.date>=%%s
+ ORDER by %s""" % (self.query, sorttag)
- self.cr.execute(sql)
+ self.cr.execute(sql, (account.id, self.date_borne['max_date'], self.date_borne['min_date'],))
res = self.cr.dictfetchall()
@@ -415,7 +415,7 @@ class general_ledger(rml_parse.rml_parse):
def _sum_currency_amount_account(self, account, form):
self._set_get_account_currency_code(account.id)
- self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %d "%account.id)
+ self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
total = self.cr.fetchone()
if self.account_currency:
diff --git a/addons/account/report/general_ledger_landscape.py b/addons/account/report/general_ledger_landscape.py
index 6fd2eafae76..4dc1060ab1e 100755
--- a/addons/account/report/general_ledger_landscape.py
+++ b/addons/account/report/general_ledger_landscape.py
@@ -273,13 +273,13 @@ class general_ledger_landscape(rml_parse.rml_parse):
FROM account_move_line as l
LEFT JOIN res_currency c on (l.currency_id=c.id)
JOIN account_journal j on (l.journal_id=j.id)
- AND account_id = %d
+ AND account_id = %%s
AND %s
- WHERE l.date<='%s'
- AND l.date>='%s'
- ORDER by %s"""%(account.id,self.query,self.date_borne['max_date'],self.date_borne['min_date'],sorttag)
+ WHERE l.date<=%%s
+ AND l.date>=%%s
+ ORDER by %s""" % (self.query, sorttag)
- self.cr.execute(sql)
+ self.cr.execute(sql, (account.id, self.date_borne['max_date'], self.date_borne['min_date'],))
res = self.cr.dictfetchall()
sum = 0.0
@@ -395,7 +395,7 @@ class general_ledger_landscape(rml_parse.rml_parse):
def _sum_currency_amount_account(self, account, form):
self._set_get_account_currency_code(account.id)
- self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %d "%account.id)
+ self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,))
total = self.cr.fetchone()
if self.account_currency:
diff --git a/addons/account/report/partner_balance.py b/addons/account/report/partner_balance.py
index 0e286d61805..29e8b791a0e 100644
--- a/addons/account/report/partner_balance.py
+++ b/addons/account/report/partner_balance.py
@@ -191,7 +191,7 @@ class partner_balance(report_sxw.rml_parse):
"FROM account_account a " \
"LEFT JOIN account_account_type t " \
"ON (a.type = t.code) " \
- "WHERE a.company_id = %d " \
+ "WHERE a.company_id = %s " \
"AND a.type IN " + self.ACCOUNT_TYPE + " " \
"AND a.active", (data['form']['company_id'],))
self.account_ids = ','.join([str(a) for (a,) in self.cr.fetchall()])
@@ -264,7 +264,6 @@ class partner_balance(report_sxw.rml_parse):
"GROUP BY p.id, p.ref, p.name,l.account_id,ac.name,ac.code " \
"ORDER BY l.account_id,p.name")
res = self.cr.dictfetchall()
- print "============ res",res
for r in res:
full_account.append(r)
@@ -368,8 +367,6 @@ class partner_balance(report_sxw.rml_parse):
#
r['balance'] = float(r['sdebit']) - float(r['scredit'])
- #
- print "=========r",r
completearray.append(r)
if cleanarray[i]['account_id'] == cleanarray[i-1]['account_id']:
diff --git a/addons/account/report/tax_report.py b/addons/account/report/tax_report.py
index 50d85247351..e5ed33d84b8 100755
--- a/addons/account/report/tax_report.py
+++ b/addons/account/report/tax_report.py
@@ -111,9 +111,9 @@ class tax_report(rml_parse.rml_parse):
LEFT JOIN account_invoice invoice ON \
(invoice.move_id = move.id) \
WHERE line.state<>%s \
- AND line.tax_code_id = %d \
+ AND line.tax_code_id = %s \
AND line.account_id = account.id \
- AND account.company_id = %d \
+ AND account.company_id = %s \
AND move.id = line.move_id \
AND ((invoice.state = %s) \
OR (invoice.id IS NULL)) \
@@ -131,9 +131,9 @@ class tax_report(rml_parse.rml_parse):
FROM account_move_line AS line, \
account_account AS account \
WHERE line.state <> %s \
- AND line.tax_code_id = %d \
+ AND line.tax_code_id = %s \
AND line.account_id = account.id \
- AND account.company_id = %d \
+ AND account.company_id = %s \
AND account.active \
GROUP BY account.id,account.name,account.code', ('draft',tax_code_id,
company_id))
diff --git a/addons/account/report/third_party_ledger.py b/addons/account/report/third_party_ledger.py
index 5c8132082d9..7fb908e2053 100755
--- a/addons/account/report/third_party_ledger.py
+++ b/addons/account/report/third_party_ledger.py
@@ -175,7 +175,7 @@ class third_party_ledger(rml_parse.rml_parse):
"FROM account_account a " \
"LEFT JOIN account_account_type t " \
"ON (a.type=t.code) " \
- "WHERE a.company_id = %d " \
+ "WHERE a.company_id = %s " \
'AND a.type IN ' + self.ACCOUNT_TYPE + " " \
"AND a.active", (data['form']['company_id'],))
self.account_ids = ','.join([str(a) for (a,) in self.cr.fetchall()])
@@ -195,7 +195,7 @@ class third_party_ledger(rml_parse.rml_parse):
"AND line.reconcile_id IS NULL " \
"AND line.account_id IN (" + self.account_ids + ") " \
" " + PARTNER_REQUEST + " " \
- "AND account.company_id = %d " \
+ "AND account.company_id = %s " \
"AND account.active " ,
(self.date_lst[0],self.date_lst[len(self.date_lst)-1],data['form']['company_id']))
# else:
@@ -208,7 +208,7 @@ class third_party_ledger(rml_parse.rml_parse):
# "AND line.date IN (" + self.date_lst_string + ") " \
# "AND line.account_id IN (" + self.account_ids + ") " \
# " " + PARTNER_REQUEST + " " \
-# "AND account.company_id = %d " \
+# "AND account.company_id = %s " \
# "AND account.active " ,
# (data['form']['company_id']))
@@ -236,7 +236,7 @@ class third_party_ledger(rml_parse.rml_parse):
# "FROM account_move_line l " \
# "LEFT JOIN account_journal j " \
# "ON (l.journal_id = j.id) " \
-# "WHERE l.partner_id = %d " \
+# "WHERE l.partner_id = %s " \
# "AND l.account_id IN (" + self.account_ids + ") " \
# "AND l.date <= %s " \
# "AND l.reconcile_id IS NULL "
@@ -255,7 +255,7 @@ class third_party_ledger(rml_parse.rml_parse):
"FROM account_move_line l " \
"LEFT JOIN account_journal j " \
"ON (l.journal_id = j.id) " \
- "WHERE l.partner_id = %d " \
+ "WHERE l.partner_id = %s " \
"AND l.account_id IN (" + self.account_ids + ") " \
"AND l.date IN (" + self.date_lst_string + ") " \
" " + RECONCILE_TAG + " "\
@@ -283,7 +283,7 @@ class third_party_ledger(rml_parse.rml_parse):
self.cr.execute(
"SELECT sum(debit) " \
"FROM account_move_line " \
- "WHERE partner_id = %d " \
+ "WHERE partner_id = %s " \
"AND account_id IN (" + self.account_ids + ") " \
"AND reconcile_id IS NULL " \
"AND date < %s " ,
@@ -298,7 +298,7 @@ class third_party_ledger(rml_parse.rml_parse):
self.cr.execute(
"SELECT sum(debit) " \
"FROM account_move_line " \
- "WHERE partner_id = %d " \
+ "WHERE partner_id = %s " \
"AND account_id IN (" + self.account_ids + ") " \
" " + RECONCILE_TAG + " " \
"AND date IN (" + self.date_lst_string + ") " ,
@@ -322,7 +322,7 @@ class third_party_ledger(rml_parse.rml_parse):
self.cr.execute(
"SELECT sum(credit) " \
"FROM account_move_line " \
- "WHERE partner_id=%d " \
+ "WHERE partner_id=%s " \
"AND account_id IN (" + self.account_ids + ") " \
"AND reconcile_id IS NULL " \
"AND date < %s " ,
@@ -336,7 +336,7 @@ class third_party_ledger(rml_parse.rml_parse):
self.cr.execute(
"SELECT sum(credit) " \
"FROM account_move_line " \
- "WHERE partner_id=%d " \
+ "WHERE partner_id=%s " \
"AND account_id IN (" + self.account_ids + ") " \
" " + RECONCILE_TAG + " " \
"AND date IN (" + self.date_lst_string + ") " ,
diff --git a/addons/account/wizard/wizard_automatic_reconcile.py b/addons/account/wizard/wizard_automatic_reconcile.py
index df191fb91b2..7c04c963552 100644
--- a/addons/account/wizard/wizard_automatic_reconcile.py
+++ b/addons/account/wizard/wizard_automatic_reconcile.py
@@ -226,11 +226,11 @@ def _reconcile(self, cr, uid, data, context):
cr.execute(
"SELECT partner_id " \
"FROM account_move_line " \
- "WHERE account_id=%d " \
+ "WHERE account_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
"GROUP BY partner_id " \
- "HAVING ABS(SUM(debit-credit)) < %f AND count(*)>0",
+ "HAVING ABS(SUM(debit-credit)) < %s AND count(*)>0",
(account_id, max_amount))
partner_ids = [id for (id,) in cr.fetchall()]
@@ -238,8 +238,8 @@ def _reconcile(self, cr, uid, data, context):
cr.execute(
"SELECT id " \
"FROM account_move_line " \
- "WHERE account_id=%d " \
- "AND partner_id=%d " \
+ "WHERE account_id=%s " \
+ "AND partner_id=%s " \
"AND state <> 'draft' " \
"AND reconcile_id IS NULL",
(account_id, partner_id))
@@ -253,7 +253,7 @@ def _reconcile(self, cr, uid, data, context):
cr.execute(
"SELECT partner_id " \
"FROM account_move_line " \
- "WHERE account_id=%d " \
+ "WHERE account_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
"AND partner_id IS NOT NULL " \
@@ -267,8 +267,8 @@ def _reconcile(self, cr, uid, data, context):
cr.execute(
"SELECT id, debit " \
"FROM account_move_line " \
- "WHERE account_id=%d " \
- "AND partner_id=%d " \
+ "WHERE account_id=%s " \
+ "AND partner_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
"AND debit > 0",
@@ -279,8 +279,8 @@ def _reconcile(self, cr, uid, data, context):
cr.execute(
"SELECT id, credit " \
"FROM account_move_line " \
- "WHERE account_id=%d " \
- "AND partner_id=%d " \
+ "WHERE account_id=%s " \
+ "AND partner_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " \
"AND credit > 0",
@@ -297,7 +297,7 @@ def _reconcile(self, cr, uid, data, context):
cr.execute(
"SELECT count(*) " \
"FROM account_move_line " \
- "WHERE account_id=%d " \
+ "WHERE account_id=%s " \
"AND reconcile_id IS NULL " \
"AND state <> 'draft' " + partner_filter,
(account_id,))
diff --git a/addons/account/wizard/wizard_bank_reconcile.py b/addons/account/wizard/wizard_bank_reconcile.py
index 0c80ed5a7fb..2fc1bd63c61 100644
--- a/addons/account/wizard/wizard_bank_reconcile.py
+++ b/addons/account/wizard/wizard_bank_reconcile.py
@@ -34,7 +34,7 @@ _journal_fields = {
def _action_open_window(self, cr, uid, data, context):
form = data['form']
- cr.execute('select default_credit_account_id from account_journal where id=%d', (form['journal_id'],))
+ cr.execute('select default_credit_account_id from account_journal where id=%s', (form['journal_id'],))
account_id = cr.fetchone()[0]
if not account_id:
raise Exception, _('You have to define the bank account\nin the journal definition for reconciliation.')
diff --git a/addons/account/wizard/wizard_fiscalyear_close.py b/addons/account/wizard/wizard_fiscalyear_close.py
index 250f2363d3b..f6f47a1d1ae 100644
--- a/addons/account/wizard/wizard_fiscalyear_close.py
+++ b/addons/account/wizard/wizard_fiscalyear_close.py
@@ -106,11 +106,11 @@ def _data_save(self, cr, uid, data, context):
'amount_currency, currency_id, blocked, partner_id, ' \
'date_maturity, date_created ' \
'FROM account_move_line ' \
- 'WHERE account_id = %d ' \
+ 'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'AND reconcile_id is NULL ' \
'ORDER BY id ' \
- 'LIMIT %d OFFSET %d', (account.id, limit, offset))
+ 'LIMIT %s OFFSET %s', (account.id, limit, offset))
result = cr.dictfetchall()
if not result:
break
@@ -136,10 +136,10 @@ def _data_save(self, cr, uid, data, context):
'amount_currency, currency_id, blocked, partner_id, ' \
'date_maturity, date_created ' \
'FROM account_move_line ' \
- 'WHERE account_id = %d ' \
+ 'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \
'ORDER BY id ' \
- 'LIMIT %d OFFSET %d', (account.id,fy_id, limit, offset))
+ 'LIMIT %s OFFSET %s', (account.id,fy_id, limit, offset))
result = cr.dictfetchall()
if not result:
break
@@ -157,13 +157,13 @@ def _data_save(self, cr, uid, data, context):
cr.execute('UPDATE account_journal_period ' \
'SET state = %s ' \
- 'WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %d)',
+ 'WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %s)',
('done',fy_id))
cr.execute('UPDATE account_period SET state = %s ' \
- 'WHERE fiscalyear_id = %d', ('done',fy_id))
+ 'WHERE fiscalyear_id = %s', ('done',fy_id))
cr.execute('UPDATE account_fiscalyear ' \
- 'SET state = %s, end_journal_period_id = %d' \
- 'WHERE id = %d', ('done',start_jp,fy_id))
+ 'SET state = %s, end_journal_period_id = %s' \
+ 'WHERE id = %s', ('done',start_jp,fy_id))
return {}
class wiz_journal_close(wizard.interface):
diff --git a/addons/account/wizard/wizard_journal_select.py b/addons/account/wizard/wizard_journal_select.py
index 0bc9b7dc5ad..74f4a597a1e 100644
--- a/addons/account/wizard/wizard_journal_select.py
+++ b/addons/account/wizard/wizard_journal_select.py
@@ -31,7 +31,7 @@ def _action_open_window(self, cr, uid, data, context):
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
result = act_obj.read(cr, uid, [id])[0]
- cr.execute('select journal_id,period_id from account_journal_period where id=%d', (data['id'],))
+ cr.execute('select journal_id,period_id from account_journal_period where id=%s', (data['id'],))
journal_id,period_id = cr.fetchone()
result['domain'] = str([('journal_id', '=', journal_id), ('period_id', '=', period_id)])
diff --git a/addons/account/wizard/wizard_open_closed_fiscalyear.py b/addons/account/wizard/wizard_open_closed_fiscalyear.py
index 5f284b3a7ba..ca484cf03ba 100644
--- a/addons/account/wizard/wizard_open_closed_fiscalyear.py
+++ b/addons/account/wizard/wizard_open_closed_fiscalyear.py
@@ -47,13 +47,13 @@ def _remove_entries(self, cr, uid, data, context):
pool.get('account.move').unlink(cr,uid,ids_move)
cr.execute('UPDATE account_journal_period ' \
'SET state = %s ' \
- 'WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %d)',
+ 'WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %s)',
('draft',data_fyear))
cr.execute('UPDATE account_period SET state = %s ' \
- 'WHERE fiscalyear_id = %d', ('draft',data_fyear))
+ 'WHERE fiscalyear_id = %s', ('draft',data_fyear))
cr.execute('UPDATE account_fiscalyear ' \
'SET state = %s, end_journal_period_id = null '\
- 'WHERE id = %d', ('draft',data_fyear))
+ 'WHERE id = %s', ('draft',data_fyear))
return {}
class open_closed_fiscal(wizard.interface):
diff --git a/addons/account/wizard/wizard_period_close.py b/addons/account/wizard/wizard_period_close.py
index 589043a8821..297b271e423 100644
--- a/addons/account/wizard/wizard_period_close.py
+++ b/addons/account/wizard/wizard_period_close.py
@@ -36,8 +36,8 @@ def _data_save(self, cr, uid, data, context):
mode = 'done'
if data['form']['sure']:
for id in data['ids']:
- cr.execute('update account_journal_period set state=%s where period_id=%d', (mode, id))
- cr.execute('update account_period set state=%s where id=%d', (mode, id))
+ cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
+ cr.execute('update account_period set state=%s where id=%s', (mode, id))
return {}
class wiz_journal_close(wizard.interface):
diff --git a/addons/account_analytic_default/__terp__.py b/addons/account_analytic_default/__terp__.py
index e2944cabec0..10199286f44 100644
--- a/addons/account_analytic_default/__terp__.py
+++ b/addons/account_analytic_default/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Account Analytic Default",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"description": """
Allows to automatically select analytic accounts based on criterions:
diff --git a/addons/account_analytic_plans/__terp__.py b/addons/account_analytic_plans/__terp__.py
index b859645cd0a..3ae2d3ed252 100644
--- a/addons/account_analytic_plans/__terp__.py
+++ b/addons/account_analytic_plans/__terp__.py
@@ -52,7 +52,7 @@ Plan2:
So when this line of invoice will be confirmed, it will generate 3 analytic lines,
for one account entry.
""",
- "website" : "http://tinyerp.com/module_account.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [
],
diff --git a/addons/account_balance/__terp__.py b/addons/account_balance/__terp__.py
index 563c03b462f..c9d39375feb 100644
--- a/addons/account_balance/__terp__.py
+++ b/addons/account_balance/__terp__.py
@@ -38,7 +38,7 @@
5. You have an option to print the desired report in Landscape format.
""",
- "website" : "http://tinyerp.com/account_balance.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [
],
diff --git a/addons/account_budget/__terp__.py b/addons/account_budget/__terp__.py
index 5f946b91fa5..88a66c88e79 100644
--- a/addons/account_budget/__terp__.py
+++ b/addons/account_budget/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Budget Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_crossovered_budget.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"description": """This module allow accountants to manage analytic and crossovered budgets.
diff --git a/addons/account_budget/crossovered_budget.py b/addons/account_budget/crossovered_budget.py
index 60ca40411ea..c8ebaccf49b 100644
--- a/addons/account_budget/crossovered_budget.py
+++ b/addons/account_budget/crossovered_budget.py
@@ -168,7 +168,7 @@ class crossovered_budget_lines(osv.osv):
date_from = context['wizard_date_from']
if context.has_key('wizard_date_to'):
date_to = context['wizard_date_to']
- cr.execute("select sum(amount) from account_analytic_line where account_id=%d and (date between to_date('%s','yyyy-mm-dd') and to_date('%s','yyyy-mm-dd')) and general_account_id in (%s)"%(line.analytic_account_id.id,date_from,date_to,acc_ids))
+ cr.execute("select sum(amount) from account_analytic_line where account_id=%s and (date between to_date('%s','yyyy-mm-dd') and to_date('%s','yyyy-mm-dd')) and general_account_id in (%s)", (line.analytic_account_id.id,date_from,date_to,acc_ids))
result=cr.fetchone()[0]
if result==None:
result=0.00
diff --git a/addons/account_budget/report/budget_report.py b/addons/account_budget/report/budget_report.py
index 8728ce449e2..da9d3776676 100644
--- a/addons/account_budget/report/budget_report.py
+++ b/addons/account_budget/report/budget_report.py
@@ -61,7 +61,7 @@ class budget_report(report_sxw.rml_parse):
def lines(self, post_obj, date1, date2):
res = []
for a in post_obj.account_ids:
- self.cr.execute("SELECT COALESCE(SUM(debit-credit), 0) FROM account_move_line WHERE account_id=%d AND date>=%s AND date<=%s and state<>'draft'", (a.id, date1, date2))
+ self.cr.execute("SELECT COALESCE(SUM(debit-credit), 0) FROM account_move_line WHERE account_id=%s AND date>=%s AND date<=%s and state<>'draft'", (a.id, date1, date2))
achievements = float(self.cr.fetchone()[0])
res.append({'name': a.name, 'code': a.code, 'achievements': achievements})
return res
diff --git a/addons/account_chart/__terp__.py b/addons/account_chart/__terp__.py
index 0a57e69d969..f9bb8cd7cef 100644
--- a/addons/account_chart/__terp__.py
+++ b/addons/account_chart/__terp__.py
@@ -25,7 +25,7 @@
"depends" : ["account"],
"author" : "Tiny",
"description": """Remove minimal account chart""",
- "website" : "http://tinyerp.com/module_account.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [
],
diff --git a/addons/account_date_check/__terp__.py b/addons/account_date_check/__terp__.py
index dab5404d331..798beef64ee 100644
--- a/addons/account_date_check/__terp__.py
+++ b/addons/account_date_check/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Account Date check",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["account"],
"category" : "Generic Modules/Accounting",
"init_xml" : [],
diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py
index 0d4a144e7bc..2d86403b13b 100644
--- a/addons/account_followup/__terp__.py
+++ b/addons/account_followup/__terp__.py
@@ -37,7 +37,7 @@
It will generate a PDF with all the letters according the the
different levels of recall defined. You can define different policies
for different companies.""",
- "website" : "http://tinyerp.com/module_account.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [],
"demo_xml" : ["followup_demo.xml"],
diff --git a/addons/account_followup/wizard/wizard_followup_print.py b/addons/account_followup/wizard/wizard_followup_print.py
index cf3e2cdb409..d1ee95a00b4 100644
--- a/addons/account_followup/wizard/wizard_followup_print.py
+++ b/addons/account_followup/wizard/wizard_followup_print.py
@@ -129,8 +129,8 @@ class followup_all_print(wizard.interface):
for id in to_update.keys():
cr.execute(
"UPDATE account_move_line "\
- "SET followup_line_id=%d, followup_date=%s "\
- "WHERE id=%d",
+ "SET followup_line_id=%s, followup_date=%s "\
+ "WHERE id=%s",
(to_update[id],
data['form']['date'], int(id),))
return {}
@@ -230,7 +230,7 @@ class followup_all_print(wizard.interface):
cr.execute(
"SELECT * "\
"FROM account_followup_followup_line "\
- "WHERE followup_id=%d "\
+ "WHERE followup_id=%s "\
"ORDER BY sequence", (fup_id,))
for result in cr.dictfetchall():
delay = datetime.timedelta(days=result['delay'])
diff --git a/addons/account_invoice_layout/__terp__.py b/addons/account_invoice_layout/__terp__.py
index 0fccef7fa1c..4dd31cc1d07 100644
--- a/addons/account_invoice_layout/__terp__.py
+++ b/addons/account_invoice_layout/__terp__.py
@@ -35,7 +35,7 @@
Moreover, there is one option which allow you to print all the selected invoices with a given special message at the bottom of it. This feature can be very useful for printing your invoices with end-of-year wishes, special punctual conditions...
""",
- "website" : "http://tinyerp.com/",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Projects & Services",
"init_xml" : [],
"demo_xml" : [],
diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.py b/addons/account_invoice_layout/report/report_account_invoice_layout.py
index f1f745d0579..1909d1de6a0 100644
--- a/addons/account_invoice_layout/report/report_account_invoice_layout.py
+++ b/addons/account_invoice_layout/report/report_account_invoice_layout.py
@@ -118,7 +118,7 @@ class account_invoice_1(report_sxw.rml_parse):
res={}
if entry.state=='article':
- self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%d'%(entry.id))
+ self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,))
tax_ids=self.cr.fetchall()
if tax_ids==[]:
@@ -126,7 +126,7 @@ class account_invoice_1(report_sxw.rml_parse):
else:
tax_names_dict={}
for item in range(0,len(tax_ids)) :
- self.cr.execute('select name from account_tax where id=%d'%(tax_ids[item][0]))
+ self.cr.execute('select name from account_tax where id=%s', (tax_ids[item][0],))
type=self.cr.fetchone()
tax_names_dict[item] =type[0]
tax_names = ','.join([tax_names_dict[x] for x in range(0,len(tax_names_dict))])
diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py
index f9129d412e8..e7aa4cdb727 100644
--- a/addons/account_invoice_layout/report/special_message_invoice.py
+++ b/addons/account_invoice_layout/report/special_message_invoice.py
@@ -124,7 +124,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
res={}
if entry.state=='article':
- self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%d'%(entry.id))
+ self.cr.execute('select tax_id from account_invoice_line_tax where invoice_line_id=%s', (entry.id,))
tax_ids=self.cr.fetchall()
if tax_ids==[]:
@@ -132,7 +132,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
else:
tax_names_dict={}
for item in range(0,len(tax_ids)) :
- self.cr.execute('select name from account_tax where id=%d'%(tax_ids[item][0]))
+ self.cr.execute('select name from account_tax where id=%s', (tax_ids[item][0],))
type=self.cr.fetchone()
tax_names_dict[item] =type[0]
tax_names = ','.join([tax_names_dict[x] for x in range(0,len(tax_names_dict))])
diff --git a/addons/account_report/__terp__.py b/addons/account_report/__terp__.py
index db2688eb269..5425d518b6f 100644
--- a/addons/account_report/__terp__.py
+++ b/addons/account_report/__terp__.py
@@ -25,7 +25,7 @@
"depends" : ["account"],
"author" : "Tiny",
"description": """Financial and accounting reporting""",
- "website" : "http://tinyerp.com/module_account.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [ ],
"demo_xml" : [ ],
diff --git a/addons/account_tax_include/__terp__.py b/addons/account_tax_include/__terp__.py
index 96fbcf50a1b..5863caafd23 100644
--- a/addons/account_tax_include/__terp__.py
+++ b/addons/account_tax_include/__terp__.py
@@ -29,7 +29,7 @@ Especially useful for b2c businesses.
This module implement the modification on the invoice form.
""",
- "website" : "http://tinyerp.com/module_account.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Accounting",
"init_xml" : [ ],
"demo_xml" : [ ],
diff --git a/addons/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py
index 9696cc5c65c..867711e5fe4 100755
--- a/addons/account_voucher/__terp__.py
+++ b/addons/account_voucher/__terp__.py
@@ -34,7 +34,7 @@ Basic Accounting, plus new things which available are:
* Accounting Periods
""",
"category" : "Generic Modules/Accounting",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["base", "account"],
"init_xml" : [
],
diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py
index 10b3862f3c8..9c584d49c11 100755
--- a/addons/account_voucher/voucher.py
+++ b/addons/account_voucher/voucher.py
@@ -299,7 +299,7 @@ class account_voucher(osv.osv):
self.write(cr, uid, [inv.id], {'move_id': move_id})
obj=self.pool.get('account.move').browse(cr,uid,move_id)
for line in obj.line_id :
- cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id)))
+ cr.execute('insert into voucher_id (account_id,rel_account_move) values (%s, %s)',(int(ids[0]),int(line.id)))
return True
@@ -337,13 +337,13 @@ class account_voucher(osv.osv):
else:
ref = self._convert_ref(cr, uid, number)
cr.execute('UPDATE account_voucher SET number=%s ' \
- 'WHERE id=%d', (number, id))
+ 'WHERE id=%s', (number, id))
cr.execute('UPDATE account_move_line SET ref=%s ' \
- 'WHERE move_id=%d AND (ref is null OR ref = \'\')',
+ 'WHERE move_id=%s AND (ref is null OR ref = \'\')',
(ref, move_id))
cr.execute('UPDATE account_analytic_line SET ref=%s ' \
'FROM account_move_line ' \
- 'WHERE account_move_line.move_id = %d ' \
+ 'WHERE account_move_line.move_id = %s ' \
'AND account_analytic_line.move_id = account_move_line.id',
(ref, move_id))
return True
diff --git a/addons/analytic_journal_billing_rate/__terp__.py b/addons/analytic_journal_billing_rate/__terp__.py
index 83d0bf1d0a3..91d31892b7f 100644
--- a/addons/analytic_journal_billing_rate/__terp__.py
+++ b/addons/analytic_journal_billing_rate/__terp__.py
@@ -31,7 +31,7 @@
Obviously if no data has been recorded for the current account, the default value is given as usual by the account data so that this module is perfectly compatible with older configurations.
""",
- "website" : "http://tinyerp.com/",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Others",
"init_xml" : [],
"demo_xml" : [],
diff --git a/addons/analytic_user_function/__terp__.py b/addons/analytic_user_function/__terp__.py
index f68543b29a5..9c57b7dc8d2 100644
--- a/addons/analytic_user_function/__terp__.py
+++ b/addons/analytic_user_function/__terp__.py
@@ -31,7 +31,7 @@
Obviously if no data has been recorded for the current account, the default value is given as usual by the employee data so that this module is perfectly compatible with older configurations.
""",
- "website" : "http://tinyerp.com/",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Others",
"init_xml" : [],
"demo_xml" : [],
diff --git a/addons/auction/auction.py b/addons/auction/auction.py
index 535830c09fd..bcf781f9e83 100644
--- a/addons/auction/auction.py
+++ b/addons/auction/auction.py
@@ -49,7 +49,7 @@ class auction_dates(osv.osv):
tmp={}
for id in ids:
tmp[id]=0.0
- cr.execute("select sum(obj_price) from auction_lots where auction_id=%d", (id,))
+ cr.execute("select sum(obj_price) from auction_lots where auction_id=%s", (id,))
sum = cr.fetchone()
if sum:
tmp[id]=sum[0]
@@ -346,7 +346,7 @@ class auction_lots(osv.osv):
res[lot.id] = 0.0
continue
auct_id=lot.auction_id.id
- cr.execute('select count(*) from auction_lots where auction_id=%d', (auct_id,))
+ cr.execute('select count(*) from auction_lots where auction_id=%s', (auct_id,))
nb = cr.fetchone()[0]
account_analytic_line_obj = self.pool.get('account.analytic.line')
line_ids = account_analytic_line_obj.search(cr, uid, [('account_id', '=', lot.auction_id.account_analytic_id.id),('journal_id', '<>', lot.auction_id.journal_id.id),('journal_id', '<>', lot.auction_id.journal_seller_id.id)])
@@ -806,16 +806,16 @@ class auction_lots(osv.osv):
def numerotate(self, cr, uid, ids):
- cr.execute('select auction_id from auction_lots where id=%d', (ids[0],))
+ cr.execute('select auction_id from auction_lots where id=%s', (ids[0],))
auc_id = cr.fetchone()[0]
- cr.execute('select max(obj_num) from auction_lots where auction_id=%d', (auc_id,))
+ cr.execute('select max(obj_num) from auction_lots where auction_id=%s', (auc_id,))
try:
max = cr.fetchone()[0]
except:
max = 0
for id in ids:
max+=1
- cr.execute('update auction_lots set obj_num=%d where id=%d', (max, id))
+ cr.execute('update auction_lots set obj_num=%s where id=%s', (max, id))
return []
auction_lots()
diff --git a/addons/auction/report/artists.xsl b/addons/auction/report/artists.xsl
index 98e3bde4b01..3349fc2d0bc 100644
--- a/addons/auction/report/artists.xsl
+++ b/addons/auction/report/artists.xsl
@@ -10,7 +10,7 @@
-
+
diff --git a/addons/auction/report/auction_total_rml.py b/addons/auction/report/auction_total_rml.py
index 970c66d2d66..0cec8522b95 100644
--- a/addons/auction/report/auction_total_rml.py
+++ b/addons/auction/report/auction_total_rml.py
@@ -65,84 +65,84 @@ class auction_total_rml(report_sxw.rml_parse):
def sum_taxes(self,auction_id):
- self.cr.execute("select count(1) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d group by auction_id "%(auction_id))
+ self.cr.execute("select count(1) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s group by auction_id ", (auction_id,))
res = self.cr.fetchone()
return res[0]
def sold_item(self, object_id):
- self.cr.execute("select count(1) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and state in ('unsold') "%(object_id,))
+ self.cr.execute("select count(1) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and state in ('unsold') ", (object_id,))
res = self.cr.fetchone()
return str(res[0])
def sum_buyer(self, auction_id):
- self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and (ach_uid is not null or ach_login is not null) "%(auction_id))
+ self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and (ach_uid is not null or ach_login is not null) ", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
def sum_seller(self, auction_id):
- self.cr.execute("select count(distinct bord_vnd_id) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d AND bord_vnd_id is not null "%(auction_id))
+ self.cr.execute("select count(distinct bord_vnd_id) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s AND bord_vnd_id is not null ", (auction_id,))
res = self.cr.fetchone()
return res[0]
def sum_adj(self, auction_id):
- self.cr.execute("select sum(obj_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d "%(auction_id))
+ self.cr.execute("select sum(obj_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s ", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
def count_take(self, auction_id):
- self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and ach_emp='True' "%(auction_id))
+ self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and ach_emp='True' ", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
def chek_paid(self, auction_id):
- self.cr.execute("select count(1) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and ((paid_ach='T') or (is_ok='T')) "%(auction_id))
+ self.cr.execute("select count(1) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and ((paid_ach='T') or (is_ok='T')) ", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
def check_paid_seller(self,auction_id):
- self.cr.execute("select sum(seller_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and paid_vnd != 'T' "%(auction_id))
+ self.cr.execute("select sum(seller_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and paid_vnd != 'T' ", (auction_id,))
res = self.cr.fetchone()
return str(res[0]) or 0.0
def sum_credit(self,auction_id):
- self.cr.execute("select sum(buyer_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d "%(auction_id))
+ self.cr.execute("select sum(buyer_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
def sum_debit_buyer(self,auction_id):
- self.cr.execute("select sum(buyer_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d "%(auction_id))
+ self.cr.execute("select sum(buyer_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s", (auction_id,))
res = self.cr.fetchone()
return str(res[0] or 0)
def sum_debit(self,object_id):
- self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%d "%(object_id,))
+ self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%s", (object_id,))
res = self.cr.fetchone()
return str(res[0] or 0)
def sum_credit_seller(self, object_id):
- self.cr.execute("select sum(seller_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d "%(object_id))
+ self.cr.execute("select sum(seller_price) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s", (object_id,))
res = self.cr.fetchone()
return str(res[0] or 0)
def sum_minadj(self, auction_id):
- self.cr.execute('select sum(lot_est1) from auction_lots where id in ('+','.join(map(str,self.total_obj))+') and auction_id=%d '%(auction_id))
+ self.cr.execute('select sum(lot_est1) from auction_lots where id in ('+','.join(map(str,self.total_obj))+') and auction_id=%s', (auction_id,))
res = self.cr.fetchone()
return str(res[0]) or 0
def sum_maxadj(self, auction_id):
- self.cr.execute('select sum(lot_est2) from auction_lots where id in ('+','.join(map(str,self.total_obj))+') and auction_id=%d '%(auction_id))
+ self.cr.execute('select sum(lot_est2) from auction_lots where id in ('+','.join(map(str,self.total_obj))+') and auction_id=%s', (auction_id,))
res = self.cr.fetchone()
return str(res[0]) or 0
def sum_buyer_paid(self, auction_id):
- self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and state = 'paid' "%(auction_id))
+ self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and state = 'paid' ", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
def count_comm(self, auction_id):
- self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%d and obj_comm is not null "%(auction_id))
+ self.cr.execute("select count(*) from auction_lots where id in ("+",".join(map(str,self.total_obj))+") and auction_id=%s and obj_comm is not null ", (auction_id,))
res = self.cr.fetchone()
return str(res[0])
diff --git a/addons/auction/report/buyer_list.py b/addons/auction/report/buyer_list.py
index 5c665eef995..0070dc0d58c 100644
--- a/addons/auction/report/buyer_list.py
+++ b/addons/auction/report/buyer_list.py
@@ -55,7 +55,7 @@ class buyer_list(report_sxw.rml_parse):
auct_dat=[]
for ad_id in auc_date_ids:
auc_dates_fields = self.pool.get('auction.dates').read(self.cr,self.uid,ad_id[0],['name'])
- self.cr.execute('select * from auction_buyer_taxes_rel abr,auction_dates ad where ad.id=abr.auction_id and ad.id=%d'%(ad_id[0],))
+ self.cr.execute('select * from auction_buyer_taxes_rel abr,auction_dates ad where ad.id=abr.auction_id and ad.id=%s', (ad_id[0],))
res=self.cr.fetchall()
total=0
for r in res:
@@ -70,8 +70,8 @@ class buyer_list(report_sxw.rml_parse):
auc_date_ids = self.pool.get('auction.dates').search(self.cr,self.uid,([('name','like',obj['name'])]))
-# self.cr.execute('select ach_uid,count(1) as no_lot, sum(obj_price) as adj_price, sum(buyer_price)-sum(obj_price) as buyer_cost ,sum(buyer_price) as to_pay from auction_lots where id in ('+','.join(map(str,self.auc_lot_ids))+') and auction_id=%d and ach_uid is not null group by ach_uid '%(auc_date_ids[0]))
- self.cr.execute('select ach_login as ach_uid,count(1) as no_lot, sum(obj_price) as adj_price, sum(buyer_price)-sum(obj_price) as buyer_cost ,sum(buyer_price) as to_pay from auction_lots where id in ('+','.join(map(str,self.auc_lot_ids))+') and auction_id=%d and ach_login is not null group by ach_login order by ach_login'%(auc_date_ids[0]))
+# self.cr.execute('select ach_uid,count(1) as no_lot, sum(obj_price) as adj_price, sum(buyer_price)-sum(obj_price) as buyer_cost ,sum(buyer_price) as to_pay from auction_lots where id in ('+','.join(map(str,self.auc_lot_ids))+') and auction_id=%s and ach_uid is not null group by ach_uid ', (auc_date_ids[0],))
+ self.cr.execute('select ach_login as ach_uid,count(1) as no_lot, sum(obj_price) as adj_price, sum(buyer_price)-sum(obj_price) as buyer_cost ,sum(buyer_price) as to_pay from auction_lots where id in ('+','.join(map(str,self.auc_lot_ids))+') and auction_id=%s and ach_login is not null group by ach_login order by ach_login', (auc_date_ids[0],))
res = self.cr.dictfetchall()
for r in res:
# if r['ach_uid']:
diff --git a/addons/auction/report/buyer_list.xsl b/addons/auction/report/buyer_list.xsl
index 38d739ebf31..7ee19643971 100644
--- a/addons/auction/report/buyer_list.xsl
+++ b/addons/auction/report/buyer_list.xsl
@@ -7,7 +7,7 @@
-
+
diff --git a/addons/auction/report/catalog2.py b/addons/auction/report/catalog2.py
index 512a65f30db..418d6b8681c 100644
--- a/addons/auction/report/catalog2.py
+++ b/addons/auction/report/catalog2.py
@@ -124,25 +124,25 @@ class auction_catalog(report_rml):
lnum.appendChild(doc.createTextNode(escape(cat['lot_num'])))
infos.appendChild(lnum)
- dest = os.path.join('/tmp/pdf_catalog/',str(cwid),str(cat['obj_desc'])+'.jpg')
- if not cat['image']:
- print "Cat with no Image "
+ if cat['image']:
+ import random
+ import tempfile
+ limg = doc.createElement('photo_small')
- else:
- import random
- limg = doc.createElement('photo_small')
- file_name = '/tmp/image_%d.jpg' % (random.randint(1,1000),)
- fp = file(file_name,'wb+')
- content = base64.decodestring(cat['image'])
- fp.write(content)
- fp.close()
- fp = file(file_name,'r')
- size = photo_shadow.convert_catalog(fp, '/tmp/test.jpg',110)
- fp = file('/tmp/test.jpg')
- file_data = fp.read()
- test_data = base64.encodestring(file_data)
- limg.appendChild(doc.createTextNode(test_data))
- infos.appendChild(limg)
+ file_name = tempfile.mktemp(prefix='openerp_auction_', suffix='.jpg')
+ fp = file(file_name, 'w')
+ content = base64.decodestring(cat['image'])
+ fp.write(content)
+ fp.close()
+ fp = file(file_name,'r')
+ test_file_name = tempfile.mktemp(prefix='openerp_auction_test_', suffix='.jpg')
+ size = photo_shadow.convert_catalog(fp, test_file_name,110)
+ fp = file(test_file_name)
+ file_data = fp.read()
+ test_data = base64.encodestring(file_data)
+ fp.close()
+ limg.appendChild(doc.createTextNode(test_data))
+ infos.appendChild(limg)
for key in ('lot_est1','lot_est2'):
ref2 = doc.createElement(key)
diff --git a/addons/auction/report/huissier.xsl b/addons/auction/report/huissier.xsl
index 5113fd91f44..50d7203b607 100644
--- a/addons/auction/report/huissier.xsl
+++ b/addons/auction/report/huissier.xsl
@@ -7,7 +7,7 @@
-
+
diff --git a/addons/auction/report/lots_bids_phone2.xsl b/addons/auction/report/lots_bids_phone2.xsl
index abceb460670..b8445998caf 100644
--- a/addons/auction/report/lots_bids_phone2.xsl
+++ b/addons/auction/report/lots_bids_phone2.xsl
@@ -8,7 +8,7 @@
-
+
diff --git a/addons/auction/report/lots_list_inv.xsl b/addons/auction/report/lots_list_inv.xsl
index 35fc5c80471..edd779fb0da 100644
--- a/addons/auction/report/lots_list_inv.xsl
+++ b/addons/auction/report/lots_list_inv.xsl
@@ -8,7 +8,7 @@
-
+
diff --git a/addons/auction/report/lots_list_landscape.xsl b/addons/auction/report/lots_list_landscape.xsl
index b3ed6ce5a4d..55838eaf27c 100644
--- a/addons/auction/report/lots_list_landscape.xsl
+++ b/addons/auction/report/lots_list_landscape.xsl
@@ -6,7 +6,7 @@
-
+
diff --git a/addons/auction/report/results.xsl b/addons/auction/report/results.xsl
index abe867e75b8..2e575941650 100644
--- a/addons/auction/report/results.xsl
+++ b/addons/auction/report/results.xsl
@@ -19,7 +19,7 @@
-
+
diff --git a/addons/auction/report/results_buyer.xsl b/addons/auction/report/results_buyer.xsl
index 8c3648b6799..320a8a2e4f3 100644
--- a/addons/auction/report/results_buyer.xsl
+++ b/addons/auction/report/results_buyer.xsl
@@ -20,7 +20,7 @@
-
+
diff --git a/addons/auction/report/seller_list.xsl b/addons/auction/report/seller_list.xsl
index b81e23b299f..1c414c72482 100644
--- a/addons/auction/report/seller_list.xsl
+++ b/addons/auction/report/seller_list.xsl
@@ -7,9 +7,9 @@
-
+
diff --git a/addons/audittrail/__terp__.py b/addons/audittrail/__terp__.py
index 60075c17a6b..5e7c3c4c861 100644
--- a/addons/audittrail/__terp__.py
+++ b/addons/audittrail/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Audit Trail",
"version" : "1.0",
"depends" : ["base","account","purchase","mrp"],
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"author" : "Tiny",
"init_xml" : [],
"description": "Allows the administrator to track every user operations on all objects of the system.",
diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py
index 581dfe8b26b..4a635db3cbc 100644
--- a/addons/base_contact/__terp__.py
+++ b/addons/base_contact/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Base Contact",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"description": """
This module allows you to manage entirely your contacts.
diff --git a/addons/base_module_merge/__terp__.py b/addons/base_module_merge/__terp__.py
index aa912d04f99..c623f1f277d 100644
--- a/addons/base_module_merge/__terp__.py
+++ b/addons/base_module_merge/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Module Merger",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"description": """
* The wizard asks a many2many of modules
diff --git a/addons/base_module_merge/wizard/base_module_merge.py b/addons/base_module_merge/wizard/base_module_merge.py
index 5e474b94fae..b61f976fe6e 100644
--- a/addons/base_module_merge/wizard/base_module_merge.py
+++ b/addons/base_module_merge/wizard/base_module_merge.py
@@ -57,7 +57,7 @@ intro_start_fields = {
'version': {'string':'Version', 'type':'char', 'size':16, 'required':True},
'author': {'string':'Author', 'type':'char', 'size':64, 'default': lambda *args: 'Tiny', 'required':True},
'category': {'string':'Category', 'type':'char', 'size':64, 'default': lambda *args: 'Vertical Modules/Parametrization', 'required':True},
- 'website': {'string':'Documentation URL', 'type':'char', 'size':64, 'default': lambda *args: 'http://tinyerp.com', 'required':True},
+ 'website': {'string':'Documentation URL', 'type':'char', 'size':64, 'default': lambda *args: 'http://www.openerp.com', 'required':True},
'description': {'string':'Full Description', 'type':'text', 'required':True},
'data_kind': {'string':'Type of Data', 'type':'selection', 'selection':[('demo','Demo Data'),('update','Normal Data')], 'required':True, 'default': lambda *args:'update'},
}
@@ -69,7 +69,7 @@ intro_save_form = '''
-
+
'''
@@ -169,13 +169,10 @@ class base_module_merge(wizard.interface):
terp_file=os.path.join(fromurl,'__terp__.py')
terp_info=eval(tools.file_open(terp_file).read())
if os.path.basename(path) in terp_info['init_xml']:
- print "in init_xml",new_path
self.init_xml+=[os.path.basename(new_path)]
elif os.path.basename(path) in terp_info['demo_xml']:
- print "in demo_xml",new_path
self.demo_xml+=[os.path.basename(new_path)]
elif os.path.basename(path) in terp_info['update_xml']:
- print "in update_xml",new_path
self.update_xml+=[os.path.basename(new_path)]
else:
file_data=tools.file_open(os.path.join(fromurl, path)).read()
diff --git a/addons/base_module_publish/__terp__.py b/addons/base_module_publish/__terp__.py
index ed373de75ba..198dab941d9 100644
--- a/addons/base_module_publish/__terp__.py
+++ b/addons/base_module_publish/__terp__.py
@@ -23,12 +23,12 @@
"name" : "Module publisher",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"description": """
This module can be used by developpers to automatically publish their modules
in a few click to the following websites:
-* http://TinyERP.com, section module
+* http://OpenERP.com, section module
* http://TinyForge.org
* PyPi, The python offical repository
* http://Freshmeat.net
diff --git a/addons/base_module_publish/wizard/base_module_publish.py b/addons/base_module_publish/wizard/base_module_publish.py
index a2e36b60147..74addefd82c 100644
--- a/addons/base_module_publish/wizard/base_module_publish.py
+++ b/addons/base_module_publish/wizard/base_module_publish.py
@@ -40,7 +40,7 @@ intro_fields = {
'text': {'string':'Introduction', 'type':'text', 'readonly':True,
'default': lambda *args: """
This system will automatically publish the selected module to the
-Tiny ERP official website. You can use it to quickly publish a new
+Open ERP official website. You can use it to quickly publish a new
module or update an existing one (new version).
Make sure you read the publication manual and modules guidelines
@@ -123,7 +123,7 @@ check_fields = {
upload_info_form = '''
'''
intro_start_form = '''
'''
diff --git a/addons/base_module_record/wizard/base_module_save.py b/addons/base_module_record/wizard/base_module_save.py
index da1da2a7895..9f1e833df38 100644
--- a/addons/base_module_record/wizard/base_module_save.py
+++ b/addons/base_module_record/wizard/base_module_save.py
@@ -63,7 +63,7 @@ intro_start_fields = {
'version': {'string':'Version', 'type':'char', 'size':16, 'required':True},
'author': {'string':'Author', 'type':'char', 'size':64, 'default': lambda *args: 'Tiny', 'required':True},
'category': {'string':'Category', 'type':'char', 'size':64, 'default': lambda *args: 'Vertical Modules/Parametrization', 'required':True},
- 'website': {'string':'Documentation URL', 'type':'char', 'size':64, 'default': lambda *args: 'http://tinyerp.com', 'required':True},
+ 'website': {'string':'Documentation URL', 'type':'char', 'size':64, 'default': lambda *args: 'http://www.openerp.com', 'required':True},
'description': {'string':'Full Description', 'type':'text', 'required':True},
'data_kind': {'string':'Type of Data', 'type':'selection', 'selection':[('demo','Demo Data'),('update','Normal Data')], 'required':True, 'default': lambda *args:'update'},
}
@@ -75,7 +75,7 @@ intro_save_form = '''
-
+
'''
@@ -136,7 +136,7 @@ def _create_module(self, cr, uid, data, context):
"installable": True
} """ % data['form']
filewrite = {
- '__init__.py':'#\n# Generated by the Tiny ERP module recorder !\n#\n',
+ '__init__.py':'#\n# Generated by the Open ERP module recorder !\n#\n',
'__terp__.py':_terp,
dname+'_data.xml': res_xml
}
diff --git a/addons/base_report_creator/wizard/wiz_set_filter_fields.py b/addons/base_report_creator/wizard/wiz_set_filter_fields.py
index b5ccca4df56..c9eda8665f5 100644
--- a/addons/base_report_creator/wizard/wiz_set_filter_fields.py
+++ b/addons/base_report_creator/wizard/wiz_set_filter_fields.py
@@ -166,7 +166,6 @@ def _set_form_value(self, cr, uid, data, context):
def _set_operator(self, cr, uid, data, context):
field = pooler.get_pool(cr.dbname).get('ir.model.fields').browse(cr, uid, data['form']['field_id'])
- print field.ttype
operator = set_value_fields['operator']['selection']
while operator:
operator.pop(operator.__len__()-1)
diff --git a/addons/base_report_designer/__terp__.py b/addons/base_report_designer/__terp__.py
index e2fb372e3bc..cdb434cfe66 100644
--- a/addons/base_report_designer/__terp__.py
+++ b/addons/base_report_designer/__terp__.py
@@ -28,7 +28,7 @@ OpenOffice.
"version" : "0.1",
"depends" : ["base"],
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"init_xml" : [ ],
"demo_xml" : ["base_report_data.xml"],
diff --git a/addons/base_report_designer/wizard/base_report_designer_modify.py b/addons/base_report_designer/wizard/base_report_designer_modify.py
index 91c068d9672..d1351767df0 100644
--- a/addons/base_report_designer/wizard/base_report_designer_modify.py
+++ b/addons/base_report_designer/wizard/base_report_designer_modify.py
@@ -41,11 +41,11 @@ intro_fields = {
'readonly': True,
'default': lambda *args: """This system must be used with the Tiny OpenOffice plugin. If you
did not installed yet, you can find this package on:
- http://tinyerp.com
+ http://www.openerp.com
This wizard will provide you the .SXW report that you can modify
in OpenOffice. After having modified it, you will be able to reupload
-it to the Tiny ERP server.
+it to the Open ERP server.
"""},
'operation': {
'string': 'Operation',
@@ -83,7 +83,7 @@ get_form_result = '''
-
+
'''
get_form_fields = {
diff --git a/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py b/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py
index 6c550ae9404..9bc62ac02c8 100644
--- a/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py
+++ b/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py
@@ -31,7 +31,7 @@
##############################################################################
"""
-Tiny SXW2RML - The Tiny ERP's report engine
+Tiny SXW2RML - The Open ERP's report engine
Tiny SXW2RMLis part of the Tiny report project.
Tiny Report is a module that allows you to render high quality PDF document
diff --git a/addons/base_setup/__terp__.py b/addons/base_setup/__terp__.py
index 6d299e2d08c..518e96c599b 100644
--- a/addons/base_setup/__terp__.py
+++ b/addons/base_setup/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Base Setup",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"description": """
This module implements a configuration system that helps user
diff --git a/addons/board/board.py b/addons/board/board.py
index 912fb929f6d..1938de9840f 100644
--- a/addons/board/board.py
+++ b/addons/board/board.py
@@ -65,7 +65,7 @@ class board_board(osv.osv):
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=%d" % (view, id))
+ cr.execute("update ir_ui_view set arch='%s' where id=%s" % (view, id))
cr.commit()
return result
diff --git a/addons/crm/__terp__.py b/addons/crm/__terp__.py
index 38196f6aed2..7bf93a5c550 100644
--- a/addons/crm/__terp__.py
+++ b/addons/crm/__terp__.py
@@ -23,25 +23,25 @@
"name" : "Customer & Supplier Relationship Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_crm.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/CRM & SRM",
- "description": """The Tiny ERP case and request tracker enables a group of
+ "description": """The Open ERP case and request tracker enables a group of
people to intelligently and efficiently manage tasks, issues, and requests.
It manages key tasks such as communication, identification, prioritization,
assignment, resolution and notification.
-Tiny ERP ensures that all cases are successfly tracked by users, customers and
+Open ERP ensures that all cases are successfly tracked by users, customers and
suppliers. It can automatically send reminders, escalate the request, trigger
specific methods and lots of others actions based on your enterprise own rules.
The greatest thing about this system is that users don't need to do anything
-special. They can just send email to the request tracker. Tiny ERP will take
+special. They can just send email to the request tracker. Open ERP will take
care of thanking them for their message, automatically routing it to the
appropriate staff, and making sure all future correspondence gets to the right
place.
The CRM module has a email gateway for the synchronisation interface
-between mails and Tiny ERP.""",
+between mails and Open ERP.""",
"depends" : ["base"],
"init_xml" : ["crm_data.xml"],
"demo_xml" : ["crm_demo.xml"],
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 85cab98107f..7ba7c6d0337 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -60,7 +60,7 @@ class crm_case_section(osv.osv):
'active': fields.boolean('Active'),
'sequence': fields.integer('Sequence'),
'user_id': fields.many2one('res.users', 'Responsible'),
- 'reply_to': fields.char('Reply-To', size=64, help="The email address wich is the 'Reply-To' of all email sent by Tiny ERP for cases in this section"),
+ 'reply_to': fields.char('Reply-To', size=64, help="The email address wich is the 'Reply-To' of all email sent by Open ERP for cases in this section"),
'parent_id': fields.many2one('crm.case.section', 'Parent Section'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Childs Sections'),
}
diff --git a/addons/crm/crm_operators.py b/addons/crm/crm_operators.py
index b0fa45d076c..e6354963f84 100644
--- a/addons/crm/crm_operators.py
+++ b/addons/crm/crm_operators.py
@@ -33,7 +33,7 @@ def som(cr, uid, partner_id, args):
'''
select s.factor from res_partner_event e
left join res_partner_som s
- on (e.som=s.id) where partner_id=%d and date>=%s and date<%s''',
+ on (e.som=s.id) where partner_id=%s and date>=%s and date<%s''',
(partner_id,
time.strftime('%Y-%m-%d', time.gmtime(date_start)),
time.strftime('%Y-%m-%d', time.gmtime(next_date))))
diff --git a/addons/crm/crm_segmentation.py b/addons/crm/crm_segmentation.py
index 7b6ef9e03a3..8437dc0a0c2 100644
--- a/addons/crm/crm_segmentation.py
+++ b/addons/crm/crm_segmentation.py
@@ -59,7 +59,7 @@ class crm_segmentation(osv.osv):
for categ in categs:
if start:
if categ['exclusif']:
- cr.execute('delete from res_partner_category_rel where category_id=%d', (categ['categ_id'][0],))
+ cr.execute('delete from res_partner_category_rel where category_id=%s', (categ['categ_id'][0],))
id = categ['id']
@@ -68,7 +68,7 @@ class crm_segmentation(osv.osv):
if categ['sales_purchase_active']:
to_remove_list=[]
- cr.execute('select id from crm_segmentation_line where segmentation_id=%d', (id,))
+ cr.execute('select id from crm_segmentation_line where segmentation_id=%s', (id,))
line_ids = [x[0] for x in cr.fetchall()]
for pid in partners:
@@ -78,7 +78,7 @@ class crm_segmentation(osv.osv):
partners.remove(pid)
for partner_id in partners:
- cr.execute('insert into res_partner_category_rel (category_id,partner_id) values (%d,%d)', (categ['categ_id'][0],partner_id))
+ 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})
@@ -124,14 +124,14 @@ class crm_segmentation_line(osv.osv):
cr.execute('SELECT SUM(l.price_unit * l.quantity) ' \
'FROM account_invoice_line l, account_invoice i ' \
'WHERE (l.invoice_id = i.id) ' \
- 'AND i.partner_id = %d '\
+ 'AND i.partner_id = %s '\
'AND i.type = \'out_invoice\'',
(partner_id,))
value = cr.fetchone()[0] or 0.0
cr.execute('SELECT SUM(l.price_unit * l.quantity) ' \
'FROM account_invoice_line l, account_invoice i ' \
'WHERE (l.invoice_id = i.id) ' \
- 'AND i.partner_id = %d '\
+ 'AND i.partner_id = %s '\
'AND i.type = \'out_refund\'',
(partner_id,))
value -= cr.fetchone()[0] or 0.0
@@ -139,14 +139,14 @@ class crm_segmentation_line(osv.osv):
cr.execute('SELECT SUM(l.price_unit * l.quantity) ' \
'FROM account_invoice_line l, account_invoice i ' \
'WHERE (l.invoice_id = i.id) ' \
- 'AND i.partner_id = %d '\
+ 'AND i.partner_id = %s '\
'AND i.type = \'in_invoice\'',
(partner_id,))
value = cr.fetchone()[0] or 0.0
cr.execute('SELECT SUM(l.price_unit * l.quantity) ' \
'FROM account_invoice_line l, account_invoice i ' \
'WHERE (l.invoice_id = i.id) ' \
- 'AND i.partner_id = %d '\
+ 'AND i.partner_id = %s '\
'AND i.type = \'in_refund\'',
(partner_id,))
value -= cr.fetchone()[0] or 0.0
diff --git a/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py b/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py
index 642aedd5178..af0f8ae5fcb 100644
--- a/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py
+++ b/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py
@@ -106,8 +106,8 @@ class email_parser(object):
try:
data.update(self.partner_get(self._decode_header(msg['From'])))
except Exception, e:
- print e
- #end try
+ import netsvc
+ netsvc.Logger().notifyChannel('mailgate', netsvc.LOG_ERROR, "%s" % e)
id = self.rpc('crm.case', 'create', data)
attachments = message['attachment']
@@ -122,7 +122,6 @@ class email_parser(object):
'res_id': id
}
self.rpc('ir.attachment', 'create', data_attach)
- #end for
return id
@@ -297,11 +296,11 @@ if __name__ == '__main__':
group = optparse.OptionGroup(parser, "Note",
"This program parse a mail from standard input and communicate "
- "with the Tiny ERP server for case management in the CRM module.")
+ "with the Open ERP server for case management in the CRM module.")
parser.add_option_group(group)
- parser.add_option("-u", "--user", dest="userid", help="ID of the user in Tiny ERP", default=3, type='int')
- parser.add_option("-p", "--password", dest="password", help="Password of the user in Tiny ERP", default='admin')
+ parser.add_option("-u", "--user", dest="userid", help="ID of the user in Open ERP", default=3, type='int')
+ parser.add_option("-p", "--password", dest="password", help="Password of the user in Open ERP", default='admin')
parser.add_option("-e", "--email", dest="email", help="Email address used in the From field of outgoing messages")
parser.add_option("-s", "--section", dest="section", help="ID or code of the case section", default="support")
parser.add_option("-m", "--default", dest="default", help="Default eMail in case of any trouble.", default=None)
diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py
index 881b7595162..b1e7fe27e2a 100644
--- a/addons/crm_configuration/__terp__.py
+++ b/addons/crm_configuration/__terp__.py
@@ -23,10 +23,10 @@
"name" : "Customer Relationship Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_crm.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/CRM & SRM",
"description": """
-The Tiny ERP case and request tracker enables a group of
+The Open ERP case and request tracker enables a group of
people to intelligently and efficiently manage tasks, issues,
and requests. It manages key tasks such as communication,
identification, prioritization, assignment, resolution and notification.
diff --git a/addons/crm_profiling/__terp__.py b/addons/crm_profiling/__terp__.py
index b82a7f40682..4cad2a25d29 100644
--- a/addons/crm_profiling/__terp__.py
+++ b/addons/crm_profiling/__terp__.py
@@ -36,7 +36,7 @@
* Note: this module is not compatible with the module segmentation, since it's the same which has been renamed.
""",
- "website" : "http://tinyerp.com/",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/CRM & SRM",
"init_xml" : [],
"demo_xml" : ["crm_profiling_demo.xml"],
diff --git a/addons/crm_profiling/crm_profiling.py b/addons/crm_profiling/crm_profiling.py
index a7e702bec05..65f11e8bfba 100644
--- a/addons/crm_profiling/crm_profiling.py
+++ b/addons/crm_profiling/crm_profiling.py
@@ -90,8 +90,8 @@ def _recompute_categ(self, cr, uid, pid, answers_ids):
cr.execute('''
select r.category_id
from res_partner_category_rel r left join crm_segmentation s on (r.category_id = s.categ_id)
- where r.partner_id = %d and (s.exclusif = false or s.exclusif is null);
- '''% pid)
+ where r.partner_id = %s and (s.exclusif = false or s.exclusif is null)
+ ''', (pid,))
for x in cr.fetchall():
ok.append(x[0])
@@ -173,10 +173,8 @@ class partner(osv.osv):
if x.startswith("quest_form") and data['form'][x] != 0 :
temp.append(data['form'][x])
- query = """
- select answer from partner_question_rel
- where partner =%d"""% data['id']
- cr.execute(query)
+ query = "select answer from partner_question_rel where partner=%s"
+ cr.execute(query, data['id'])
for x in cr.fetchall():
temp.append(x[0])
@@ -212,7 +210,7 @@ class crm_segmentation(osv.osv):
for categ in categs:
if start:
if categ['exclusif']:
- cr.execute('delete from res_partner_category_rel where category_id=%d', (categ['categ_id'][0],))
+ cr.execute('delete from res_partner_category_rel where category_id=%s', (categ['categ_id'][0],))
id = categ['id']
@@ -221,7 +219,7 @@ class crm_segmentation(osv.osv):
if categ['sales_purchase_active']:
to_remove_list=[]
- cr.execute('select id from crm_segmentation_line where segmentation_id=%d', (id,))
+ cr.execute('select id from crm_segmentation_line where segmentation_id=%s', (id,))
line_ids = [x[0] for x in cr.fetchall()]
for pid in partners:
@@ -234,7 +232,7 @@ class crm_segmentation(osv.osv):
to_remove_list=[]
for pid in partners:
- cr.execute('select distinct(answer) from partner_question_rel where partner=%d' % pid)
+ cr.execute('select distinct(answer) from partner_question_rel where partner=%s',(pid,))
answers_ids = [x[0] for x in cr.fetchall()]
if (not test_prof(cr, uid, id, pid, answers_ids)):
@@ -243,7 +241,7 @@ class crm_segmentation(osv.osv):
partners.remove(pid)
for partner_id in partners:
- cr.execute('insert into res_partner_category_rel (category_id,partner_id) values (%d,%d)', (categ['categ_id'][0],partner_id))
+ 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})
diff --git a/addons/crm_profiling/crm_profiling_demo.xml b/addons/crm_profiling/crm_profiling_demo.xml
index 102a8ee28e0..9295f009dcc 100644
--- a/addons/crm_profiling/crm_profiling_demo.xml
+++ b/addons/crm_profiling/crm_profiling_demo.xml
@@ -17,7 +17,7 @@
Partner level?
- TinyERP partner?
+ OpenERP partner?
- TinyERP partners
+ OpenERP partnersTrue
diff --git a/addons/crm_vertical/__terp__.py b/addons/crm_vertical/__terp__.py
index 1e5b9309a0d..58becb5e6d6 100644
--- a/addons/crm_vertical/__terp__.py
+++ b/addons/crm_vertical/__terp__.py
@@ -23,7 +23,7 @@
"name" : "CRM Verticalisation",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Vertical Modules/Parametrization",
"description": """Simplification of the interface for CRM.""",
"depends" : ["crm_configuration"],
diff --git a/addons/custom/__terp__.py b/addons/custom/__terp__.py
index 36502b0baa9..fb4bc4ace6e 100644
--- a/addons/custom/__terp__.py
+++ b/addons/custom/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Others",
- "website": "http://www.tinyerp.com",
+ "website": "http://www.openerp.com",
"description": "Sample custom module where you can put your customer specific developments.",
"depends" : ["base"],
"init_xml" : [],
diff --git a/addons/custom/corporate_defaults.xsl b/addons/custom/corporate_defaults.xsl
index 71d940ca520..de2ef8ee2e1 100644
--- a/addons/custom/corporate_defaults.xsl
+++ b/addons/custom/corporate_defaults.xsl
@@ -2,7 +2,7 @@
- Tiny ERP Report
+ Open ERP Report1cm1cm1cm
diff --git a/addons/delivery/__terp__.py b/addons/delivery/__terp__.py
index 8a7597d3aef..63e134482af 100644
--- a/addons/delivery/__terp__.py
+++ b/addons/delivery/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Sales & Purchases",
- "description": "Allows to add delivery methods in sales order and packings. You can define your own carrier and delivery grids for prices. When creating invoices from pickings, Tiny ERP is able to add and compute the shipping line.",
+ "description": "Allows to add delivery methods in sales order and packings. You can define your own carrier and delivery grids for prices. When creating invoices from pickings, Open ERP is able to add and compute the shipping line.",
"depends" : ["sale","purchase", "stock",],
"init_xml" : ["delivery_data.xml"],
"demo_xml" : ["delivery_demo.xml"],
diff --git a/addons/delivery/delivery_demo.xml b/addons/delivery/delivery_demo.xml
index e9c584868f4..2c05d4567a5 100644
--- a/addons/delivery/delivery_demo.xml
+++ b/addons/delivery/delivery_demo.xml
@@ -5,7 +5,7 @@
The Poste
- http://tinyerp.com
+ http://www.openerp.comFabien Pinckaers
diff --git a/addons/document/__terp__.py b/addons/document/__terp__.py
index 6c6aa6adb24..72cec7eb7da 100644
--- a/addons/document/__terp__.py
+++ b/addons/document/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Others",
- "website": "http://www.tinyerp.com",
+ "website": "http://www.openerp.com",
"description": """This is a complete document management system:
* FTP Interface
* User Authentification
diff --git a/addons/document/document.py b/addons/document/document.py
index e7929f2ba90..afb466c983a 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -35,7 +35,7 @@ import StringIO
import random
import string
-
+from psycopg2 import Binary
from tools import config
def random_name():
@@ -522,9 +522,9 @@ class document_file(osv.osv):
v = base64.decodestring(value)
fp.write(v)
filesize = os.stat(fname).st_size
- cr.execute('update ir_attachment set store_fname=%s,store_method=%s,file_size=%d where id=%d', (os.path.join(flag,filename),'fs',len(v),id))
+ cr.execute('update ir_attachment set store_fname=%s,store_method=%s,file_size=%s where id=%s', (os.path.join(flag,filename),'fs',len(v),id))
else:
- cr.execute('update ir_attachment set datas=%s,store_method=%s where id=%d', (psycopg.Binary(value),'db',id))
+ cr.execute('update ir_attachment set datas=%s,store_method=%s where id=%s', (Binary(value),'db',id))
return True
_columns = {
diff --git a/addons/document/ftpserver/abstracted_fs.py b/addons/document/ftpserver/abstracted_fs.py
index 4c0183122b8..9cc0f2d5868 100644
--- a/addons/document/ftpserver/abstracted_fs.py
+++ b/addons/document/ftpserver/abstracted_fs.py
@@ -494,7 +494,7 @@ class abstracted_fs:
elif src.object.res_id:
# I had to do that because writing False to an integer writes 0 instead of NULL
# change if one day we decide to improve osv/fields.py
- dst_basedir.cr.execute('update ir_attachment set res_id=NULL where id=%d', (src.object.id,))
+ dst_basedir.cr.execute('update ir_attachment set res_id=NULL where id=%s', (src.object.id,))
pool.get('ir.attachment').write(src.cr, src.uid, [src.object.id], val)
src.cr.commit()
diff --git a/addons/document_ics/__terp__.py b/addons/document_ics/__terp__.py
index f76096de470..3d30ea81e67 100644
--- a/addons/document_ics/__terp__.py
+++ b/addons/document_ics/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Others",
- "website": "http://www.tinyerp.com",
+ "website": "http://www.openerp.com",
"description": """Allows to synchronize calendars with others applications.""",
"depends" : ["document","crm_configuration"],
"init_xml" : ["document_data.xml"],
diff --git a/addons/event/wizard/event_registration.py b/addons/event/wizard/event_registration.py
index 2ae20b7ce90..cb76e6c929f 100644
--- a/addons/event/wizard/event_registration.py
+++ b/addons/event/wizard/event_registration.py
@@ -24,7 +24,7 @@ import pooler
def _event_registration(self, cr, uid, data, context):
event_id = data['id']
- cr.execute(''' SELECT section_id FROM event_event WHERE id = %d '''% (event_id, ))
+ cr.execute('SELECT section_id FROM event_event WHERE id = %s', (event_id, ))
res = cr.fetchone()
value = {
'domain': [('section_id', '=', res[0])],
diff --git a/addons/event_project/wizard/event_task.py b/addons/event_project/wizard/event_task.py
index 83426d008e7..6fd77fb21e0 100644
--- a/addons/event_project/wizard/event_task.py
+++ b/addons/event_project/wizard/event_task.py
@@ -24,7 +24,7 @@ import pooler
def _event_tasks(self, cr, uid, data, context):
event_id = data['id']
- cr.execute('''SELECT project_id FROM event_event WHERE id = %d '''% (event_id, ))
+ cr.execute('SELECT project_id FROM event_event WHERE id = %s', (event_id, ))
res = cr.fetchone()
if not res[0]:
raise wizard.except_wizard('Error !', 'No project defined for this event.\nYou can create one with the retro-planning button !')
diff --git a/addons/google_map/__terp__.py b/addons/google_map/__terp__.py
index 5650955972f..9d1c15a3d6a 100644
--- a/addons/google_map/__terp__.py
+++ b/addons/google_map/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Google Map",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Others",
"description": """The module adds google map field in partner address
so that we can directly open google map from the
diff --git a/addons/hr/__terp__.py b/addons/hr/__terp__.py
index 0004099b1c7..d39891ed3ee 100644
--- a/addons/hr/__terp__.py
+++ b/addons/hr/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
- "website" : "http://tinyerp.com/module_hr.html",
+ "website" : "http://www.openerp.com",
"description": """
Module for human resource management. You can manage:
* Employees and hierarchies
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index bd403ce2c42..8f05ffcd1f1 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -45,7 +45,7 @@ class hr_timesheet_group(osv.osv):
cycle = 0
result = []
while todo>0:
- cr.execute("select hour_from,hour_to from hr_timesheet where dayofweek='%s' and tgroup_id=%d order by hour_from", (dt_from.day_of_week,id))
+ cr.execute("select hour_from,hour_to from hr_timesheet where dayofweek='%s' and tgroup_id=%s order by hour_from", (dt_from.day_of_week,id))
for (hour_from,hour_to) in cr.fetchall():
h1,m1 = map(int,hour_from.split(':'))
h2,m2 = map(int,hour_to.split(':'))
diff --git a/addons/hr/report/bymonth.xsl b/addons/hr/report/bymonth.xsl
index 0b79152bf97..8d5ae74f8cc 100644
--- a/addons/hr/report/bymonth.xsl
+++ b/addons/hr/report/bymonth.xsl
@@ -10,7 +10,7 @@
-
+
diff --git a/addons/hr/wizard/sign_in_out.py b/addons/hr/wizard/sign_in_out.py
index dfcaf7c005a..ac724871b69 100644
--- a/addons/hr/wizard/sign_in_out.py
+++ b/addons/hr/wizard/sign_in_out.py
@@ -79,7 +79,6 @@ def _sign_in(self, cr, uid, data, context):
})
try:
success = service.execute(cr.dbname, uid, 'hr.employee', 'sign_in', [emp_id])
- print success
except:
raise wizard.except_wizard(_('UserError'), _('A sign-in must be right after a sign-out !'))
return {'success': success}
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py
index dfa1e3a7635..c0ecd34a0c0 100644
--- a/addons/hr_attendance/hr_attendance.py
+++ b/addons/hr_attendance/hr_attendance.py
@@ -130,7 +130,7 @@ class hr_employee(osv.osv):
return id
def _action_check(self, cr, uid, emp_id, dt=False,context={}):
- cr.execute('select max(name) from hr_attendance where employee_id=%d', (emp_id,))
+ cr.execute('select max(name) from hr_attendance where employee_id=%s', (emp_id,))
res = cr.fetchone()
return not (res and (res[0]>=(dt or time.strftime('%Y-%m-%d %H:%M:%S'))))
diff --git a/addons/hr_attendance/report/attendance_errors.py b/addons/hr_attendance/report/attendance_errors.py
index 96d052a67aa..90d776139fe 100644
--- a/addons/hr_attendance/report/attendance_errors.py
+++ b/addons/hr_attendance/report/attendance_errors.py
@@ -44,7 +44,7 @@ class attendance_print(report_sxw.rml_parse):
return dt.strftime(format)
def _lst(self, employee_id, dt_from, dt_to, max, *args):
- self.cr.execute('select name as date, create_date, action, create_date-name as delay from hr_attendance where employee_id=%d and name<=%s and name>=%s and action in (%s,%s) order by name', (employee_id, dt_to, dt_from, 'sign_in', 'sign_out'))
+ self.cr.execute('select name as date, create_date, action, create_date-name as delay from hr_attendance where employee_id=%s and name<=%s and name>=%s and action in (%s,%s) order by name', (employee_id, dt_to, dt_from, 'sign_in', 'sign_out'))
res = self.cr.dictfetchall()
for r in res:
if r['action']=='sign_out':
@@ -58,7 +58,7 @@ class attendance_print(report_sxw.rml_parse):
return res
def _lst_total(self, employee_id, dt_from, dt_to, max, *args):
- self.cr.execute('select name as date, create_date, action, create_date-name as delay from hr_attendance where employee_id=%d and name<=%s and name>=%s and action in (%s,%s)', (employee_id, dt_to, dt_from, 'sign_in', 'sign_out'))
+ self.cr.execute('select name as date, create_date, action, create_date-name as delay from hr_attendance where employee_id=%s and name<=%s and name>=%s and action in (%s,%s)', (employee_id, dt_to, dt_from, 'sign_in', 'sign_out'))
res = self.cr.dictfetchall()
if not res:
return ('/','/')
diff --git a/addons/hr_attendance/wizard/sign_in_out.py b/addons/hr_attendance/wizard/sign_in_out.py
index bea3350fe4f..376758ea4f8 100644
--- a/addons/hr_attendance/wizard/sign_in_out.py
+++ b/addons/hr_attendance/wizard/sign_in_out.py
@@ -60,11 +60,8 @@ so_fields = {
def _get_empid(self, cr, uid, data, context):
service = netsvc.LocalService('object_proxy')
emp_id = service.execute(cr.dbname, uid, 'hr.employee', 'search', [('user_id', '=', uid)])
- print "EMP :::::::::", emp_id
if emp_id:
- print "IF ::::::::"
employee = service.execute(cr.dbname, uid, 'hr.employee', 'read', emp_id)[0]
- print "employee .........", employee
return {'name': employee['name'], 'state': employee['state'], 'emp_id': emp_id[0]}
return {}
@@ -82,7 +79,6 @@ def _sign_in(self, cr, uid, data, context):
})
try:
success = service.execute(cr.dbname, uid, 'hr.employee', 'sign_in', [emp_id])
- print success
except:
raise wizard.except_wizard(_('UserError'), _('A sign-in must be right after a sign-out !'))
return {'success': success}
diff --git a/addons/hr_contract/__terp__.py b/addons/hr_contract/__terp__.py
index 0db8780f1cf..47422302f32 100644
--- a/addons/hr_contract/__terp__.py
+++ b/addons/hr_contract/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
- "website" : "http://tinyerp.com/module_hr.html",
+ "website" : "http://www.openerp.com",
"depends" : ["hr"],
"module": "",
"description": """
diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py
index 1cb45d7cade..b79f9b67685 100644
--- a/addons/hr_expense/__terp__.py
+++ b/addons/hr_expense/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
- "website" : "http://tinyerp.com/module_hr.html",
+ "website" : "http://www.openerp.com",
"depends" : ["hr","account", "account_tax_include",],
"description": """
This module aims to manage employee's expenses.
diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py
index 982b5624c19..0018d20d984 100644
--- a/addons/hr_holidays/__terp__.py
+++ b/addons/hr_holidays/__terp__.py
@@ -4,7 +4,7 @@
"version" : "0.1",
"author" : "Tiny & Axelor",
"category" : "Generic Modules/Human Resources",
- "website" : "http://tinyerp.com/",
+ "website" : "http://www.openerp.com",
"description": """Human Ressources: Holidays tracking and workflow
This module allows you to manage holidays and holidays requests. For each employee, you can also define a number of available holidays per holiday status.
diff --git a/addons/hr_holidays/hr_view.xml b/addons/hr_holidays/hr_view.xml
index 37667e2457f..dcf73f3e9f9 100644
--- a/addons/hr_holidays/hr_view.xml
+++ b/addons/hr_holidays/hr_view.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/addons/hr_holidays/report/holidays_summary.xsl b/addons/hr_holidays/report/holidays_summary.xsl
index ebe00a83911..793c557c262 100644
--- a/addons/hr_holidays/report/holidays_summary.xsl
+++ b/addons/hr_holidays/report/holidays_summary.xsl
@@ -9,7 +9,7 @@
-
+
@@ -273,4 +273,4 @@
-
\ No newline at end of file
+
diff --git a/addons/hr_holidays/report/holidays_summary_report.py b/addons/hr_holidays/report/holidays_summary_report.py
index c4b7158b05c..3cedf2b4faf 100644
--- a/addons/hr_holidays/report/holidays_summary_report.py
+++ b/addons/hr_holidays/report/holidays_summary_report.py
@@ -205,7 +205,7 @@ class report_custom(report_rml):
dept = pooler.get_pool(cr.dbname).get('hr.department').browse(cr, uid, id, context.copy())
depts.append(dept)
- cr.execute('select user_id from hr_department_user_rel where department_id=%d'%(dept.id))
+ cr.execute('select user_id from hr_department_user_rel where department_id=%s', (dept.id,))
result=cr.fetchall()
if result==[]:
diff --git a/addons/hr_timesheet/__terp__.py b/addons/hr_timesheet/__terp__.py
index e0403cbe742..f5a6bc6fb7a 100644
--- a/addons/hr_timesheet/__terp__.py
+++ b/addons/hr_timesheet/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
- "website" : "http://tinyerp.com/module_hr.html",
+ "website" : "http://www.openerp.com",
"description": """
This module implement a timesheet system. Each employee can encode and
track their time spent on the different projects. A project is an
diff --git a/addons/hr_timesheet/report/user_timesheet.py b/addons/hr_timesheet/report/user_timesheet.py
index 07742b451b1..dbc553050f9 100644
--- a/addons/hr_timesheet/report/user_timesheet.py
+++ b/addons/hr_timesheet/report/user_timesheet.py
@@ -61,7 +61,7 @@ class report_custom(report_rml):
"account_analytic_account as account, product_uom as unit "\
"where hr.line_id=line.id and line.account_id=account.id "\
"and product_uom_id = unit.id "\
- "and line.user_id=%d and line.date >= %s and line.date < %s "
+ "and line.user_id=%s and line.date >= %s and line.date < %s "
"order by line.date",
(data['form']['user_id'], som.strftime('%Y-%m-%d'), eom.strftime('%Y-%m-%d')))
@@ -88,7 +88,7 @@ class report_custom(report_rml):
account_xml.append('')
# Computing the employee
- cr.execute("select name from res_users where id=%d", (data['form']['user_id'],))
+ cr.execute("select name from res_users where id=%s", (data['form']['user_id'],))
emp = cr.fetchone()[0]
# Computing the xml
diff --git a/addons/hr_timesheet/report/user_timesheet.xsl b/addons/hr_timesheet/report/user_timesheet.xsl
index 07bbd778ded..88faa6dafef 100644
--- a/addons/hr_timesheet/report/user_timesheet.xsl
+++ b/addons/hr_timesheet/report/user_timesheet.xsl
@@ -10,7 +10,7 @@
-
+
diff --git a/addons/hr_timesheet/report/users_timesheet.py b/addons/hr_timesheet/report/users_timesheet.py
index 8ba187da4a2..98ceaf5eb65 100644
--- a/addons/hr_timesheet/report/users_timesheet.py
+++ b/addons/hr_timesheet/report/users_timesheet.py
@@ -40,7 +40,7 @@ def emp_create_xml(cr, id, som, eom):
"product_uom as unit "\
"where hr.line_id=line.id "\
"and product_uom_id = unit.id "\
- "and line.user_id=%d and line.date >= %s and line.date < %s "
+ "and line.user_id=%s and line.date >= %s and line.date < %s "
"order by line.date",
(id, som.strftime('%Y-%m-%d'), eom.strftime('%Y-%m-%d')))
@@ -58,7 +58,7 @@ def emp_create_xml(cr, id, som, eom):
time_xml = ([xml % (day, amount) for day, amount in month.iteritems()])
# Computing the employee
- cr.execute("select name from res_users where id=%d", (id,))
+ cr.execute("select name from res_users where id=%s", (id,))
emp = cr.fetchone()[0]
# Computing the xml
diff --git a/addons/hr_timesheet/report/users_timesheet.xsl b/addons/hr_timesheet/report/users_timesheet.xsl
index 7a06e04b409..7f4110b7c90 100644
--- a/addons/hr_timesheet/report/users_timesheet.xsl
+++ b/addons/hr_timesheet/report/users_timesheet.xsl
@@ -10,7 +10,7 @@
-
+
diff --git a/addons/hr_timesheet/wizard/sign_in_out.py b/addons/hr_timesheet/wizard/sign_in_out.py
index 1142355a367..d2a6f771310 100644
--- a/addons/hr_timesheet/wizard/sign_in_out.py
+++ b/addons/hr_timesheet/wizard/sign_in_out.py
@@ -80,7 +80,7 @@ def _get_empid(self, cr, uid, data, context):
def _get_empid2(self, cr, uid, data, context):
res = _get_empid(self,cr, uid, data, context)
- cr.execute('select name,action from hr_attendance where employee_id=%d order by name desc limit 1', (res['emp_id'],))
+ cr.execute('select name,action from hr_attendance where employee_id=%s order by name desc limit 1', (res['emp_id'],))
res['server_date'] = time.strftime('%Y-%m-%d %H:%M:%S')
res['date_start'] = cr.fetchone()[0]
res['info'] = ''
@@ -133,7 +133,7 @@ def _sign_out_result(self, cr, uid, data, context):
def _state_check(self, cr, uid, data, context):
emp_id = _get_empid(self, cr, uid, data, context)['emp_id']
# get the latest action (sign_in or out) for this employee
- cr.execute('select action from hr_attendance where employee_id=%d and action in (\'sign_in\',\'sign_out\') order by name desc limit 1', (emp_id,))
+ cr.execute('select action from hr_attendance where employee_id=%s and action in (\'sign_in\',\'sign_out\') order by name desc limit 1', (emp_id,))
res = (cr.fetchone() or ('sign_out',))[0]
#TODO: invert sign_in et sign_out
return res
diff --git a/addons/hr_timesheet_invoice/__terp__.py b/addons/hr_timesheet_invoice/__terp__.py
index 75735801d96..6426f895dff 100644
--- a/addons/hr_timesheet_invoice/__terp__.py
+++ b/addons/hr_timesheet_invoice/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Accounting",
- "website" : "http://tinyerp.com/",
+ "website" : "http://www.openerp.com",
"depends" : ["account",'hr_timesheet'],
"description": """
Module to generate invoices based on costs (human ressources, expenses, ...).
diff --git a/addons/hr_timesheet_invoice/report/account_analytic_profit.py b/addons/hr_timesheet_invoice/report/account_analytic_profit.py
index 0cd9a8de359..b8e1884ca5a 100644
--- a/addons/hr_timesheet_invoice/report/account_analytic_profit.py
+++ b/addons/hr_timesheet_invoice/report/account_analytic_profit.py
@@ -90,7 +90,7 @@ class account_analytic_profit(report_sxw.rml_parse):
xxx = round(price * line.unit_amount * (1-(discount or 0.0)), 2)
res[id]['amount_th']+=xxx
if line.invoice_id:
- self.cr.execute('select id from account_analytic_line where invoice_id=%d', (line.invoice_id.id,))
+ self.cr.execute('select id from account_analytic_line where invoice_id=%s', (line.invoice_id.id,))
tot = 0
for lid in self.cr.fetchall():
lid2 = line_obj.browse(self.cr, self.uid, lid[0])
diff --git a/addons/hr_timesheet_invoice/report/cost_ledger.py b/addons/hr_timesheet_invoice/report/cost_ledger.py
index fd328c63e49..3f0703492bd 100644
--- a/addons/hr_timesheet_invoice/report/cost_ledger.py
+++ b/addons/hr_timesheet_invoice/report/cost_ledger.py
@@ -50,7 +50,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
def _lines_g(self, account_id, date1, date2):
self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id, sum(aal.unit_amount) AS quantity \
FROM account_account AS aa, account_analytic_line AS aal \
- WHERE (aal.account_id=%d) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \
+ WHERE (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \
GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (account_id, date1, date2))
res = self.cr.dictfetchall()
@@ -69,7 +69,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
def _lines_a(self, general_account_id, account_id, date1, date2):
self.cr.execute("SELECT aal.id AS id, aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj, aal.unit_amount AS quantity \
FROM account_analytic_line AS aal, account_analytic_journal AS aaj \
- WHERE (aal.general_account_id=%d) AND (aal.account_id=%d) AND (aal.date>=%s) AND (aal.date<=%s) \
+ WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) AND (aal.date>=%s) AND (aal.date<=%s) \
AND (aal.journal_id=aaj.id) \
ORDER BY aal.date, aaj.code, aal.code", (general_account_id, account_id, date1, date2))
res = self.cr.dictfetchall()
@@ -105,11 +105,11 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
return res
def _account_sum_debit(self, account_id, date1, date2):
- self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id=%d AND date>=%s AND date<=%s AND amount>0", (account_id, date1, date2))
+ self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount>0", (account_id, date1, date2))
return self.cr.fetchone()[0] or 0.0
def _account_sum_credit(self, account_id, date1, date2):
- self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id=%d AND date>=%s AND date<=%s AND amount<0", (account_id, date1, date2))
+ self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s AND amount<0", (account_id, date1, date2))
return self.cr.fetchone()[0] or 0.0
def _account_sum_balance(self, account_id, date1, date2):
@@ -118,7 +118,7 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
return (debit-credit)
def _account_sum_qty(self, account_id, date1, date2):
- self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id=%d AND date>=%s AND date<=%s", (account_id, date1, date2))
+ self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s", (account_id, date1, date2))
return self.cr.fetchone()[0] or 0.0
def _account_sum_revenue(self, account_id):
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
index 62353018520..8b858f43ec3 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_final_invoice_create.py
@@ -79,7 +79,7 @@ class final_invoice_create(wizard.interface):
context2['lang'] = partner.lang
cr.execute("SELECT product_id, to_invoice, sum(unit_amount) " \
"FROM account_analytic_line as line " \
- "WHERE account_id = %d " \
+ "WHERE account_id = %s " \
"AND to_invoice IS NOT NULL " \
"GROUP BY product_id, to_invoice", (account.id,))
@@ -94,14 +94,14 @@ class final_invoice_create(wizard.interface):
LEFT JOIN account_move_line as move_line on (line.move_id=move_line.id)
LEFT JOIN account_analytic_journal as journal on (line.journal_id=journal.id)
WHERE
- line.account_id = %d AND
+ line.account_id = %s AND
line.move_id IS NOT NULL AND
journal.type = 'sale'
GROUP BY
line.product_id,
line.general_account_id,
line.product_uom_id,
- move_line.ref""" % (account.id))
+ move_line.ref""", (account.id,))
for product_id, amount, account_id, product_uom_id, ref in cr.fetchall():
product = pool.get('product.product').browse(cr, uid, product_id, context2)
@@ -147,7 +147,7 @@ class final_invoice_create(wizard.interface):
pool.get('account.invoice.line').create(cr, uid, curr_line)
if account.amount_max < amount_total:
pool.get('account.invoice').write(cr, uid, [last_invoice], {'type': 'out_refund',})
- cr.execute('update account_analytic_line set invoice_id=%d where invoice_id is null and account_id=%d', (last_invoice, account.id))
+ cr.execute('update account_analytic_line set invoice_id=%s where invoice_id is null and account_id=%s', (last_invoice, account.id))
return {
'domain': "[('id','in', ["+','.join(map(str,invoices))+"])]",
diff --git a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
index b85cba38bf4..f5fec52775f 100644
--- a/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
+++ b/addons/hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py
@@ -87,7 +87,7 @@ class invoice_create(wizard.interface):
context2['lang'] = partner.lang
cr.execute("SELECT product_id, to_invoice, sum(unit_amount) " \
"FROM account_analytic_line as line " \
- "WHERE account_id = %d " \
+ "WHERE account_id = %s " \
"AND id IN (" + ','.join([str(x) for x in data['ids']]) + ") " \
"AND to_invoice IS NOT NULL " \
"GROUP BY product_id,to_invoice", (account.id,))
@@ -128,7 +128,7 @@ class invoice_create(wizard.interface):
#
# Compute for lines
#
- cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %d and id IN (%s) AND product_id=%d and to_invoice=%d" % (account.id, ','.join(map(str,data['ids'])), product_id, factor_id))
+ cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN (%s) AND product_id=%s and to_invoice=%s", (account.id, ','.join(map(str,data['ids'])), product_id, factor_id))
line_ids = cr.dictfetchall()
note = []
for line in line_ids:
@@ -149,7 +149,8 @@ class invoice_create(wizard.interface):
curr_line['note'] = "\n".join(map(str,note))
pool.get('account.invoice.line').create(cr, uid, curr_line)
- cr.execute("update account_analytic_line set invoice_id=%d WHERE account_id = %d and id IN (%s)" % (last_invoice,account.id, ','.join(map(str,data['ids']))))
+ strids = ','.join(map(str, data['ids']))
+ cr.execute("update account_analytic_line set invoice_id=%%s WHERE account_id = %%s and id IN (%s)" % strids, (last_invoice,account.id,))
return {
'domain': "[('id','in', ["+','.join(map(str,invoices))+"])]",
diff --git a/addons/hr_timesheet_project/__terp__.py b/addons/hr_timesheet_project/__terp__.py
index 09cf47c5a04..c012d097f82 100644
--- a/addons/hr_timesheet_project/__terp__.py
+++ b/addons/hr_timesheet_project/__terp__.py
@@ -25,7 +25,7 @@
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
"description": """Auto-complete timesheet based on tasks made on the project management module.""",
- "website" : "http://tinyerp.com/module_hr.html",
+ "website" : "http://www.openerp.com",
"depends" : ["project", "hr_timesheet_sheet"],
"update_xml" : ["hr_timesheet_project_view.xml",
"process/hr_timesheet_project_process.xml",
diff --git a/addons/hr_timesheet_sheet/__terp__.py b/addons/hr_timesheet_sheet/__terp__.py
index fc88b99c7a4..f71492f6e9f 100644
--- a/addons/hr_timesheet_sheet/__terp__.py
+++ b/addons/hr_timesheet_sheet/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Human Resources",
- "website" : "http://tinyerp.com/module_hr.html",
+ "website" : "http://www.openerp.com",
"description": """
This module help you easily encode and validate timesheet and attendances
within the same view. The upper part of the view is for attendances and
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 4c522f0c3e3..d405dcef817 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -261,8 +261,8 @@ class hr_timesheet_sheet(osv.osv):
cr.execute('SELECT id \
FROM hr_timesheet_sheet_sheet \
WHERE (date_from < %s and %s < date_to) \
- AND user_id=%d \
- AND id <> %d', (sheet.date_to, sheet.date_from,
+ AND user_id=%s \
+ AND id <> %s', (sheet.date_to, sheet.date_from,
sheet.user_id.id, sheet.id))
if cr.fetchall():
return False
diff --git a/addons/l10n_be/__terp__.py b/addons/l10n_be/__terp__.py
index 83b9ef0d80d..608ee2c1b68 100644
--- a/addons/l10n_be/__terp__.py
+++ b/addons/l10n_be/__terp__.py
@@ -28,7 +28,7 @@
"account_chart"],
"init_xml" : [],
"description": """
- This is the base module to manage the accounting chart for Belgium in Tiny ERP.
+ This is the base module to manage the accounting chart for Belgium in Open ERP.
After Installing this module,The Configuration wizard for accounting is launched.
* We have the account templates which can be helpful to generate Charts of Accounts.
diff --git a/addons/l10n_be/wizard/partner_vat_listing.py b/addons/l10n_be/wizard/partner_vat_listing.py
index a79c3b053ce..9e76d79efb5 100644
--- a/addons/l10n_be/wizard/partner_vat_listing.py
+++ b/addons/l10n_be/wizard/partner_vat_listing.py
@@ -114,7 +114,7 @@ class wizard_vat(wizard.interface):
for p_id in p_id_list:
record=[] # this holds record per partner
obj_partner=pooler.get_pool(cr.dbname).get('res.partner').browse(cr,uid,p_id)
- cr.execute('select b.code,sum(credit)-sum(debit) from account_move_line l left join account_account a on (l.account_id=a.id) left join account_account_type b on (a.user_type=b.id) where b.code in ('"'produit'"','"'tax'"') and l.partner_id=%d and l.date between %s group by a.type'%(p_id,period))
+ cr.execute('select b.code,sum(credit)-sum(debit) from account_move_line l left join account_account a on (l.account_id=a.id) left join account_account_type b on (a.user_type=b.id) where b.code in ('"'produit'"','"'tax'"') and l.partner_id=%%s and l.date between %s group by a.type' % (period,), (p_id,))
line_info=cr.fetchall()
if not line_info:
continue
diff --git a/addons/l10n_chart_uk_minimal/__terp__.py b/addons/l10n_chart_uk_minimal/__terp__.py
index 742af32f6c8..fc998f167cf 100644
--- a/addons/l10n_chart_uk_minimal/__terp__.py
+++ b/addons/l10n_chart_uk_minimal/__terp__.py
@@ -22,10 +22,10 @@
#
# This module provides a minimal UK chart of accounts for building upon further
-# Tiny ERP's default currency and accounts are remapped to this chart
+# Open ERP's default currency and accounts are remapped to this chart
#
-# This module works for TinyERP 4.1.0 (and, assumed, onwards).
-# This module does not work for TinyERP 4.0.2 and before.
+# This module works for Open ERP 4.1.0 (and, assumed, onwards).
+# This module does not work for Open ERP 4.0.2 and before.
#
# VAT is structured thus:
# - the user company is assumed to be non-VAT exempt (easy to modify, however)
@@ -48,13 +48,13 @@
# - refunds of invoices are deducted from the output category
#
# This forms a basis for accrual tax accounting
-# Cash tax accounting can be accommodated with further processing in TinyERP
+# Cash tax accounting can be accommodated with further processing in Open ERP
#
-# Status beta 0.92 - tested on TinyERP 4.1.0
-# Status beta 0.93 - tested on TinyERP 4.1.0
+# Status beta 0.92 - tested on Open ERP 4.1.0
+# Status beta 0.93 - tested on Open ERP 4.1.0
# - trivial change to depend only on 'account'
# (seemed to be important for importing with no demo data)
-# Status 1.0 - tested on TinyERP 4.1.0, 4.0.3
+# Status 1.0 - tested on Open ERP 4.1.0, 4.0.3
# - COGS account type fixed
#
{
diff --git a/addons/l10n_fr/__terp__.py b/addons/l10n_fr/__terp__.py
index 742d5d37e11..cbd0d92e4da 100644
--- a/addons/l10n_fr/__terp__.py
+++ b/addons/l10n_fr/__terp__.py
@@ -35,7 +35,7 @@
"website": "http://erp-libre.info",
"depends" : ["base", "account", "account_chart", 'base_vat'],
"description": """
- This is the base module to manage the accounting chart for France in Tiny ERP.
+ This is the base module to manage the accounting chart for France in Open ERP.
After Installing this module,The Configuration wizard for accounting is launched.
* We have the account templates which can be helpful to generate Charts of Accounts.
diff --git a/addons/membership/membership.py b/addons/membership/membership.py
index a7049c0f204..9752fcd7737 100644
--- a/addons/membership/membership.py
+++ b/addons/membership/membership.py
@@ -181,10 +181,10 @@ class membership_line(osv.osv):
l.id = (
SELECT ml.account_invoice_line FROM
membership_membership_line ml WHERE
- ml.id = %d
+ ml.id = %s
)
)
- ''' % line.id)
+ ''', (line.id,))
fetched = cr.fetchone()
if not fetched :
res[line.id] = 'canceled'
@@ -283,7 +283,7 @@ class Partner(osv.osv):
res[id] = 'free'
if partner_data.associate_member:
assciate_partner = self.browse(cr,uid,partner_data.associate_member.id)
- cr.execute('select membership_state from res_partner where id=%d', (partner_data.id,))
+ cr.execute('select membership_state from res_partner where id=%s', (partner_data.id,))
data_partner_state = cr.fetchall()
for i in assciate_partner.member_lines:
if i.date_from <= today and i.date_to >= today and i.account_invoice_line.invoice_id.state == 'paid' and s!=0 and data_partner_state[0][0] !='free':
@@ -358,7 +358,7 @@ class Partner(osv.osv):
res = {}
member_line_obj = self.pool.get('membership.membership_line')
for partner in self.browse(cr, uid, ids):
- cr.execute('select membership_state from res_partner where id=%d', (partner.id,))
+ cr.execute('select membership_state from res_partner where id=%s', (partner.id,))
data_state = cr.fetchall()
#if partner.membership_state == 'associated':
if data_state[0][0] == 'associated':
diff --git a/addons/membership/wizard/invoice_membership.py b/addons/membership/wizard/invoice_membership.py
index dc9d5c6367d..abf8ca40f4a 100644
--- a/addons/membership/wizard/invoice_membership.py
+++ b/addons/membership/wizard/invoice_membership.py
@@ -80,8 +80,6 @@ def _invoice_membership(self, cr, uid, data, context):
if line_value['invoice_line_tax_id']:
tax_tab = [(6, 0, line_value['invoice_line_tax_id'])]
line_value['invoice_line_tax_id'] = tax_tab
- else:
- print "no tax"
invoice_line_id = invoice_line_obj.create(cr, uid, line_value)
invoice_list.append(invoice_id)
if line_value['invoice_line_tax_id']:
diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py
index 9dcaa397b14..5ea266c3a0d 100644
--- a/addons/mrp/__terp__.py
+++ b/addons/mrp/__terp__.py
@@ -23,11 +23,11 @@
"name" : "Manufacturing Resource Planning",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_mrp.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Production",
"depends" : ["stock", "hr", "purchase", "product","process"],
"description": """
- This is the base module to manage the manufacturing process in Tiny ERP.
+ This is the base module to manage the manufacturing process in Open ERP.
Features:
* Make to Stock / Make to Order (by line)
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index 36e7492d8b9..288d17f4244 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -238,7 +238,7 @@ class mrp_bom(osv.osv):
def _bom_find(self, cr, uid, product_id, product_uom, properties = []):
bom_result = False
# Why searching on BoM without parent ?
- cr.execute('select id from mrp_bom where product_id=%d and bom_id is null order by sequence', (product_id,))
+ cr.execute('select id from mrp_bom where product_id=%s and bom_id is null order by sequence', (product_id,))
ids = map(lambda x: x[0], cr.fetchall())
max_prop = 0
result = False
@@ -467,8 +467,8 @@ class mrp_production(osv.osv):
def action_compute(self, cr, uid, ids, properties=[]):
results = []
for production in self.browse(cr, uid, ids):
- cr.execute('delete from mrp_production_product_line where production_id=%d', (production.id,))
- cr.execute('delete from mrp_production_workcenter_line where production_id=%d', (production.id,))
+ cr.execute('delete from mrp_production_product_line where production_id=%s', (production.id,))
+ cr.execute('delete from mrp_production_workcenter_line where production_id=%s', (production.id,))
bom_point = production.bom_id
bom_id = production.bom_id.id
if not bom_point:
@@ -522,7 +522,7 @@ class mrp_production(osv.osv):
for move in production.move_created_ids:
#XXX must use the orm
cr.execute('INSERT INTO stock_move_history_ids \
- (parent_id, child_id) VALUES (%d,%d)',
+ (parent_id, child_id) VALUES (%s,%s)',
(res.id, move.id))
move_ids.append(res.id)
vals= {'state':'confirmed'}
@@ -874,7 +874,7 @@ class mrp_procurement(osv.osv):
properties = [x.id for x in procurement.property_ids]
bom_id = self.pool.get('mrp.bom')._bom_find(cr, uid, procurement.product_id.id, procurement.product_uom.id, properties)
if not bom_id:
- cr.execute('update mrp_procurement set message=%s where id=%d', (_('No BoM defined for this product !'), procurement.id))
+ cr.execute('update mrp_procurement set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id))
return False
return True
@@ -912,7 +912,7 @@ class mrp_procurement(osv.osv):
if procurement.product_id.product_tmpl_id.supply_method<>'buy':
return False
if not procurement.product_id.seller_ids:
- cr.execute('update mrp_procurement set message=%s where id=%d', (_('No supplier defined for this product !'), procurement.id))
+ cr.execute('update mrp_procurement set message=%s where id=%s', (_('No supplier defined for this product !'), procurement.id))
return False
partner = procurement.product_id.seller_ids[0].name
if user.company_id and user.company_id.partner_id:
@@ -920,7 +920,7 @@ class mrp_procurement(osv.osv):
return False
address_id = self.pool.get('res.partner').address_get(cr, uid, [partner.id], ['delivery'])['delivery']
if not address_id:
- cr.execute('update mrp_procurement set message=%s where id=%d', (_('No address defined for the supplier'), procurement.id))
+ cr.execute('update mrp_procurement set message=%s where id=%s', (_('No address defined for the supplier'), procurement.id))
return False
return True
@@ -968,9 +968,9 @@ class mrp_procurement(osv.osv):
id = procurement.move_id.id
if not (procurement.move_id.state in ('done','assigned','cancel')):
ok = ok and self.pool.get('stock.move').action_assign(cr, uid, [id])
- cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%d', (procurement.product_id.id,))
+ cr.execute('select count(id) from stock_warehouse_orderpoint where product_id=%s', (procurement.product_id.id,))
if not cr.fetchone()[0]:
- cr.execute('update mrp_procurement set message=%s where id=%d', (_('from stock and no minimum orderpoint rule defined'), procurement.id))
+ cr.execute('update mrp_procurement set message=%s where id=%s', (_('from stock and no minimum orderpoint rule defined'), procurement.id))
return ok
def action_produce_assign_service(self, cr, uid, ids, context={}):
diff --git a/addons/mrp/report/custom_default.xsl b/addons/mrp/report/custom_default.xsl
index 7082392aed6..ce9ea180613 100644
--- a/addons/mrp/report/custom_default.xsl
+++ b/addons/mrp/report/custom_default.xsl
@@ -2,7 +2,7 @@
Axair
- Tiny ERP Report
+ Open ERP Report1cm1cm1cm
diff --git a/addons/mrp/report/custom_rml.xsl b/addons/mrp/report/custom_rml.xsl
index afc8c3d9a92..96d4f003f0c 100644
--- a/addons/mrp/report/custom_rml.xsl
+++ b/addons/mrp/report/custom_rml.xsl
@@ -7,7 +7,7 @@
-
+
diff --git a/addons/mrp/report/price.py b/addons/mrp/report/price.py
index 5342e5b9e87..1d93704d71d 100644
--- a/addons/mrp/report/price.py
+++ b/addons/mrp/report/price.py
@@ -113,7 +113,7 @@ class report_custom(report_rml):
60.00mm,60.00mm, 20.00mm, 20.00mm, 20.00mm, 20.00mm
"""
config_stop = """
- Generated by Tiny ERP
+ Generated by Open ERP
"""
header = """
diff --git a/addons/mrp/report/workcenter_load.py b/addons/mrp/report/workcenter_load.py
index 820654b821e..41ff23786a8 100644
--- a/addons/mrp/report/workcenter_load.py
+++ b/addons/mrp/report/workcenter_load.py
@@ -148,7 +148,7 @@ class report_custom(report_int):
FROM mrp_production_workcenter_line, mrp_production, mrp_workcenter \
WHERE (mrp_production_workcenter_line.production_id=mrp_production.id) \
AND (mrp_production_workcenter_line.workcenter_id=mrp_workcenter.id) \
- AND (mrp_workcenter.id=%d) \
+ AND (mrp_workcenter.id=%s) \
AND (mrp_production.date_planned BETWEEN %s AND %s) \
GROUP BY mrp_production_workcenter_line.workcenter_id, mrp_workcenter.name, mrp_workcenter.id \
ORDER BY mrp_workcenter.id", (workcenter['id'], dates[date]['start'] + ' 00:00:00', dates[date]['stop'] + ' 23:59:59'))
diff --git a/addons/mrp/schedulers.py b/addons/mrp/schedulers.py
index a15cc9c42c7..6e97ba30b1e 100644
--- a/addons/mrp/schedulers.py
+++ b/addons/mrp/schedulers.py
@@ -56,7 +56,7 @@ class mrp_procurement(osv.osv):
report_except = 0
report_later = 0
while True:
- cr.execute('select id from mrp_procurement where state=%s and procure_method=%s order by date_planned limit 500 offset %d', ('confirmed','make_to_order',offset))
+ cr.execute('select id from mrp_procurement where state=%s and procure_method=%s order by date_planned limit 500 offset %s', ('confirmed','make_to_order',offset))
ids = map(lambda x:x[0], cr.fetchall())
for proc in procurement_obj.browse(cr, uid, ids):
if maxdate.strftime('%Y-%m-%d')>=proc.date_planned:
diff --git a/addons/mrp_operations/__terp__.py b/addons/mrp_operations/__terp__.py
index ebf2da8a83a..9d3a61fac38 100755
--- a/addons/mrp_operations/__terp__.py
+++ b/addons/mrp_operations/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Workcenter Production start end workflow",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_mrp.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Production",
"depends" : ["stock", "hr", "purchase", "product", "mrp"],
"description": """
diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py
index 9725f7ae425..fbdd19a45f8 100644
--- a/addons/mrp_subproduct/__terp__.py
+++ b/addons/mrp_subproduct/__terp__.py
@@ -23,7 +23,7 @@
"name" : "MRP Sub Product",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_stock.html",
+ "website" : "http://www.openerp.com",
"depends" : ["base","mrp"],
"category" : "Generic Modules/Production",
"init_xml" : [],
diff --git a/addons/point_of_sale/report/pos_receipt.py b/addons/point_of_sale/report/pos_receipt.py
index 85896098987..0cb68398515 100644
--- a/addons/point_of_sale/report/pos_receipt.py
+++ b/addons/point_of_sale/report/pos_receipt.py
@@ -41,14 +41,14 @@ class order(report_sxw.rml_parse):
})
def netamount(self, order_line_id):
- sql = 'select (qty*price_unit) as net_price from pos_order_line where id = %d '
- self.cr.execute(sql%(order_line_id))
+ sql = 'select (qty*price_unit) as net_price from pos_order_line where id = %s'
+ self.cr.execute(sql, (order_line_id,))
res = self.cr.fetchone()
return res[0]
def discount(self, order_id):
- sql = 'select discount, price_unit, qty from pos_order_line where order_id = %d '
- self.cr.execute(sql%(order_id))
+ sql = 'select discount, price_unit, qty from pos_order_line where order_id = %s '
+ self.cr.execute(sql, (order_id,))
res = self.cr.fetchall()
dsum = 0
for line in res:
diff --git a/addons/process/__terp__.py b/addons/process/__terp__.py
index 5fc719ddc5d..96c115279be 100644
--- a/addons/process/__terp__.py
+++ b/addons/process/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Enterprise Process",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Base",
"description": """
This module allows you to manage your process for the end-users.
diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py
index 79c07240395..1742af513ba 100644
--- a/addons/product/__terp__.py
+++ b/addons/product/__terp__.py
@@ -28,7 +28,7 @@
"init_xml" : [],
"demo_xml" : ["product_demo.xml"],
"description": """
- This is the base module to manage products and pricelists in Tiny ERP.
+ This is the base module to manage products and pricelists in Open ERP.
Products support variants, different pricing methods, suppliers
information, make to stock/order, different unit of measures,
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 8df19271288..a8509f1c06f 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -130,7 +130,7 @@ class product_pricelist(osv.osv):
for id in ids:
cr.execute('SELECT * ' \
'FROM product_pricelist_version ' \
- 'WHERE pricelist_id = %d AND active=True ' \
+ 'WHERE pricelist_id = %s AND active=True ' \
'AND (date_start IS NULL OR date_start <= %s) ' \
'AND (date_end IS NULL OR date_end >= %s) ' \
'ORDER BY id LIMIT 1', (id, date, date))
@@ -145,14 +145,14 @@ class product_pricelist(osv.osv):
'FROM product_template ' \
'WHERE id = (SELECT product_tmpl_id ' \
'FROM product_product ' \
- 'WHERE id = %d)', (prod_id,))
+ 'WHERE id = %s)', (prod_id,))
tmpl_id, categ = cr.fetchone()
categ_ids = []
while categ:
categ_ids.append(str(categ))
cr.execute('SELECT parent_id ' \
'FROM product_category ' \
- 'WHERE id = %d', (categ,))
+ 'WHERE id = %s', (categ,))
categ = cr.fetchone()[0]
if str(categ) in categ_ids:
raise osv.except_osv(_('Warning !'),
@@ -168,11 +168,11 @@ class product_pricelist(osv.osv):
'SELECT i.*, pl.currency_id '
'FROM product_pricelist_item AS i, '
'product_pricelist_version AS v, product_pricelist AS pl '
- 'WHERE (product_tmpl_id IS NULL OR product_tmpl_id = %d) '
- 'AND (product_id IS NULL OR product_id = %d) '
+ 'WHERE (product_tmpl_id IS NULL OR product_tmpl_id = %s) '
+ 'AND (product_id IS NULL OR product_id = %s) '
'AND (' + categ_where + ' OR (categ_id IS NULL)) '
- 'AND price_version_id = %d '
- 'AND (min_quantity IS NULL OR min_quantity <= %f) '
+ 'AND price_version_id = %s '
+ 'AND (min_quantity IS NULL OR min_quantity <= %s) '
'AND i.price_version_id = v.id AND v.pricelist_id = pl.id '
'ORDER BY sequence LIMIT 1',
(tmpl_id, prod_id, plversion['id'], qty))
@@ -201,7 +201,7 @@ class product_pricelist(osv.osv):
'FROM pricelist_partnerinfo ' \
'WHERE suppinfo_id IN (' + \
','.join(map(str, sinfo)) + ') ' \
- 'AND min_quantity <= %f ' \
+ 'AND min_quantity <= %s ' \
'ORDER BY min_quantity DESC LIMIT 1', (qty,))
res2 = cr.dictfetchone()
if res2:
@@ -275,9 +275,9 @@ class product_pricelist_version(osv.osv):
'OR (%s = \'0000-01-01\' AND %s = \'0000-01-01\') ' \
'OR (%s = \'0000-01-01\' AND date_start <= %s) ' \
'OR (%s = \'0000-01-01\' AND %s <= date_end)) ' \
- 'AND pricelist_id = %d ' \
+ 'AND pricelist_id = %s ' \
'AND active ' \
- 'AND id <> %d', (pricelist_version.date_end or '0000-01-01',
+ 'AND id <> %s', (pricelist_version.date_end or '0000-01-01',
pricelist_version.date_start or '0000-01-01',
pricelist_version.date_end or '0000-01-01',
pricelist_version.date_start or '0000-01-01',
diff --git a/addons/product/report/product_label.xsl b/addons/product/report/product_label.xsl
index 5c52e21227f..2df7e8d3e2c 100644
--- a/addons/product/report/product_label.xsl
+++ b/addons/product/report/product_label.xsl
@@ -15,7 +15,7 @@
-
+
diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py
index a698d4e0827..3668c7d7470 100644
--- a/addons/project/__terp__.py
+++ b/addons/project/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Project Management",
"version": "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_project.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Projects & Services",
"depends" : ["product", "account", "hr", "process"],
"description": "Project management module that track multi-level projects, tasks, works done on tasks, eso. It is able to render planning, order tasks, eso.",
diff --git a/addons/project/project.py b/addons/project/project.py
index 4d9261f2ea0..41e6750ecc3 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -153,11 +153,11 @@ class project(osv.osv):
for proj in self.browse(cr, uid, ids):
parent_id=context.get('parent_id',False)
new_id=self.pool.get('project.project').copy(cr, uid, proj.id,default={'name':proj.name+_(' (copy)'),'state':'open','parent_id':parent_id})
- cr.execute('select id from project_task where project_id=%d', (proj.id,))
+ cr.execute('select id from project_task where project_id=%s', (proj.id,))
res = cr.fetchall()
for (tasks_id,) in res:
self.pool.get('project.task').copy(cr, uid, tasks_id,default={'project_id':new_id,'active':True}, context=context)
- cr.execute('select id from project_project where parent_id=%d', (proj.id,))
+ cr.execute('select id from project_project where parent_id=%s', (proj.id,))
res = cr.fetchall()
project_ids = [x[0] for x in res]
for child in project_ids:
@@ -172,11 +172,11 @@ class project(osv.osv):
def setActive(self, cr, uid, ids, value=True, context={}):
for proj in self.browse(cr, uid, ids, context):
self.write(cr, uid, [proj.id], {'state': value and 'open' or 'template'}, context)
- cr.execute('select id from project_task where project_id=%d', (proj.id,))
+ cr.execute('select id from project_task where project_id=%s', (proj.id,))
tasks_id = [x[0] for x in cr.fetchall()]
if tasks_id:
self.pool.get('project.task').write(cr, uid, tasks_id, {'active': value}, context)
- cr.execute('select id from project_project where parent_id=%d', (proj.id,))
+ cr.execute('select id from project_project where parent_id=%s', (proj.id,))
project_ids = [x[0] for x in cr.fetchall()]
for child in project_ids:
self.setActive(cr, uid, [child], value, context)
@@ -410,17 +410,17 @@ class project_work(osv.osv):
_order = "date desc"
def create(self, cr, uid, vals, *args, **kwargs):
if 'task_id' in vals:
- cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%d', (-vals.get('hours',0.0), vals['task_id']))
+ cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%s', (-vals.get('hours',0.0), vals['task_id']))
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
def write(self, cr, uid, ids,vals,context={}):
for work in self.browse(cr, uid, ids, context):
- cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2f) where id=%d', (-vals.get('hours',0.0), work.hours, work.task_id.id))
+ cr.execute('update project_task set remaining_hours=remaining_hours+%.2f+(%.2f) where id=%s', (-vals.get('hours',0.0), work.hours, work.task_id.id))
return super(project_work,self).write(cr, uid, ids, vals, context)
def unlink(self, cr, uid, ids, *args, **kwargs):
for work in self.browse(cr, uid, ids):
- cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%d', (work.hours, work.task_id.id))
+ cr.execute('update project_task set remaining_hours=remaining_hours+%.2f where id=%s', (work.hours, work.task_id.id))
return super(project_work,self).unlink(cr, uid, ids,*args, **kwargs)
project_work()
diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml
index ea6803bf302..84ed9925148 100644
--- a/addons/project/project_demo.xml
+++ b/addons/project/project_demo.xml
@@ -21,7 +21,7 @@
1
- Tiny ERP Integration
+ Open ERP Integration
diff --git a/addons/project/report/gantt.py b/addons/project/report/gantt.py
index fb426a098a3..8fc83070adb 100644
--- a/addons/project/report/gantt.py
+++ b/addons/project/report/gantt.py
@@ -31,7 +31,7 @@ class GanttCanvas(object):
def __init__(self, io, convertors=(lambda x:x,lambda x:x)):
self._datas = {}
self._canvas = canvas.init(fname=io, format='pdf')
- self._canvas.set_author("Tiny ERP")
+ self._canvas.set_author("Open ERP")
self._names = {}
self._conv = convertors
self._min = 0
diff --git a/addons/project/report/project_report.xsl b/addons/project/report/project_report.xsl
index c0b475805c7..ece65ee7503 100644
--- a/addons/project/report/project_report.xsl
+++ b/addons/project/report/project_report.xsl
@@ -6,7 +6,7 @@
-
+
diff --git a/addons/project_gtd/wizard/project_gtd_empty.py b/addons/project_gtd/wizard/project_gtd_empty.py
index 46bf8db8888..766f8da672c 100644
--- a/addons/project_gtd/wizard/project_gtd_empty.py
+++ b/addons/project_gtd/wizard/project_gtd_empty.py
@@ -42,10 +42,8 @@ class wiz_timebox_empty(wizard.interface):
else:
up.append(task.id)
if up:
- print 'UP', up
pool.get('project.task').write(cr, uid, up, {'timebox_id':ids[0]})
if close:
- print 'CLOSE', close
pool.get('project.task').write(cr, uid, close, {'timebox_id':False})
return {}
diff --git a/addons/project_mrp/__terp__.py b/addons/project_mrp/__terp__.py
index 10c82d6fc2a..e7e9a547a53 100644
--- a/addons/project_mrp/__terp__.py
+++ b/addons/project_mrp/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Project Management - MRP Link",
"version": "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_project.html",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Projects & Services",
"depends" : ["project", 'mrp', "sale", "mrp_jit"],
"description": """
diff --git a/addons/project_timesheet/__terp__.py b/addons/project_timesheet/__terp__.py
index 22f34691b1a..b883fea0c23 100644
--- a/addons/project_timesheet/__terp__.py
+++ b/addons/project_timesheet/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Project Timesheet",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"category" : "Generic Modules/Human Resources",
"description": """
This module lets you transfer the entries under tasks defined for Project Management to
diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py
index 58d932e6617..7900d753dbd 100644
--- a/addons/purchase/__terp__.py
+++ b/addons/purchase/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Purchase Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_purchase.html",
+ "website" : "http://www.openerp.com",
"depends" : ["base", "account", "stock", "process"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index d13901574e5..c0c4e5c8dad 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -86,7 +86,7 @@ class purchase_order(osv.osv):
cr.execute("""update purchase_order_line set
date_planned=%s
where
- order_id=%d and
+ order_id=%s and
(date_planned=%s or date_planned<%s)""", (value,po.id,po.minimum_planned_date,value))
return True
diff --git a/addons/purchase/report/order.py b/addons/purchase/report/order.py
index 2447f618955..c86e1813730 100644
--- a/addons/purchase/report/order.py
+++ b/addons/purchase/report/order.py
@@ -35,7 +35,7 @@ class order(report_sxw.rml_parse):
'get_product_code': self._get_product_code,
})
def _get_line_tax(self, line_obj):
- self.cr.execute("SELECT tax_id FROM purchase_order_taxe WHERE order_line_id=%d" % (line_obj.id))
+ self.cr.execute("SELECT tax_id FROM purchase_order_taxe WHERE order_line_id=%s", (line_obj.id))
res = self.cr.fetchall() or None
if not res:
return ""
@@ -48,7 +48,7 @@ class order(report_sxw.rml_parse):
def _get_tax(self, order_obj):
self.cr.execute("SELECT DISTINCT tax_id FROM purchase_order_taxe, purchase_order_line, purchase_order \
- WHERE (purchase_order_line.order_id=purchase_order.id) AND (purchase_order.id=%d)" % (order_obj.id))
+ WHERE (purchase_order_line.order_id=purchase_order.id) AND (purchase_order.id=%s)", (order_obj.id))
res = self.cr.fetchall() or None
if not res:
return []
@@ -60,7 +60,7 @@ class order(report_sxw.rml_parse):
res = []
for tax in tax_obj.browse(self.cr, self.uid, tax_ids):
self.cr.execute("SELECT DISTINCT order_line_id FROM purchase_order_line, purchase_order_taxe \
- WHERE (purchase_order_taxe.tax_id=%d) AND (purchase_order_line.order_id=%d)" % (tax.id, order_obj.id))
+ WHERE (purchase_order_taxe.tax_id=%s) AND (purchase_order_line.order_id=%s)", (tax.id, order_obj.id))
lines = self.cr.fetchall() or None
if lines:
if isinstance(lines, list):
diff --git a/addons/purchase_analytic_plans/__terp__.py b/addons/purchase_analytic_plans/__terp__.py
index 1d0424d02d3..f8fd503a0cc 100644
--- a/addons/purchase_analytic_plans/__terp__.py
+++ b/addons/purchase_analytic_plans/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Purchase Analytic Distribution Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["purchase","account_analytic_plans"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
diff --git a/addons/report_account/__terp__.py b/addons/report_account/__terp__.py
index aa0b454ed5d..0362a969c4d 100644
--- a/addons/report_account/__terp__.py
+++ b/addons/report_account/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Account Reporting - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["account"],
"category" : "Generic Modules/Accounting",
"description": "A module that adds new reports based on the account module.",
diff --git a/addons/report_analytic/__terp__.py b/addons/report_analytic/__terp__.py
index bd5406b709b..dbe511c37a5 100644
--- a/addons/report_analytic/__terp__.py
+++ b/addons/report_analytic/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Analytic Account Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["account","hr_timesheet_invoice"],
"category" : "Generic Modules/Accounting",
"description": "A module that adds new reports based on analytic accounts.",
diff --git a/addons/report_analytic_line/__terp__.py b/addons/report_analytic_line/__terp__.py
index c900f722191..401e095bb76 100644
--- a/addons/report_analytic_line/__terp__.py
+++ b/addons/report_analytic_line/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Analytic lines - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["account", "hr_timesheet_invoice"],
"category" : "Generic Modules/Accounting",
"description": "A report on analytic lines, costs by products, months and accounts.",
diff --git a/addons/report_analytic_planning/__terp__.py b/addons/report_analytic_planning/__terp__.py
index 4b8f54afa47..e73b46151af 100644
--- a/addons/report_analytic_planning/__terp__.py
+++ b/addons/report_analytic_planning/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Analytic planning - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["account", "hr_timesheet_invoice","project","report_analytic_line"],
"category" : "Generic Modules/Accounting",
"description": "Planning on analytic accounts.",
diff --git a/addons/report_analytic_planning/report_analytic_planning.py b/addons/report_analytic_planning/report_analytic_planning.py
index 3a5a9c1815f..7e7d687aa25 100644
--- a/addons/report_analytic_planning/report_analytic_planning.py
+++ b/addons/report_analytic_planning/report_analytic_planning.py
@@ -73,7 +73,7 @@ class report_account_analytic_planning_stat_account(osv.osv):
def _sum_amount_real(self, cr, uid, ids, name, args, context):
result = {}
for line in self.browse(cr, uid, ids, context):
- cr.execute('select sum(unit_amount) from account_analytic_line where account_id=%d and date>=%s and date<=%s', (line.account_id.id,line.planning_id.date_from,line.planning_id.date_to))
+ cr.execute('select sum(unit_amount) from account_analytic_line where account_id=%s and date>=%s and date<=%s', (line.account_id.id,line.planning_id.date_from,line.planning_id.date_to))
result[line.id] = cr.fetchone()[0]
return result
_columns = {
@@ -110,9 +110,9 @@ class report_account_analytic_planning_stat(osv.osv):
result = {}
for line in self.browse(cr, uid, ids, context):
if line.user_id:
- cr.execute('select sum(unit_amount) from account_analytic_line where user_id=%d and account_id=%d and date>=%s and date<=%s', (line.user_id.id,line.account_id.id,line.planning_id.date_from,line.planning_id.date_to))
+ cr.execute('select sum(unit_amount) from account_analytic_line where user_id=%s and account_id=%s and date>=%s and date<=%s', (line.user_id.id,line.account_id.id,line.planning_id.date_from,line.planning_id.date_to))
else:
- cr.execute('select sum(unit_amount) from account_analytic_line where account_id=%d and date>=%s and date<=%s', (line.account_id.id,line.planning_id.date_from,line.planning_id.date_to))
+ cr.execute('select sum(unit_amount) from account_analytic_line where account_id=%s and date>=%s and date<=%s', (line.account_id.id,line.planning_id.date_from,line.planning_id.date_to))
result[line.id] = cr.fetchone()[0]
return result
def _sum_amount_tasks(self, cr, uid, ids, name, args, context):
@@ -127,7 +127,7 @@ class report_account_analytic_planning_stat(osv.osv):
project_task
where
'''+where+'''
- project_id in (select id from project_project where category_id=%d) and
+ project_id in (select id from project_project where category_id=%s) and
date_close>=%s and
date_close<=%s''', (
line.account_id.id,
@@ -179,7 +179,7 @@ class report_account_analytic_planning_stat_user(osv.osv):
for line in self.browse(cr, uid, ids, context):
result[line.id] = 0.0
if line.user_id:
- cr.execute('select sum(unit_amount) from account_analytic_line where user_id=%d and date>=%s and date<=%s', (line.user_id.id,line.planning_id.date_from,line.planning_id.date_to))
+ cr.execute('select sum(unit_amount) from account_analytic_line where user_id=%s and date>=%s and date<=%s', (line.user_id.id,line.planning_id.date_from,line.planning_id.date_to))
result[line.id] = cr.fetchone()[0]
return result
_columns = {
diff --git a/addons/report_crm/__terp__.py b/addons/report_crm/__terp__.py
index 74c88a334f6..c26590cbc30 100644
--- a/addons/report_crm/__terp__.py
+++ b/addons/report_crm/__terp__.py
@@ -23,7 +23,7 @@
"name" : "CRM Management - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_crm.html",
+ "website" : "http://www.openerp.com",
"depends" : ["crm"],
"category" : "Generic Modules/CRM & SRM",
"description": "A module that adds new reports based on CRM cases.",
diff --git a/addons/report_document/report_document_view.xml b/addons/report_document/report_document_view.xml
index bc909dbdded..8dcd9e087bc 100644
--- a/addons/report_document/report_document_view.xml
+++ b/addons/report_document/report_document_view.xml
@@ -209,10 +209,10 @@
report.document.usertree
-
+
-
+
diff --git a/addons/report_intrastat/__terp__.py b/addons/report_intrastat/__terp__.py
index 4b188266bbb..e93a504824b 100644
--- a/addons/report_intrastat/__terp__.py
+++ b/addons/report_intrastat/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Intrastat Reporting - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["base", "product", "stock", "sale", "purchase"],
"category" : "Generic Modules/Inventory Control",
"description": "A module that adds intrastat reports.",
diff --git a/addons/report_mrp/__terp__.py b/addons/report_mrp/__terp__.py
index 8e8074189ce..11edbfad670 100644
--- a/addons/report_mrp/__terp__.py
+++ b/addons/report_mrp/__terp__.py
@@ -23,7 +23,7 @@
"name": "MRP Management - Reporting",
"version": "1.0",
"author": "Tiny",
- "website": "http://tinyerp.com/module_mrp.html",
+ "website": "http://www.openerp.com",
"depends": ["mrp"],
"category": "Generic Modules/Production",
"description": "A module that adds new reports based on MRP cases.",
diff --git a/addons/report_project/__terp__.py b/addons/report_project/__terp__.py
index efef3e3929d..ad3cf74399f 100644
--- a/addons/report_project/__terp__.py
+++ b/addons/report_project/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Sales Management - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_project.html",
+ "website" : "http://www.openerp.com",
"depends" : ["project", "report_task"],
"category" : "Generic Modules/Sales & Purchases",
"description": "A module that adds some reports on the sales",
diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py
index d3901b86fba..c74a09ca3e8 100644
--- a/addons/report_purchase/__terp__.py
+++ b/addons/report_purchase/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Sales Management - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_purchase.html",
+ "website" : "http://www.openerp.com",
"depends" : ["purchase"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
diff --git a/addons/report_sale/__terp__.py b/addons/report_sale/__terp__.py
index 43adebe34be..033d2113fc3 100644
--- a/addons/report_sale/__terp__.py
+++ b/addons/report_sale/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Sales Management - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["sale"],
"category" : "Generic Modules/Sales & Purchases",
"description": """
diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py
index fe84d2233d5..73792922a70 100644
--- a/addons/report_timesheet/__terp__.py
+++ b/addons/report_timesheet/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Timesheet - Reporting",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com",
+ "website" : "http://www.openerp.com",
"depends" : ["hr_timesheet",'hr_timesheet_invoice'],
"category" : "Generic Modules/Human Resources",
"init_xml" : [],
diff --git a/addons/sale/__terp__.py b/addons/sale/__terp__.py
index 01d95b53387..ce66406d9b1 100644
--- a/addons/sale/__terp__.py
+++ b/addons/sale/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Sales Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["product", "stock", "mrp", "process"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
diff --git a/addons/sale/report/shipping.py b/addons/sale/report/shipping.py
index 0fa1ed6158a..bddd3a32170 100644
--- a/addons/sale/report/shipping.py
+++ b/addons/sale/report/shipping.py
@@ -42,7 +42,7 @@ class shipping(report_sxw.rml_parse):
"and so.partner_id=rp.id " \
"and so.partner_invoice_id=rpa.id " \
"and rpa.country_id=rc.id " \
- "and sp.id=%d "%(data.id))
+ "and sp.id=%s", (data.id,))
add=self.cr.dictfetchall()
return add
@@ -55,7 +55,7 @@ class shipping(report_sxw.rml_parse):
"and so.partner_id=rp.id " \
"and so.partner_shipping_id=rpa.id " \
"and rpa.country_id=rc.id " \
- "and sp.id=%d "%(data.id))
+ "and sp.id=%s", (data.id,))
ship=self.cr.dictfetchall()
return ship
@@ -67,8 +67,8 @@ class shipping(report_sxw.rml_parse):
# "LEFT JOIN stock_move sm ON (sp.id = sm.picking_id) "\
# "LEFT JOIN product_product pp ON (sm.product_id = pp.id) "\
# "LEFT JOIN product_template pt ON (pp.product_tmpl_id = pt.id) "\
-# "WHERE sm.picking_id = %d "%(data['id']))
+# "WHERE sm.picking_id = %s", (data['id'],))
# sum_total = self.cr.fetchone()[0] or 0.00
# return True
-report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/sale/report/shipping.rml',parser=shipping)
\ No newline at end of file
+report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/sale/report/shipping.rml',parser=shipping)
diff --git a/addons/sale_analytic_plans/__terp__.py b/addons/sale_analytic_plans/__terp__.py
index 61b9a1d93e6..520b228d80a 100644
--- a/addons/sale_analytic_plans/__terp__.py
+++ b/addons/sale_analytic_plans/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Sales Analytic Distribution Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["sale","account_analytic_plans"],
"category" : "Generic Modules/Sales & Purchases",
"init_xml" : [],
diff --git a/addons/sale_crm/__terp__.py b/addons/sale_crm/__terp__.py
index 73ff2daeac1..72fbe254e11 100644
--- a/addons/sale_crm/__terp__.py
+++ b/addons/sale_crm/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Sale CRM Stuff",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["sale", "crm_configuration"],
"category" : "Generic Modules/Sales & Purchases",
"description": """
diff --git a/addons/sale_journal/__terp__.py b/addons/sale_journal/__terp__.py
index 8797f964331..a258f5dac1a 100644
--- a/addons/sale_journal/__terp__.py
+++ b/addons/sale_journal/__terp__.py
@@ -24,7 +24,7 @@
"version" : "1.0",
"author" : "Tiny",
"category" : "Generic Modules/Sales & Purchases",
- "website": "http://www.tinyerp.com",
+ "website": "http://www.openerp.com",
"depends" : ["stock","sale"],
"demo_xml" : ['sale_journal_demo.xml'],
"init_xml" : ['sale_journal_data.xml'],
diff --git a/addons/scrum/report/sprint_burndown.py b/addons/scrum/report/sprint_burndown.py
index 1ceeb5a93df..9b07960ac7e 100644
--- a/addons/scrum/report/sprint_burndown.py
+++ b/addons/scrum/report/sprint_burndown.py
@@ -47,14 +47,14 @@ class report_tasks(report_int):
io = StringIO.StringIO()
canv = canvas.init(fname=io, format='pdf')
- canv.set_author("Tiny ERP")
+ canv.set_author("Open ERP")
- cr.execute('select id,date_start,date_stop from scrum_sprint where id=%d', (datas['id'],))
+ cr.execute('select id,date_start,date_stop from scrum_sprint where id=%s', (datas['id'],))
for (id,date_start,date_stop) in cr.fetchall():
date_to_int = lambda x: int(x.ticks())
int_to_date = lambda x: '/a60{}'+DateTime.localtime(x).strftime('%d/%m/%Y')
- cr.execute('select id from project_task where product_backlog_id in(select id from scrum_product_backlog where sprint_id=%d)', (id,))
+ cr.execute('select id from project_task where product_backlog_id in(select id from scrum_product_backlog where sprint_id=%s)', (id,))
ids = map(lambda x: x[0], cr.fetchall())
datas = _burndown.compute_burndown(cr, uid, ids, date_start, date_stop)
diff --git a/addons/scrum/report/task_burndown.py b/addons/scrum/report/task_burndown.py
index 12ad09c7ea3..0730352f9bf 100644
--- a/addons/scrum/report/task_burndown.py
+++ b/addons/scrum/report/task_burndown.py
@@ -91,7 +91,7 @@ class report_tasks(report_int):
datas = _burndown.compute_burndown(cr, uid, ids, datas['date_start'], datas['date_stop'])
canv = canvas.init(fname=io, format='pdf')
- canv.set_author("Tiny ERP")
+ canv.set_author("Open ERP")
max_hour = reduce(lambda x,y: max(y[1],x), datas, 0)
diff --git a/addons/scrum/scrum_demo.xml b/addons/scrum/scrum_demo.xml
index c3b6d392cf2..f58bfbe4a34 100644
--- a/addons/scrum/scrum_demo.xml
+++ b/addons/scrum/scrum_demo.xml
@@ -9,7 +9,7 @@
[24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 36, 38]156.0
- Tiny ERP - dev branch
+ Open ERP - dev branch
@@ -32,21 +32,21 @@
3Automatic migration system
- This new system will enable you to migrate automatically from an old version of Tiny ERP to a new one. This system will migrate not only the Tiny ERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of Tiny ERP components.
+ This new system will enable you to migrate automatically from an old version of Open ERP to a new one. This system will migrate not only the Open ERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of Open ERP components. 3New accounting module
- The accounting module of Tiny ERP (financial accounting and management accounting) is being reshaped. New functionnalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports.
+ The accounting module of Open ERP (financial accounting and management accounting) is being reshaped. New functionnalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. 3Automated Plugin System to install/uninstall modules
- We have to develop a plug-in system which will enable to install/remove modules. The basic version of Tiny ERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on...
+ We have to develop a plug-in system which will enable to install/remove modules. The basic version of Open ERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on...
@@ -62,13 +62,13 @@
Test for 3.2.0 Publishing
- Test Tiny ERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)
+ Test Open ERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)Reshape the complete menu
- Restrucutre the Tiny ERP menu to be more like others ERP.
+ Restrucutre the Open ERP menu to be more like others ERP.
diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py
index 1937aad9428..dc09385b09f 100644
--- a/addons/stock/__terp__.py
+++ b/addons/stock/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Stock Management",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_stock.html",
+ "website" : "http://www.openerp.com",
"depends" : ["product", "account"],
"category" : "Generic Modules/Inventory Control",
"init_xml" : [],
diff --git a/addons/stock/product.py b/addons/stock/product.py
index 35e49f5f95e..b43275b7961 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -45,13 +45,13 @@ class product_product(osv.osv):
return res
if context.get('shop', False):
- cr.execute('select warehouse_id from sale_shop where id=%d', (int(context['shop']),))
+ cr.execute('select warehouse_id from sale_shop where id=%s', (int(context['shop']),))
res2 = cr.fetchone()
if res2:
context['warehouse'] = res2[0]
if context.get('warehouse', False):
- cr.execute('select lot_stock_id from stock_warehouse where id=%d', (int(context['warehouse']),))
+ cr.execute('select lot_stock_id from stock_warehouse where id=%s', (int(context['warehouse']),))
res2 = cr.fetchone()
if res2:
context['location'] = res2[0]
diff --git a/addons/stock/report/lot_move_label.xsl b/addons/stock/report/lot_move_label.xsl
index 1a6c65b8b0f..57b29e69405 100644
--- a/addons/stock/report/lot_move_label.xsl
+++ b/addons/stock/report/lot_move_label.xsl
@@ -15,7 +15,7 @@
-
+
diff --git a/addons/stock/report/stock_by_location.py b/addons/stock/report/stock_by_location.py
index 75c70400613..ccd048261b8 100644
--- a/addons/stock/report/stock_by_location.py
+++ b/addons/stock/report/stock_by_location.py
@@ -36,7 +36,7 @@ class report_custom(report_rml):
841.8860.00mm,60.00mm,60.00mmStock by location
- Generated by Tiny ERP
+ Generated by Open ERP
"""
header = """
diff --git a/addons/stock/report/stock_graph.py b/addons/stock/report/stock_graph.py
index ac5ae5f2718..ee8ab243260 100644
--- a/addons/stock/report/stock_graph.py
+++ b/addons/stock/report/stock_graph.py
@@ -32,7 +32,7 @@ class stock_graph(object):
def __init__(self, io):
self._datas = {}
self._canvas = canvas.init(fname=io, format='pdf')
- self._canvas.set_author("Tiny ERP")
+ self._canvas.set_author("Open ERP")
self._names = {}
self.val_min = ''
self.val_max = ''
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 9d71666b104..4e5463b5245 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -234,9 +234,9 @@ class stock_location(osv.osv):
result = []
amount = 0.0
for id in self.search(cr, uid, [('location_id', 'child_of', ids)]):
- cr.execute("select product_uom,sum(product_qty) as product_qty from stock_move where location_dest_id=%d and product_id=%d and state='done' group by product_uom", (id,product_id))
+ cr.execute("select product_uom,sum(product_qty) as product_qty from stock_move where location_dest_id=%s and product_id=%s and state='done' group by product_uom", (id,product_id))
results = cr.dictfetchall()
- cr.execute("select product_uom,-sum(product_qty) as product_qty from stock_move where location_id=%d and product_id=%d and state in ('done', 'assigned') group by product_uom", (id,product_id))
+ cr.execute("select product_uom,-sum(product_qty) as product_qty from stock_move where location_id=%s and product_id=%s and state in ('done', 'assigned') group by product_uom", (id,product_id))
results += cr.dictfetchall()
total = 0.0
@@ -340,7 +340,7 @@ class stock_picking(osv.osv):
sql_str="""update stock_move set
date_planned='%s'
where
- picking_id=%d """ % (value,pick.id)
+ picking_id=%s """ % (value,pick.id)
if pick.min_date:
sql_str += " and (date_planned='"+pick.min_date+"' or date_planned<'"+value+"')"
cr.execute(sql_str)
@@ -800,7 +800,7 @@ stock_production_lot_revision()
#
class stock_move(osv.osv):
def _getSSCC(self, cr, uid, context={}):
- cr.execute('select id from stock_tracking where create_uid=%d order by id desc limit 1', (uid,))
+ cr.execute('select id from stock_tracking where create_uid=%s order by id desc limit 1', (uid,))
res = cr.fetchone()
return (res and res[0]) or False
_name = "stock.move"
@@ -1030,13 +1030,13 @@ class stock_move(osv.osv):
done.append(move.id)
pickings[move.picking_id.id] = 1
r = res.pop(0)
- cr.execute('update stock_move set location_id=%d, product_qty=%f where id=%d', (r[1],r[0], move.id))
+ cr.execute('update stock_move set location_id=%s, product_qty=%s where id=%s', (r[1],r[0], move.id))
while res:
r = res.pop(0)
move_id = self.copy(cr, uid, move.id, {'product_qty':r[0], 'location_id':r[1]})
done.append(move_id)
- #cr.execute('insert into stock_move_history_ids values (%d,%d)', (move.id,move_id))
+ #cr.execute('insert into stock_move_history_ids values (%s,%s)', (move.id,move_id))
if done:
count += len(done)
self.write(cr, uid, done, {'state':'assigned'})
@@ -1084,7 +1084,7 @@ class stock_move(osv.osv):
for move in self.browse(cr, uid, ids):
if move.move_dest_id.id and (move.state != 'done'):
mid = move.move_dest_id.id
- cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%d,%d)', (move.id, move.move_dest_id.id))
+ cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id))
if move.move_dest_id.state in ('waiting','confirmed'):
self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'})
if move.move_dest_id.picking_id:
diff --git a/addons/stock/wizard/inventory_merge_zero.py b/addons/stock/wizard/inventory_merge_zero.py
index cb98f3ec08e..f0ce60b4c22 100644
--- a/addons/stock/wizard/inventory_merge_zero.py
+++ b/addons/stock/wizard/inventory_merge_zero.py
@@ -42,11 +42,11 @@ def do_merge(self, cr, uid, data, context):
raise wizard.except_wizard("Warning",
"Please select one and only one inventory!")
- cr.execute('select distinct location_id from stock_inventory_line where inventory_id=%d', (data['ids'][0],))
+ cr.execute('select distinct location_id from stock_inventory_line where inventory_id=%s', (data['ids'][0],))
loc_ids = map(lambda x: x[0], cr.fetchall())
locs = ','.join(map(lambda x: str(x), loc_ids))
- cr.execute('select distinct location_id,product_id from stock_inventory_line where inventory_id=%d', (data['ids'][0],))
+ cr.execute('select distinct location_id,product_id from stock_inventory_line where inventory_id=%s', (data['ids'][0],))
inv = cr.fetchall()
cr.execute('select distinct product_id from stock_move where (location_dest_id in ('+locs+')) or (location_id in ('+locs+'))')
diff --git a/addons/stock_invoice_directly/__terp__.py b/addons/stock_invoice_directly/__terp__.py
index 3057a411c9f..cd425e32e67 100644
--- a/addons/stock_invoice_directly/__terp__.py
+++ b/addons/stock_invoice_directly/__terp__.py
@@ -23,7 +23,7 @@
"name" : "Invoice Picking Directly",
"version" : "1.0",
"author" : "Tiny",
- "website" : "http://tinyerp.com/module_sale.html",
+ "website" : "http://www.openerp.com",
"depends" : ["delivery", "stock"],
"category" : "Generic Modules/Sales & Purchases",
"description": """
diff --git a/addons/wiki/wizard/make_index.py b/addons/wiki/wizard/make_index.py
index 1f2745448e4..25d0d76c482 100644
--- a/addons/wiki/wizard/make_index.py
+++ b/addons/wiki/wizard/make_index.py
@@ -79,8 +79,6 @@ def wiki_do_index(self, cr, uid, data, context):
result.append(val)
current2 = l
- print 'OLD', lst
- print 'NEW', result
for rs in result:
wiki_pool.write(cr, uid, [rs[1]], {'section':rs[0]})