Need to pass lead custom field value to partner when converting to lead to partner in OpenERP 7 - odoo

I'm new to OpenERP 7 and I'm trying to pass a custom field value from Lead to Partner when I convert a Lead to Partner.
I understand that I need to modify or add some functions in wizard directory of my new module (I assume I need to extend the crm module)
Is correct? Anyone can recommend me any example or let me know some tips?
Thanks in advance.

There are actually two methods defined in crm._lead_create_partner and _lead_create_contact. These methods create partner and contact respectively. You can override these methods(first use the _lead_create_partner) to pass value to partner.

Related

Create Magento category with assigned id using SOAP api

I am working on a script (which is in Python) for doing some management on our Magento environment.
Now I am wondering if I can create categories with assigned ID.
I think this might be impossible due to key constraints. But is there a way?
Just putting category_id in the parameter list in catalog_category.create, it does not work, it just skips the parameter.
The main reason of wanting this is because I need to know the category ID in order to create the subcategories.
I do know the Magento API returns the ID of the created category. But, I have no way of knowing what subcategories are supposed to go to that created category. (Or I can rewrite a load of code, which I am not too fond of...).
So I was thinking this was the easiest way to go with right now.
Any suggestions, comments, answers? Anything is appreciated!
No, you can't. Magento's entity IDs are for Magento so you cannot specify what you'd like them to be.
When you create an entity with the API it will return the new ID, as you've said.
For your use case it might be easiest to add a new attribute to your categories in Magento, call it "my_category_id" or something and allow your API to set that instead.

Does OpenERP SAAS support use of related field?

I am using OpenERP 7.0 SAAS environment.
I have to use details of partner_id from res.partner in custom table. Is there any method to access the values of selected partner_id to be used in that table.
Thanks & Regards,
Atchuthan
No, because on the SaaS/Cloud environment you can only create custom fields via the user interface, and the UI does not currently support creating function fields (fields.related is a kind of function field).
Depending on your use case there's a good chance you can find an alternative satisfying approach, though ;-)

Can I overwrite the number of decimal places for a Salesforce Managed Package field

We are developing a grants management tool on the Salesforce Platform. The Web interface for grant seekers is in .NET and it communicates with Salesforce via API.
Issue: Fields that are part of the Salesforce Managed Package can't be modified.
Specific issue and example: currency fields are all defined with 2 decimals in the Managed Package as this is what most Foundations (customers) want. But some Foundations would like not to display any decimals to the grant seeker (on the Web interface) for these managed package fields.
Question: Is there any way to overwrite the Managed Package field property for the number of decimals displayed (currently defined to show two decimals)?
Thanks for your help.
I don't know of a direct way to change the field settings in an installed managed package.
Some alternatives, with varying degrees of hackeness:
You could create a validation rule and formula field to fake it. Use the formula field for display layouts to show the value of the managed package field less the decimal places. Use the validation rule to stop users enter a value with decimal places (E.g. ROUND(number, num_digits)).
Create your own custom field with the desired number of decimal places. Only display your custom field on the page layout and hide the managed package field. Then copy the value from your custom field into the managed packages field when required. A before insert or before update trigger could handle this.

Prestashop - How to add models to a manufacturer

Im making a web with prestashop about motorcycles. I need let the client search in a select field the trademark of the moto (honda, yamaha) and in other one the specific type of the moto (Ex: Yamaha 445).
How can I do it? ive tried adding the product in a manufacturer but I dont know how to specify a type in them.
Important:
I can't do it with categories/subcategories.
I need that a product can be accessible from differents types of motorcycles.
Anyone can help me? Thanks
You can make use of Layered navigation block module to achieve what you looking for.
It has 3 steps where you can
1. specify where the layered filter will appear
2. Select Product manufacturer
3. Name your template and save it.
This will automatically generate your filtered navigation and group your products as per the manufacturer

Display custom fields in assignment block (SAP CRM 7.0)

I tried to post this on the SDN forums (SAP forums) with very very very little help...seems like anytime I post an SAP topic no one can help :(. So I decided to post on stackoverflow and can only hope there must be some SAP CRM gurus on here...
Here was the origional link I posted on the SAP Forums, so maybe the little help I did get on the sap forums someone can follow along by clicking the link:
http://forums.sdn.sap.com/thread.jspa?threadID=1802454&start=0&tstart=0
And here is the description:
We are running SAP CRM 7.0. We are using the opportunity module as well as "Create Follow Up" (Sales Order / Quotation) so that you have a one to many relationship (1 opportunity may contain many sales orders). I have 2 custom fields inside the Sales Cycle (Quotation) module "Actual Sales Order Value" and "Current Points".
What I am trying to do is take these 2 custom fields and add them to the assignment block called "Linked Transactions" in the Opportunities module. But when I look at all the available fields for this assignment block these 2 custom fields are nt available.
I do not see any way of adding these 2 fields to this assignment block. The only thing I see is "Create NEw Field". But I do not want to create a new field I just want to reference 2 fields from the Sales Cycle module inside of this assignment block.
Does anyone knowif it is possible to add 2 custom created fields that are i the Sales cycle module to add them to the opportunities assignment block that is called linked transactions ?
Thanks,
Jon
I finally got this. I had to use the GENIL_MODEL_BROWSER to see the relationships between these components. The assignment block was the component BTDOCFLOW so I had to enhance this and the view and the context node.
Then in the folder attributes for this context node i had to add a new attribute (right click add). I used the GENIL_MODEL_BROWSER to start at the BTOrder relationship to get to BTOrderHeader to finally get to BTAdminH. I then referenced these fields and generated getter / setter methods. In the get method I had to change my code a bit to start at BTOrder component.
Reference this link for more information: http://forums.sdn.sap.com/thread.jspa?threadID=1875030&tstart=0