diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 823bb56a7a9..271cc92e41c 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -120,7 +120,6 @@ module named account_voucher. 'project/analytic_account_demo.xml', 'demo/account_minimal.xml', 'account_unit_test.xml', - 'board_account_demo.xml', ], 'test': [ 'test/account_customer_invoice.yml', diff --git a/addons/account/board_account_demo.xml b/addons/account/board_account_demo.xml deleted file mode 100644 index 93bfed6d56d..00000000000 --- a/addons/account/board_account_demo.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index 51e8254d20e..b34dca0dbb9 100644 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -122,7 +122,6 @@ --> - @@ -131,7 +130,6 @@ - @@ -140,7 +138,6 @@ - @@ -150,7 +147,6 @@ - @@ -159,7 +155,6 @@ - @@ -168,7 +163,6 @@ - @@ -177,7 +171,6 @@ - @@ -186,7 +179,6 @@ - diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml index 704f9f47025..01fd4bc1bfe 100644 --- a/addons/account/process/statement_process.xml +++ b/addons/account/process/statement_process.xml @@ -65,7 +65,6 @@ --> - @@ -74,7 +73,6 @@ - @@ -84,7 +82,6 @@ - diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml index e24431c48b4..8635b083d72 100644 --- a/addons/account/process/supplier_invoice_process.xml +++ b/addons/account/process/supplier_invoice_process.xml @@ -1,21 +1,21 @@ - - - + - - - + @@ -26,7 +26,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -92,7 +92,7 @@ - + @@ -103,22 +103,20 @@ - - - + - - + - @@ -126,51 +124,46 @@ - + - - + - - + - - + - - + - - + diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index efce4bc4da4..f94082445da 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -200,7 +200,8 @@ class account_automatic_reconcile(osv.osv_memory): "AND partner_id=%s " \ "AND reconcile_id IS NULL " \ "AND state <> 'draft' " \ - "AND debit > 0", + "AND debit > 0 " \ + "ORDER BY date_maturity", (account_id, partner_id)) debits = cr.fetchall() @@ -212,7 +213,8 @@ class account_automatic_reconcile(osv.osv_memory): "AND partner_id=%s " \ "AND reconcile_id IS NULL " \ "AND state <> 'draft' " \ - "AND credit > 0", + "AND credit > 0 " \ + "ORDER BY date_maturity", (account_id, partner_id)) credits = cr.fetchall() diff --git a/addons/account_budget/crossovered_budget_workflow.xml b/addons/account_budget/crossovered_budget_workflow.xml index f304775bcca..16997d694f2 100644 --- a/addons/account_budget/crossovered_budget_workflow.xml +++ b/addons/account_budget/crossovered_budget_workflow.xml @@ -65,28 +65,24 @@ validate - cancel - cancel - done - diff --git a/addons/account_payment/wizard/account_payment_populate_statement.py b/addons/account_payment/wizard/account_payment_populate_statement.py index d223c58316f..7ebb9d933de 100644 --- a/addons/account_payment/wizard/account_payment_populate_statement.py +++ b/addons/account_payment/wizard/account_payment_populate_statement.py @@ -114,7 +114,7 @@ class account_payment_populate_statement(osv.osv_memory): 'voucher_id': voucher_id, }, context=context) - line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id}) + line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id}) return {'type': 'ir.actions.act_window_close'} account_payment_populate_statement() diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 7ccd07351f0..1ff7777cf36 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -978,7 +978,7 @@ class calendar_event(osv.osv): if not context: context = {} for event_id in ids: - cr.execute('select id from %s where recurrent_uid=%s' % (self._table, event_id)) + cr.execute("select id from %s where recurrent_uid=%%s" % (self._table), (event_id,)) r_ids = map(lambda x: x[0], cr.fetchall()) self.unlink(cr, uid, r_ids, context=context) return True @@ -1065,7 +1065,7 @@ class calendar_event(osv.osv): 'rule_type': rrule_type, 'id': id, }) - cr.execute(qry, val) # Hopefully psycopg2 works with dicts. But, FIXME + cr.execute(qry % val) return True def _get_rulestring(self, cr, uid, ids, name, arg, context=None): @@ -1438,7 +1438,8 @@ true, it will allow you to hide the event alarm information without removing it. res = super(calendar_event, self).search(cr, uid, args_without_date, \ offset, limit, order, context, count) - return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit) + res = self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit) + return res def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): """ @@ -1533,11 +1534,9 @@ true, it will allow you to hide the event alarm information without removing it. if fields and 'date' not in fields: fields.append('date') - real_ids = [item2 for item1, item2 in select] - event_values = dict([(res['id'], res) for res in super(calendar_event, self).read(cr, uid, real_ids, fields=fields, context=context, load=load)]) - for base_calendar_id, real_id in select: - res = event_values[real_id] + #REVET: Revision ID: olt@tinyerp.com-20100924131709-cqsd1ut234ni6txn + res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load) ls = base_calendar_id2real_id(base_calendar_id, with_date=res and res.get('duration', 0) or 0) if not isinstance(ls, (str, int, long)) and len(ls) >= 2: res['date'] = ls[1] diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index 2a0ed14080f..ba91c4b75dd 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -163,7 +163,8 @@ @@ -496,6 +497,7 @@ diff --git a/addons/base_contact/process/base_contact_process.xml b/addons/base_contact/process/base_contact_process.xml index 876905c1812..f5b754e7ad9 100644 --- a/addons/base_contact/process/base_contact_process.xml +++ b/addons/base_contact/process/base_contact_process.xml @@ -60,7 +60,6 @@ --> - @@ -69,7 +68,6 @@ - @@ -78,7 +76,6 @@ - diff --git a/addons/base_iban/base_iban_data.xml b/addons/base_iban/base_iban_data.xml index 4269bb83ac6..dae3999505e 100644 --- a/addons/base_iban/base_iban_data.xml +++ b/addons/base_iban/base_iban_data.xml @@ -3,12 +3,11 @@ + Default bank account description + --> IBAN Account iban - iban diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index d22fa98f6e4..068af56459f 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -63,11 +63,12 @@ def uid2openobjectid(cr, uidval, oomodel, rdate): return (False, None) qry = 'SELECT DISTINCT(id) FROM %s' % model_obj._table if rdate: - qry += " WHERE recurrent_id=%s" - cr.execute(qry, (rdate,)) + qry += " where recurrent_id='%s'" % (rdate) #TOFIX: sql injection + cr.execute(qry) r_id = cr.fetchone() if r_id: return (id, r_id[0]) + cr.execute(qry) ids = map(lambda x: str(x[0]), cr.fetchall()) if id in ids: diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 5de8de6de68..89dc61bef59 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -119,7 +119,6 @@ Create dashboard for CRM that includes: 'crm_meeting_demo.xml', 'crm_opportunity_demo.xml', 'crm_phonecall_demo.xml', - 'board_crm_demo.xml', ], 'test': [ 'test/test_crm_lead.yml', diff --git a/addons/crm/board_crm_demo.xml b/addons/crm/board_crm_demo.xml deleted file mode 100644 index fd8bb480d68..00000000000 --- a/addons/crm/board_crm_demo.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml index cb80a7d28e9..2a49e43e683 100644 --- a/addons/crm/crm_lead_data.xml +++ b/addons/crm/crm_lead_data.xml @@ -33,9 +33,10 @@ - Win + Won + diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index 2821024bfbf..98b311592b7 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -13,7 +13,8 @@ {'object_id':'crm.meeting'} - diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py index 771212a171d..2b0062eb9d5 100644 --- a/addons/crm/crm_opportunity.py +++ b/addons/crm/crm_opportunity.py @@ -85,10 +85,11 @@ class crm_opportunity(osv.osv): """ res = super(crm_opportunity, self).case_close(cr, uid, ids, args) stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 0)]}) - if not stage_id: - raise osv.except_osv(_('Warning !'), _('There is no stage for lost opportunities defined for this Sale Team.')) - value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value'] - value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id}) + value = {} + if stage_id: + value = self.onchange_stage_id(cr, uid, ids, stage_id, context={}).get('value', {}) + value['stage_id'] = stage_id + value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}) res = self.write(cr, uid, ids, value) for (id, name) in self.name_get(cr, uid, ids): diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml index b52694d8b20..66b6f04553b 100644 --- a/addons/crm/crm_opportunity_view.xml +++ b/addons/crm/crm_opportunity_view.xml @@ -14,14 +14,14 @@