Jigar Amin (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-import_salesforce-b9_note-jam into
lp:~openerp-dev/openobject-addons/trunk-import_salesforce.
Requested reviews:
Bhumika (OpenERP) (sbh-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-import_salesforce-b9_note-jam/+merge/67682
Changes - Note :
- Import as attachment, for the link with object do like attachment.
Kindly Review this,
Thank You
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-import_salesforce-b9_note-jam/+merge/67682
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-import_salesforce.
=== modified file 'import_salesforce/wizard/import_salesforce.py'
--- import_salesforce/wizard/import_salesforce.py 2011-07-11 11:28:55 +0000
+++ import_salesforce/wizard/import_salesforce.py 2011-07-12 11:18:59 +0000
@@ -56,7 +56,8 @@
TABLE_EMPLOYEE = "Employee"
TABLE_PRODUCTCAT = "product.category"
TABLE_HRDEPT = 'hr.department'
- TABLE_ACCOUNT = "Account"
+ TABLE_ACCOUNT = 'Account'
+ TABLE_NOTE = 'Note'
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
object_description = {}
@@ -127,6 +128,7 @@
self.TABLE_OPPOHISTORY: self.get_oppo_history_mapping(),
self.TABLE_CONVERTEDOPPO: self.get_convertoppo_mapping(),
self.TABLE_ATTENDEE: self.get_attendee_mapping(),
+ self.TABLE_NOTE: self.get_note_mapping(),
}
def get_all_states(self, external_val, country_id):
@@ -863,6 +865,21 @@
}
}
+ def get_note_mapping(self):
+ return {
+ 'model': 'mailgate.message',
+ 'dependencies': [self.TABLE_ACCOUNT, self.TABLE_LEAD, self.TABLE_OPPOHISTORY, self.TABLE_CLAIM, self.TABLE_MEETING],
+ 'hook': self.import_attachment,
+ 'map': {
+ 'name': 'Title',
+ 'user_id/id': ref(self.TABLE_USER, 'OwnerId'),
+ 'description': 'Body',
+ 'date': call(self.get_date, value('CreatedDate')),
+ 'model': 'Model',
+ 'res_id': 'ResourceId',
+ 'partner_id/.id' : 'PartnerID',
+ }
+ }
def get_email_subject(self, result):
return "Your Salesforce's data were successfully imported at %s" % self.date_ended
@@ -890,6 +907,7 @@
'product': fields.boolean('Products', help="If Products is checked, SalesFroce Products data imported to OpenERP Products"),
'employee': fields.boolean('Employees', help="If Employees is checked, SalesFroce Per Users Employees will be created"),
'account': fields.boolean('Accounts', help="If Accounts is checked, SalesFroce Accounts details will be imported to the OpenERP Contact."),
+ 'note': fields.boolean('Notes', help="If Notes is checked, SalesFroce Notes details will be imported to the OpenERP Email History."),
'email': fields.char('Email address to notify', size=128, help="On Successful import the Email is Send to the mention email address."),
'instance_name': fields.char('Instance Name', required=True, size=128, help="Instance name will be used to separate import from multiple salesforce login instance."),
}
@@ -927,6 +945,8 @@
nodes.append('Document')
if current.product:
nodes.append('Product2')
+ if current.note:
+ nodes.append('Note')
return nodes
def import_all(self, cr, uid, ids, context=None):
=== modified file 'import_salesforce/wizard/import_salesforce_view.xml'
--- import_salesforce/wizard/import_salesforce_view.xml 2011-07-11 11:32:11 +0000
+++ import_salesforce/wizard/import_salesforce_view.xml 2011-07-12 11:18:59 +0000
@@ -43,6 +43,7 @@
<field name='task'/>
<field name='product'/>
<field name='employee'/>
+ <field name='note'/>
</group>
</group>
<group colspan="4" col="2">
_______________________________________________
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