diff --git a/addons/account/account.py b/addons/account/account.py index 5794c59ffdc..8ef5004df04 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1215,7 +1215,8 @@ class account_move(osv.osv): # # TODO: Check if period is closed ! # - def create(self, cr, uid, vals, context={}): + def create(self, cr, uid, vals, context=None): + context = context or {} if 'line_id' in vals and context.get('copy'): for l in vals['line_id']: if not l[0]: @@ -1256,6 +1257,7 @@ class account_move(osv.osv): return result def copy(self, cr, uid, id, default={}, context={}): + context = context or {} default.update({ 'state':'draft', 'name':'/', @@ -1265,7 +1267,8 @@ class account_move(osv.osv): }) return super(account_move, self).copy(cr, uid, id, default, context) - def unlink(self, cr, uid, ids, context={}, check=True): + def unlink(self, cr, uid, ids, context=None, check=True): + context = context or {} toremove = [] obj_move_line = self.pool.get('account.move.line') for move in self.browse(cr, uid, ids, context): diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index a982ca51182..f3c2b71122f 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -24,8 +24,6 @@ import time from osv import fields from osv import osv from tools.translate import _ -import tools -from tools import config class account_analytic_line(osv.osv): _inherit = 'account.analytic.line' @@ -82,12 +80,13 @@ class account_analytic_line(osv.osv): return {} product_obj = self.pool.get('product.product') analytic_journal_obj =self.pool.get('account.analytic.journal') + company_obj = self.pool.get('res.company') + product_price_type_obj = self.pool.get('product.price.type') j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context) prod = product_obj.browse(cr, uid, prod_id) if not company_id: company_id = j_id.company_id.id result = 0.0 - is_purchase = False if j_id.type <> 'sale': a = prod.product_tmpl_id.property_account_expense.id @@ -99,8 +98,6 @@ class account_analytic_line(osv.osv): 'for this product: "%s" (id:%d)') % \ (prod.name, prod.id,)) amount_unit = prod.price_get('standard_price', context)[prod.id] - is_purchase = True - else: a = prod.product_tmpl_id.property_account_income.id if not a: @@ -128,9 +125,8 @@ class account_analytic_line(osv.osv): if pricetype.field == 'list_price': flag = True amount_unit = prod.price_get(pricetype.field, context)[prod.id] - amount = amount_unit*unit_amount or 1.0 prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') - amount = amount_unit*unit_amount or 1.0 + amount = amount_unit*unit or 1.0 result = round(amount, prec) if not flag: result *= -1 diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 4b308c06418..0b314109052 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -351,7 +351,7 @@ class account_invoice(osv.osv): if view_type == 'tree': doc = etree.XML(res['arch']) nodes = doc.xpath("//field[@name='partner_id']") - partner_string = 'Customer' + partner_string = _('Customer') if context.get('type', 'out_invoice') in ('in_invoice', 'in_refund'): partner_string = _('Supplier') for node in nodes: @@ -363,7 +363,7 @@ class account_invoice(osv.osv): try: res = super(account_invoice, self).create(cr, uid, vals, context) for inv_id, name in self.name_get(cr, uid, [res], context=context): - message = _('Invoice ') + " '" + name + "' "+ _("is waiting for validation.") + message = _("Invoice '%s' is waiting for validation.") % name self.log(cr, uid, inv_id, message) return res except Exception, e: @@ -376,7 +376,7 @@ class account_invoice(osv.osv): def confirm_paid(self, cr, uid, ids, context=None): self.write(cr, uid, ids, {'state':'paid'}, context=context) for inv_id, name in self.name_get(cr, uid, ids, context=context): - message = _('Invoice ') + " '" + name + "' "+ _("is paid.") + message = _("Invoice '%s' is paid.") % name self.log(cr, uid, inv_id, message) return True @@ -1226,8 +1226,10 @@ class account_invoice(osv.osv): self.pool.get('account.move.line').reconcile(cr, uid, line_ids, 'manual', writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context) else: code = invoice.currency_id.code - amt = str(pay_amount) + code + ' on ' + str(invoice.amount_total) + code + ' (' + str(total) + code + ' remaining)' - self.log(cr, uid, inv_id, _('Invoice ') + " '" + name + "' "+ _("is paid partially: ") + amt) + # TODO: use currency's formatting function + msg = _("Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)") % \ + (name, pay_amount, code, invoice.amount_total, code, total, code) + self.log(cr, uid, inv_id, msg) self.pool.get('account.move.line').reconcile_partial(cr, uid, line_ids, 'manual', context) # Update the stored value (fields.function), so we write to trigger recompute diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index da8555cf22b..99692bc3e2e 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -31,7 +31,7 @@ "access_account_chart_template","account.chart.template","model_account_chart_template","account.group_account_manager",1,1,1,1 "access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1 "access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,0,0,0 -"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,0,0,0 +"access_account_bank_statement_line","account.bank.statement.line","model_account_bank_statement_line","account.group_account_user",1,1,1,1 "access_account_analytic_line","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1 "access_account_analytic_line_manager","account.analytic.line manager","model_account_analytic_line","account.group_account_manager",1,0,0,0 "access_account_analytic_account","account.analytic.account","analytic.model_account_analytic_account","base.group_user",1,0,0,0 @@ -94,11 +94,11 @@ "access_account_move_line_manager","account.move.line manager","model_account_move_line","account.group_account_manager",1,0,0,0 "access_account_move_manager","account.move manager","model_account_move","account.group_account_manager",1,0,0,0 "access_account_invoice_manager","account.invoice manager","model_account_invoice","account.group_account_manager",1,0,0,0 -"access_account_bank_statement_manager","account.bank.statement manager","model_account_bank_statement","account.group_account_manager",1,0,0,0 +"access_account_bank_statement_manager","account.bank.statement manager","model_account_bank_statement","account.group_account_manager",1,1,1,1 "access_account_entries_report_manager","account.entries.report","model_account_entries_report","account.group_account_manager",1,1,1,1 "access_analytic_entries_report_manager","analytic.entries.report","model_analytic_entries_report","account.group_account_manager",1,0,0,0 -"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_manager",1,0,0,0 -"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_user",1,0,0,0 +"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_manager",1,1,1,1 +"access_account_cashbox_line","account.cashbox.line","model_account_cashbox_line","account.group_account_user",1,1,1,1 "access_account_journal_view_invoice","account.journal.view invoice","model_account_journal_view","account.group_account_invoice",1,1,1,1 "access_account_journal_column_invoice","account.journal.column invoice","model_account_journal_column","account.group_account_invoice",1,1,1,1 "access_account_invoice_tax_manager","account.invoice.tax manager","model_account_invoice_tax","account.group_account_manager",1,0,0,0 diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 0aae9dbe3d0..d91e4771d6f 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -67,8 +67,8 @@ import netsvc, tools, os, time import datetime from mx.DateTime import * - import warnings - warnings.filterwarnings('ignore',".*struct integer overflow masking is deprecated*") + import warnings + warnings.filterwarnings('ignore',".*struct integer overflow masking is deprecated*") start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) start = DateTime(int(start.year), int(start.month), int(start.day)) res = {} diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index dd843449c8c..c2ef5f5d4a4 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -456,7 +456,7 @@ class audittrail_objects_proxy(osv_pool): """ Overrides Object Proxy execute method @param db: the current database - @param uid: the current user’s ID for security checks, + @param uid: the current user's ID for security checks, @param object: Object who's values are being changed @param method: get any method and create log @@ -500,49 +500,47 @@ class audittrail_objects_proxy(osv_pool): return self.log_fct(db, uid, model, method, fct_src, *args) return fct_src(db, uid, model, method, *args) - res = my_fct(db, uid, model, method, *args) - cr.close() - return res - + try: + res = my_fct(db, uid, model, method, *args) + return res + finally: + cr.close() def exec_workflow(self, db, uid, model, method, *args, **argv): pool = pooler.get_pool(db) - cr = pooler.get_db(db).cursor() - cr.autocommit(True) logged_uids = [] fct_src = super(audittrail_objects_proxy, self).exec_workflow field = method rule = False model_pool = pool.get('ir.model') rule_pool = pool.get('audittrail.rule') - model_ids = model_pool.search(cr, uid, [('model', '=', model)]) - for obj_name in pool.obj_list(): - if obj_name == 'audittrail.rule': - rule = True - if not rule: - cr.close() - return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) - if not model_ids: - cr.close() - return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) + cr = pooler.get_db(db).cursor() + cr.autocommit(True) + try: + model_ids = model_pool.search(cr, uid, [('model', '=', model)]) + for obj_name in pool.obj_list(): + if obj_name == 'audittrail.rule': + rule = True + if not rule: + return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) + if not model_ids: + return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) - rule_ids = rule_pool.search(cr, uid, [('object_id', 'in', model_ids), ('state', '=', 'subscribed')]) - if not rule_ids: - cr.close() - return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) + rule_ids = rule_pool.search(cr, uid, [('object_id', 'in', model_ids), ('state', '=', 'subscribed')]) + if not rule_ids: + return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) - for thisrule in rule_pool.browse(cr, uid, rule_ids): - for user in thisrule.user_id: - logged_uids.append(user.id) - if not logged_uids or uid in logged_uids: - if thisrule.log_workflow: - cr.close() - return self.log_fct(db, uid, model, method, fct_src, *args) + for thisrule in rule_pool.browse(cr, uid, rule_ids): + for user in thisrule.user_id: + logged_uids.append(user.id) + if not logged_uids or uid in logged_uids: + if thisrule.log_workflow: + return self.log_fct(db, uid, model, method, fct_src, *args) + return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) + + return True + finally: cr.close() - return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv) - - cr.close() - return True audittrail_objects_proxy() diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index e6226bb44bb..3b0bd140748 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -198,11 +198,12 @@ class crm_lead(crm_case, osv.osv): self.write(cr, uid, ids, value) for case in self.browse(cr, uid, ids): - n = { - 'lead': _('The lead'), - 'opportunity': _('The opportunity') - }.get(case.type, _('The case')) - message = n +" '" + case.name + "' "+ _("has been opened.") + if case.type == 'lead': + message = _("The lead '%s' has been opened.") % name + elif case.type == 'opportunity': + message = _("The opportunity '%s' has been opened.") % name + else: + message = _("The case '%s' has been opened.") % name self.log(cr, uid, case.id, message) return res @@ -217,11 +218,12 @@ class crm_lead(crm_case, osv.osv): res = super(crm_lead, self).case_close(cr, uid, ids, args) self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}) for case in self.browse(cr, uid, ids): - n = { - 'lead': _('The lead'), - 'opportunity': _('The opportunity') - }.get(case.type, _('The case')) - message = n +" '" + case.name + "' "+ _("has been closed.") + if case.type == 'lead': + message = _("The lead '%s' has been closed.") % name + elif case.type == 'opportunity': + message = _("The opportunity '%s' has been closed.") % name + else: + message = _("The case '%s' has been closed.") % name self.log(cr, uid, case.id, message) return res diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py index d2c79bc3497..b81819e1171 100644 --- a/addons/crm/crm_meeting.py +++ b/addons/crm/crm_meeting.py @@ -134,7 +134,7 @@ class crm_meeting(crm_case, osv.osv): """ res = super(crm_meeting, self).case_open(cr, uid, ids, args) for (id, name) in self.name_get(cr, uid, ids): - message = _('The meeting') + " '" + name + "' "+ _("has been confirmed.") + message = _("The meeting '%s' has been confirmed.") % name self.log(cr, uid, id, message) return res diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py index 797d5e70704..9bd998d0f46 100644 --- a/addons/crm/crm_opportunity.py +++ b/addons/crm/crm_opportunity.py @@ -70,7 +70,7 @@ class crm_opportunity(osv.osv): for (id, name) in self.name_get(cr, uid, ids): opp = self.browse(cr, uid, id) if opp.type == 'opportunity': - message = _('The opportunity') + " '" + name + "' "+ _("has been won.") + message = _("The opportunity '%s' has been won.") % name self.log(cr, uid, id, message) return res @@ -94,7 +94,7 @@ class crm_opportunity(osv.osv): for (id, name) in self.name_get(cr, uid, ids): opp = self.browse(cr, uid, id) if opp.type == 'opportunity': - message = _('The opportunity') + " '" + name + "' "+ _("has been marked as lost.") + message = _("The opportunity '%s' has been marked as lost.") % name self.log(cr, uid, id, message) return res diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 7d527442391..2147d774762 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -71,8 +71,9 @@ class email_server(osv.osv): } def check_duplicate(self, cr, uid, ids): + # RFC *-* Why this limitation? why not in SQL constraint? vals = self.read(cr, uid, ids, ['user', 'password'])[0] - cr.execute("select count(id) from email_server where user='%s' and password='%s'" % (vals['user'], vals['password'])) + cr.execute("select count(id) from email_server where user='%s' and password='%s'", (vals['user'], vals['password'])) res = cr.fetchone() if res: if res[0] > 1: diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index bc6e7193920..c676b4199be 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -407,7 +407,7 @@ class hr_applicant(crm.crm_case, osv.osv): if not date['date_open']: self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'),}) for (id, name) in self.name_get(cr, uid, ids): - message = _('The job request ') + " '" + name + "' "+ _("has been set 'in progress'.") + message = _("The job request '%s' has been set 'in progress'.") % name self.log(cr, uid, id, message) return res @@ -423,7 +423,7 @@ class hr_applicant(crm.crm_case, osv.osv): job_obj = self.pool.get('hr.job') res = super(hr_applicant, self).case_close(cr, uid, ids, *args) for (id, name) in self.name_get(cr, uid, ids): - message = _('Applicant ') + " '" + name + "' "+ _("is being hired.") + message = _("Applicant '%s' is being hired.") % name self.log(cr, uid, id, message) applicant = self.browse(cr, uid, ids)[0] diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 8dd25ef1eb3..cc1ff3b9324 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -45,7 +45,10 @@ class account_analytic_account(osv.osv): context = {} res = {} - cr.execute('select account_id as account_id, l.invoice_id from hr_analytic_timesheet h left join account_analytic_line l on (h.line_id=l.id)') + cr.execute('SELECT account_id as account_id, l.invoice_id ' + 'FROM hr_analytic_timesheet h LEFT JOIN account_analytic_line l ' + 'ON (h.line_id=l.id) ' + 'WHERE l.account_id = ANY(%s)', (ids,)) account_to_invoice_map = {} for rec in cr.dictfetchall(): account_to_invoice_map.setdefault(rec['account_id'], []).append(rec['invoice_id']) @@ -163,6 +166,7 @@ class account_invoice(osv.osv): obj_analytic_account = self.pool.get('account.analytic.account') for il in iml: if il['account_analytic_id']: + # *-* browse (or refactor to avoid read inside the loop) to_invoice = obj_analytic_account.read(cr, uid, [il['account_analytic_id']], ['to_invoice'])[0]['to_invoice'] if to_invoice: il['analytic_lines'][0][2]['to_invoice'] = to_invoice[0] diff --git a/addons/mrp/procurement.py b/addons/mrp/procurement.py index 38f07e0f1d1..9af65a473a3 100644 --- a/addons/mrp/procurement.py +++ b/addons/mrp/procurement.py @@ -40,10 +40,10 @@ class procurement_order(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: + if not bom_id: cr.execute('update procurement_order set message=%s where id=%s', (_('No BoM defined for this product !'), procurement.id)) for (id, name) in self.name_get(cr, uid, procurement.id): - message = _('Procurement ') + " '" + name + "' "+ _("has an exception: 'No BoM defined for this product !'") + message = _("Procurement '%s' has an exception: 'No BoM defined for this product !'") % name self.log(cr, uid, id, message) return False return True diff --git a/addons/project/project.py b/addons/project/project.py index 3653d6ba0da..8b8745fa45c 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -248,7 +248,7 @@ class project(osv.osv): task_obj.write(cr, uid, task_ids, {'state': 'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S'), 'remaining_hours': 0.0}) self.write(cr, uid, ids, {'state':'close'}, context=context) for (id, name) in self.name_get(cr, uid, ids): - message = _('The project ') + " '" + name + "' "+ _("has been closed.") + message = _("The project '%s' has been closed.") % name self.log(cr, uid, id, message) return True @@ -270,7 +270,7 @@ class project(osv.osv): def reset_project(self, cr, uid, ids, context=None): res = self.setActive(cr, uid, ids, value=True, context=context) for (id, name) in self.name_get(cr, uid, ids): - message = _('The project ') + " '" + name + "' "+ _("has been opened.") + message = _("The project '%s' has been opened.") % name self.log(cr, uid, id, message) return res @@ -732,7 +732,7 @@ class task(osv.osv): def do_pending(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'pending'}) for (id, name) in self.name_get(cr, uid, ids): - message = _('The task ') + " '" + name + "' "+ _("is pending.") + message = _("The task '%s' is pending.") % name self.log(cr, uid, id, message) return True diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 91b7f5b3437..2887b25610d 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -58,7 +58,7 @@ class project_issue(crm.crm_case, osv.osv): res = super(project_issue, self).case_open(cr, uid, ids, *args) self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')}) for (id, name) in self.name_get(cr, uid, ids): - message = _('Issue ') + " '" + name + "' "+ _("has been opened.") + message = _("Issue '%s' has been opened.") % name self.log(cr, uid, id, message) return res @@ -73,7 +73,7 @@ class project_issue(crm.crm_case, osv.osv): res = super(project_issue, self).case_close(cr, uid, ids, *args) for (id, name) in self.name_get(cr, uid, ids): - message = _('Issue ') + " '" + name + "' "+ _("has been closed.") + message = _("Issue '%s' has been closed.") % name self.log(cr, uid, id, message) return res diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 9615b089fa2..57b9a477ac9 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -330,7 +330,7 @@ class purchase_order(osv.osv): wf_service.trg_delete(uid, 'purchase.order', p_id, cr) wf_service.trg_create(uid, 'purchase.order', p_id, cr) for (id,name) in self.name_get(cr, uid, ids): - message = _('Purchase order') + " '" + name + "' "+ _("has been set in draft state.") + message = _("Purchase order '%s' has been set in draft state.") % name self.log(cr, uid, id, message) return True @@ -412,7 +412,7 @@ class purchase_order(osv.osv): wf_service.trg_validate(uid, 'account.invoice', inv.id, 'invoice_cancel', cr) self.write(cr,uid,ids,{'state':'cancel'}) for (id,name) in self.name_get(cr, uid, ids): - message = _('Purchase order ') + " '" + purchase.name + "' "+ _("is cancelled.") + message = _("Purchase order '%s' is cancelled.") % name self.log(cr, uid, id, message) return True diff --git a/addons/stock/product.py b/addons/stock/product.py index e1d4c71b46c..ddb582f4a3c 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -188,6 +188,7 @@ class product_product(osv.osv): if not ids: return res + # TODO: write in more ORM way, less queries, more pg84 magic if context.get('shop', False): cr.execute('select warehouse_id from sale_shop where id=%s', (int(context['shop']),)) res2 = cr.fetchone() @@ -246,6 +247,7 @@ class product_product(osv.osv): date_values = [to_date] + # TODO: perhaps merge in one query. if date_values: where.append(tuple(date_values)) if 'in' in what: diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c7973456fb9..831b1dafcb5 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -632,7 +632,7 @@ class stock_picking(osv.osv): 'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}), 'auto_picking': fields.boolean('Auto-Picking'), 'address_id': fields.many2one('res.partner.address', 'Address', help="Address of partner"), - 'partner_id': fields.related('address_id','partner_id',type='many2one',relation='res.partner',string='Partner',store=True), + 'partner_id': fields.related('address_id','partner_id',type='many2one',relation='res.partner',string='Partner'), 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index bce4de8b593..bdc11f208ca 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -244,7 +244,7 @@ - + Shop 2 @@ -262,9 +262,8 @@ out direct 2binvoiced - + - diff --git a/addons/survey/report/survey_browse_response.py b/addons/survey/report/survey_browse_response.py index 2cdb98622a9..a2ee95e417e 100644 --- a/addons/survey/report/survey_browse_response.py +++ b/addons/survey/report/survey_browse_response.py @@ -204,6 +204,7 @@ class survey_browse_response(report_rml): rml += """ Answer Create Date:- + # *-* formatting hard coded, breaks with utf8 """ + to_xml(time.strftime('%d-%m-%Y %I:%M:%S %p', time.strptime(response.date_create.split('.')[0], '%Y-%m-%d %H:%M:%S'))) + """ Answer By:-