Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
9279 Lượt xem

HI all,

I imported the .csv file in Opportunities but it will display the data that I imported to Leads. I need to straight away import the data to Opportunities not Leads, may i know where can I modify the code? Can anyone give me the clear instructions or guidelines?

Many thanks.

Regards, Jessie

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In your import file, add a column with the title type, and make all the rows opportunity.

Ảnh đại diện
Huỷ bỏ
Tác giả

hi, i added a column and put it as opportunity, then choose Type as this new column and import it. Then come out with this error -> "uncaught exception: event import inappropriate in current state imported"

Câu trả lời hay nhất

the field type determines if what you import is a lead or an opportunity.

See the source code:

'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'),],'Type', 
             help="Type is used to separate Leads and Opportunities")

from http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/crm/crm_lead.py#L267

_defaults = {
             'type': 'lead',
            }

from http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/crm/crm_lead.py#L317

Ảnh đại diện
Huỷ bỏ
Tác giả

May I know where is the file located? I install the OpenERP All-In-One Installation for windows.

/addons/crm/crm_lead.py or /server/openerp/addons/crm/crm_lead.py - I don't work with OpenERP on Windows.

Tác giả

Ok, I found it, same path (/server/openerp/addons/crm/crm_lead.py). Many thanks.