tfr (Openerp) has proposed merging lp:~openerp-dev/openerp-int/mck_ondelete
into lp:~openerp-dev/openerp-int/mck_addons.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-int/mck_ondelete/+merge/127692
--
https://code.launchpad.net/~openerp-dev/openerp-int/mck_ondelete/+merge/127692
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openerp-int/mck_ondelete into
lp:~openerp-dev/openerp-int/mck_addons.
=== modified file 'mck_common/attachment.py'
--- mck_common/attachment.py 2012-05-29 16:53:29 +0000
+++ mck_common/attachment.py 2012-10-03 10:00:07 +0000
@@ -19,7 +19,7 @@
return super(ir_attachment, self).create(cr, uid, vals, context=context)
_columns = {
- 'practice_id' : fields.many2one('mck.practice','Cell'),
+ 'practice_id' : fields.many2one('mck.practice','Cell',ondelete="restrict"),
'user_id' : fields.many2one('res.users','User'),
'create_date' : fields.datetime('Start Date'),
'create_uid' : fields.many2one('res.users', 'Owner', readonly=True),
=== modified file 'mck_common/email.py'
--- mck_common/email.py 2012-09-06 09:40:45 +0000
+++ mck_common/email.py 2012-10-03 10:00:07 +0000
@@ -9,7 +9,7 @@
_inherit = 'email.template'
_columns = {
- 'practice_id': fields.many2one('mck.practice','Cell'),
+ 'practice_id': fields.many2one('mck.practice','Cell',ondelete="restrict"),
'template_use' : fields.char('Purpose of template',64),
'subtype_select' : fields.selection([('plain', 'Plain Text'), ('html', 'Html')], string="Content Type"),
'body_text': fields.text('Text contents', translate=False, help="Plaintext version of the message (placeholders may be used here)"),
@@ -128,7 +128,7 @@
return email_msg_id
_columns = {
- 'practice_id': fields.many2one('mck.practice','Cell'),
+ 'practice_id': fields.many2one('mck.practice','Cell',ondelete="restrict"),
'create_date' : fields.datetime('Date', readonly=True),
'create_uid' : fields.many2one('res.users', string="User", readonly=True),
'use' : fields.char('Use', size=128),
=== modified file 'mck_common/event.py'
--- mck_common/event.py 2012-09-25 14:04:49 +0000
+++ mck_common/event.py 2012-10-03 10:00:07 +0000
@@ -60,9 +60,9 @@
_columns = {
'name' : fields.char('Event',size=64, required=True),
'state' : fields.selection([('draft','Draft'),('confirm','Confirm'),('Done','done')],'State'),
- 'practice_id' : fields.many2one('mck.practice','Cell',required=True),
+ 'practice_id' : fields.many2one('mck.practice','Cell',required=True,ondelete="restrict"),
'user_level' : fields.function(_get_user_level, type="integer", string="User Level"),
- 'priority_id' : fields.many2one('mck.role.type','Priority Role Type',domain=[('name','!=','Past')]),
+ 'priority_id' : fields.many2one('mck.role.type','Priority Role Type',domain=[('name','!=','Past')],ondelete="restrict"),
'comment' : fields.text('Comment'),
'email_templates_ids':fields.many2many('email.template', string='Used email templates',readonly=True),
'create_uid' : fields.many2one('res.users', string="Created by", readonly=True),
@@ -164,7 +164,7 @@
'name' : fields.char('Status Name',64, required=True),
'sequence_number':fields.integer('Sequence'),
'default' : fields.boolean('Proposed by default'),
- 'cell_id' : fields.many2one('mck.practice','Cell',required=True),
+ 'cell_id' : fields.many2one('mck.practice','Cell',required=True,ondelete="restrict"),
'user_level' : fields.function(_get_user_level, type="integer", string="User Level"),
}
@@ -398,7 +398,7 @@
'archive_role_type' : fields.many2one('mck.role.type','Role Type', readonly=True),
'archive_role_title' : fields.char('Title', size=128, readonly=True),
'archive_role_company_id' : fields.many2one('res.partner', 'Company', readonly=True),
- 'archive_role_company_country_id' : fields.many2one('res.country', "Company Country", readonly=True),
+ 'archive_role_company_country_id' : fields.many2one('res.country', "Company Country", readonly=True,ondelete="restrict"),
'archive_role_address_id' : fields.many2one('res.partner.location', 'Address', readonly=True),
'archive_main_partner' : fields.many2one('mck.contact', 'McK Main Partner', readonly=True),
'archive_email' : fields.char("Email", size=128, readonly=True),
=== modified file 'mck_common/wizard/add_invitees.py'
--- mck_common/wizard/add_invitees.py 2012-08-28 14:56:01 +0000
+++ mck_common/wizard/add_invitees.py 2012-10-03 10:00:07 +0000
@@ -136,7 +136,7 @@
_columns = {
'event_id' : fields.integer('Dummy Field'),
'user_level' : fields.integer('user level'),
- 'practice_id':fields.many2one('mck.practice', string='Event Cell',readonly=True),
+ 'practice_id':fields.many2one('mck.practice', string='Event Cell',readonly=True,ondelete="restrict"),
'executive_ids' : fields.many2many('res.partner.contact',string='Executive'),
'state' : fields.selection([('add','Add'),('duplicated','Duplicated Warning')], string="Status"),
}
@@ -241,7 +241,7 @@
_columns = {
'new_event_id' : fields.integer('Dummy Field'),
'state' : fields.selection([('draft','Draft'),('confirm','Confirm'),('duplicated','Duplicated Warning')],'State'),
- 'practice_id':fields.many2one('mck.practice', string='Event Cell',readonly=True),
+ 'practice_id':fields.many2one('mck.practice', string='Event Cell',readonly=True,ondelete="restrict"),
}
def _get_practice_id(self, cr, uid, context=None):
=== modified file 'mck_common/wizard/create_attachment.py'
--- mck_common/wizard/create_attachment.py 2012-09-07 09:57:43 +0000
+++ mck_common/wizard/create_attachment.py 2012-10-03 10:00:07 +0000
@@ -13,7 +13,7 @@
_columns = {
'datas': fields.binary('Data'),
'datas_fname': fields.char('Filename',size=256),
- 'practice_id' : fields.many2one('mck.practice','Cell'),
+ 'practice_id' : fields.many2one('mck.practice','Cell',ondelete="restrict"),
'wizard_id' : fields.integer("Wizard ID"),
'wizard_model' : fields.char("Wizard Model", size=1024),
}
=== modified file 'mck_contact/client_master_name.py'
--- mck_contact/client_master_name.py 2012-09-07 12:03:30 +0000
+++ mck_contact/client_master_name.py 2012-10-03 10:00:07 +0000
@@ -8,7 +8,7 @@
'name' : fields.char('Name',required=True, size=256),
'country_id' : fields.many2one('res.country', string='Country'),
'region_id' : fields.many2one('mck.practice.region', string="Region", domain=[('type', '=', 'region')], ondelete='restrict'),
- 'industry_id' : fields.many2one('mck.company.industry', string="Industry"),
+ 'industry_id' : fields.many2one('mck.company.industry', string="Industry",ondelete="restrict"),
'priority': fields.selection([('yes','Yes'),('no','No')], "Priority"),
'priority_ID': fields.char("Priority ID", size=64),
=== modified file 'mck_contact/company.py'
--- mck_contact/company.py 2012-10-02 12:50:06 +0000
+++ mck_contact/company.py 2012-10-03 10:00:07 +0000
@@ -42,7 +42,7 @@
"name" : fields.char("Company name", size=256, required=True),
"parent_id" : fields.many2one("res.partner", string="Parent"),
"client_master_name_id" : fields.many2one("mck.company.client_master_name", string="Client master name"),
- "industry_id" : fields.many2one("mck.company.industry", string="Industry"),
+ "industry_id" : fields.many2one("mck.company.industry", string="Industry",ondelete="restrict"),
"priority" : fields.related("client_master_name_id", 'priority', type="selection", string="Priority", selection=[('yes','Yes'),('no','No')]),
"priority_ID" : fields.related("client_master_name_id", "priority_ID", string="Priority ID", type="char"),
@@ -142,7 +142,7 @@
__logger_address = logging.getLogger('mck.address.change')
_columns = {
- "country_id" : fields.many2one('res.country', string="Country"),
+ "country_id" : fields.many2one('res.country', string="Country",ondelete="restrict"),
'state' : fields.char(size=128, string="State"),
'street' : fields.char(size=256, string="Street 1"),
'street2' : fields.char(size=256, string="Street 2"),
=== modified file 'mck_contact/executive.py'
--- mck_contact/executive.py 2012-10-01 13:20:34 +0000
+++ mck_contact/executive.py 2012-10-03 10:00:07 +0000
@@ -185,6 +185,9 @@
'write_date' : fields.datetime(string="On", readonly=True),
'active' : fields.boolean('Active'),
+ 'title': fields.many2one('res.partner.title','Salutation',domain=[('domain','=','contact')],ondelete="restrict"),
+
+
'exec_practice_link_ids' : fields.one2many("mck.exec.practice.link", 'exec_id', string="Affiliated Cells"),
'specific_value_ids' : fields.one2many('mck.executive.practice.field.value', 'exec_id', string="Cell Specific Values"),
'pass_code_line_ids' : fields.one2many("mck.passcode.line", 'exec_id', string="Registration Passcodes"),
@@ -353,7 +356,7 @@
'exec_id' : fields.many2one("res.partner.contact", "Executive"),
'user_level' : fields.function(_get_user_level, type="integer", string="User Level"),
'contact_id' : fields.many2one("mck.contact", "Mck Contact", required=True),
- 'relationshiplevel_id' : fields.many2one("mck.addressbook.relationshiplevel", "Relationship"),
+ 'relationshiplevel_id' : fields.many2one("mck.addressbook.relationshiplevel", "Relationship",ondelete="restrict"),
'cc' : fields.boolean("CC"),
'main' : fields.boolean("Main"),
'dcs' : fields.boolean("DCS"),
=== modified file 'mck_contact/role.py'
--- mck_contact/role.py 2012-10-02 12:50:06 +0000
+++ mck_contact/role.py 2012-10-03 10:00:07 +0000
@@ -41,11 +41,11 @@
'role_sequence' : fields.related('type_id', 'sequence', type='integer', store=True),
'division' : fields.char('Division', size=256),
- 'level_id' : fields.many2one('mck.role.level', 'Level'),
+ 'level_id' : fields.many2one('mck.role.level', 'Level',ondelete="restrict"),
- 'type_id' : fields.many2one('mck.role.type', 'Type', required=True),
+ 'type_id' : fields.many2one('mck.role.type', 'Type', required=True,ondelete="restrict"),
- 'assistant_title': fields.many2one('res.partner.title','Assistant Salutation', domain=[('domain','=','contact')]),
+ 'assistant_title': fields.many2one('res.partner.title','Assistant Salutation', domain=[('domain','=','contact')],ondelete="restrict"),
'assistant_last_name' : fields.char('Last Name', size=256),
'assistant_first_name' : fields.char('First Name', size=256),
'assistant_middle_name' : fields.char('Mid Name', size=256),
@@ -339,7 +339,7 @@
}
_columns = {
- 'function_id' : fields.many2one("mck.role.function", "Function", required=True),
+ 'function_id' : fields.many2one("mck.role.function", "Function", required=True,ondelete="restrict"),
'service_line_1_id' : fields.many2one("mck.role.service_line", "Service Line 1", domain="[('related_id','=', function_id)]"),
'service_line_2_id' : fields.many2one("mck.role.service_line", "Service Line 2", domain="[('related_id','=', function_id)]"),
'service_line_3_id' : fields.many2one("mck.role.service_line", "Service Line 3", domain="[('related_id','=', function_id)]"),
=== modified file 'mck_contact/wizard/executive_add_practice.py'
--- mck_contact/wizard/executive_add_practice.py 2012-08-23 10:09:27 +0000
+++ mck_contact/wizard/executive_add_practice.py 2012-10-03 10:00:07 +0000
@@ -7,7 +7,7 @@
_columns = {
'practice_id' : fields.many2one('mck.practice', "Cell/Office"),
'contact_id' : fields.many2one("mck.contact", "McK Contact"),
- 'level_id' : fields.many2one('mck.addressbook.relationshiplevel', "Level"),
+ 'level_id' : fields.many2one('mck.addressbook.relationshiplevel', "Level",ondelete="restrict"),
'cc' : fields.boolean("CC"),
'force_main' : fields.boolean("Force main contact"),
'source' : fields.char("Source", size=512),
=== modified file 'mck_event/event.py'
--- mck_event/event.py 2012-10-02 07:38:46 +0000
+++ mck_event/event.py 2012-10-03 10:00:07 +0000
@@ -66,7 +66,7 @@
'city':fields.char('City',size=64),
'zip':fields.char('Postal Code',size=64),
'country_state':fields.char('State',64),
- 'country':fields.many2one('res.country','Country'),
+ 'country':fields.many2one('res.country','Country',ondelete="restrict"),
'date' : fields.related('end_date', string='Date', type="date", store=True),
}
=== modified file 'mck_internal/practice.py'
--- mck_internal/practice.py 2012-09-06 09:40:45 +0000
+++ mck_internal/practice.py 2012-10-03 10:00:07 +0000
@@ -11,8 +11,8 @@
'name' : fields.char("Cell Name", size=128, required=True),
'type' : fields.selection([('office', 'Office'),('industry', 'Industry Cell'),('functionnal', 'Functional Cell'),('firm', 'Firm Initiative')], string="Type"),
'region' : fields.many2one('mck.practice.region', string="Region", domain=[('type', '=', 'region')], ondelete='restrict'),
- 'subregion' : fields.many2one('mck.practice.region', string="Sub Region", domain=[('type', '=', 'sub-region')]),
- 'country' : fields.many2one('res.country', string='Country'),
+ 'subregion' : fields.many2one('mck.practice.region', string="Sub Region", domain=[('type', '=', 'sub-region')],ondelete="restrict"),
+ 'country' : fields.many2one('res.country', string='Country',ondelete="restrict"),
'create_uid' : fields.many2one('res.users', string="Created by", readonly=True),
'write_uid' : fields.many2one('res.users', string="Last updated by", readonly=True),
'create_date' : fields.datetime(string="On", readonly=True),
@@ -68,7 +68,7 @@
'name' : fields.char("Last Name", size=256, required=True),
'first_name' : fields.char("First Name", size=256),
'email' : fields.char("Email", size=256, required=True),
- 'office_id' : fields.many2one("mck.practice", string="Home Office", domain=[('type', '=', 'office')]),
+ 'office_id' : fields.many2one("mck.practice", string="Home Office", domain=[('type', '=', 'office')],ondelete="restrict"),
'create_uid' : fields.many2one('res.users', string="Created by", readonly=True),
'write_uid' : fields.many2one('res.users', string="Last updated by", readonly=True),
=== modified file 'mck_internal/users.py'
--- mck_internal/users.py 2012-09-27 09:58:02 +0000
+++ mck_internal/users.py 2012-10-03 10:00:07 +0000
@@ -25,7 +25,7 @@
'extended' : fields.boolean('Extended View'),
'configuration' : fields.boolean('Configuration'),
'access_right' : fields.boolean('Access Rights'),
- 'context_practice_id' : fields.many2one('mck.practice', "User Cell"),
+ 'context_practice_id' : fields.many2one('mck.practice', "User Cell",ondelete="restrict"),
'context_practice_name' : fields.related('context_practice_id', 'name', string="User Cell", type="char", store=True),
'new_password': fields.function(_get_password, type='char', size=64,
fnct_inv=_set_new_password,
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp