From 04fefe363e3d052001b775b01c957b60573e4a2d Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 29 Aug 2011 11:46:34 +0200 Subject: [PATCH] [FIX] crm_profiling: use osv.osv instead of orm.orm for super(), account_followup: use the newly added option on many2many to prevent the creation of foreign key constraints on the relation table. bzr revid: vmt@openerp.com-20110829094634-kmef4wk17q6rzya8 --- addons/account_followup/wizard/account_followup_print.py | 2 +- addons/crm_profiling/crm_profiling.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 18b0fc1b874..ec598ca7a46 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -115,7 +115,7 @@ class account_followup_print_all(osv.osv_memory): _name = 'account.followup.print.all' _description = 'Print Followup & Send Mail to Customers' _columns = { - 'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True, domain="[('account_id.type', '=', 'receivable'), ('account_id.reconcile', '=', True), ('reconcile_id','=', False), ('state', '!=', 'draft'), ('account_id.active', '=', True), ('debit', '>', 0)]"), + 'partner_ids': fields.many2many('account_followup.stat.by.partner', 'partner_stat_rel', 'osv_memory_id', 'partner_id', 'Partners', required=True, domain="[('account_id.type', '=', 'receivable'), ('account_id.reconcile', '=', True), ('reconcile_id','=', False), ('state', '!=', 'draft'), ('account_id.active', '=', True), ('debit', '>', 0)]", no_foreign_keys=True), 'email_conf': fields.boolean('Send email confirmation'), 'email_subject': fields.char('Email Subject', size=64), 'partner_lang': fields.boolean('Send Email in Partner Language', help='Do not change message text, if you want to send email in partner language, or configure from company'), diff --git a/addons/crm_profiling/crm_profiling.py b/addons/crm_profiling/crm_profiling.py index 90dc0818743..59137966da0 100644 --- a/addons/crm_profiling/crm_profiling.py +++ b/addons/crm_profiling/crm_profiling.py @@ -264,7 +264,7 @@ class crm_segmentation(osv.osv): } _constraints = [ - (orm.orm._check_recursion, 'Error ! You can not create recursive profiles.', ['parent_id']) + (osv.osv._check_recursion, 'Error ! You can not create recursive profiles.', ['parent_id']) ] def process_continue(self, cr, uid, ids, start=False):