Unable to confirm sales order in odoo - odoo-12

Here is the error shown below.
No procurement rule found in location "Partner Locations/Customers" for product "A".
Check routes configuration.
I would also like to know why are the sales orders being redirected to only one company though the product of that particular order belongs to another company. How can we redirect orders respective to the product owners?

You need to set you rules in Inventory. Did you by any chance upgraded from a previous version of Odoo?
In Odoo 12 - Go to Inventory -> Configuration -> Routes and create routes for receiving and getting out products. Then go to Inventory -> Configuration -> Routes and adjust the routes for delivering to customers: Pull From / WH/Stock to Partner Locations/Customers.
This is how I manage to do it after upgrading from Odoo 10 to Odoo 12. I will look more in depth to see if there are also other open dependencies.

Related

Magneto2 NO customer order history on frontend under My Account, orders only visible from Admin?

Testing our Magento 2.3.1 site after migration and new development completed. We are about to go live then I saw a problem with viewing the customer order history under My Account > My Orders. Shows the following message "You have placed no orders."
I can view this test customers orders in Admin, all old orders and new orders show up normally. This lack of order history happens with old and newly created customers.
I feel there is something weird going on with how the customer account relates/configured to the store. If so where in the DB should I be looking to validate this hunch?
Has anyone seen anything like this, Thanks for your help!
I have tested this using old imported customers from 1.9.4 and new customers. No change in order history shown.
I expect to see the full history of my customers orders. instead, I'm greeted with a "You have placed no orders." message.

Delete single product from Facebook Product Catalog

I'm working on adding Dynamic Product Ads to our app. I've created a Product Catalog through the Facebook Business Manager and successfully uploaded a CSV file of our entire product catalog. I'm also in the process of setting up a daily refresh of the products.
My question is - how do I make an immediate DELETE request for a specific product? If a user deletes a product I don't want to wait a whole day for the product feed to be refreshed and risk the user seeing an ad for a deleted product. The docs make it seem like that isn't supported... but I can't believe that's the case.
Relevant from the Facebook docs:
Update Invidividual Product
Product Item Reference (I think this is deprecated - DELETE request to /{product_item_id} did not succeed).
How about using the rules in Product Sets to exclude that product/s and then working with the Product Sets with the ads.
I got the product OFF facebook by editing the data source CSV, and under the availability column, I added discontinued. That removed it from Facebook after being imported from shopify.
Sorry for being late to the party.
I'm actually coping with this right now, and the only thing I can find in the API stating about individual products is actually when it comes to the Catalog Batch
To send item updates, use the /{catalog_id}/batch endpoint.
To create, update, or delete items in your catalog, make an HTTP POST
call to:
https://graph.facebook.com/<API_VERSION>/<CATALOG_ID>/batch?requests=

How to get customer id KUNNR of current Launchpad user?

I am writing a custom Fiori to access sales data from an SAP ERP backend system using a Gateway.
The use case is "customer logs in launchpad, opens Fiori app and sees all his/hers sales items based on the customer id". The customer id is stored in kna1-kunnr and has to be included in a select on the vbak table in SAP. Nothing fancy.
Now I ask myself: how do I get the customer id / kunnr? What do I get at all from the currently logged in user? When debugging my Gateway project code, is it actually the name stored in sy-uname or can I get something better?
How should I continue to get the customer id / kunnr? Are there some function modules like GET_CUSTOMER_ID_OF_USER to call in the SAP ERP?
Or are the actually other / better ways to get the sales documets for one user?
Update
Thank you for your answers so far. I am going to check the default Fiori implementations to get some inside. But, since we are already here, I want to specify my question a little bit more:
Giving I create an OData model in my Component.js like that:
var oModel = new sap.ui.model.odata.ODataModel("[...]/sap/opu/odata/sap/Z_MYODATA_SRV/",
false, "user", "password" );
user and password are supposed to be the ones currently entered as user credentials in the Fiori Launchpad. How can I access those? Are there some SAPUI5 api like getCurrentUser or getCurrentSession ? Do I actually have to do this user check?
You are correct that to identify all of the sales orders for a customer you need to read them from VBAK (or use BAPI_SALESORDER_GETLIST, etc).
The relationship between logged in user and customer is not something that's the same in every SAP ECC system. You may find that the logged in user is the same as the customer number, but with a prefix - for example, logged in user C12345678 for customer 0012345678. Or there may be some other type of relationship that's store in a custom field on the customer master itself. The best option is to check with the person responsible for the configuration in Sales and Distribution. Only then can you know how to determine the customer for a logged in customer user.
Answering your question
Now I ask myself: how do I get the customer id / kunnr? What do I get at all from the currently logged in user?
It is done on backend with standard customizing, not via OData methods like you intend to do it.
Mikael gave you the rough idea, but didn't finished it so I will give a more comprehensive answer.
We need to differentiate between front-end and back-end authorizations, for Fiori app functioning you need to types of roles/authorizations:
The SAP Fiori roles that define which Fiori apps are displayed to the user
Launchpad authorizations
General OData authorizations
Trusted RFC back-end connectivity authorizations
Back-end authorizations and roles which contain authorizations to display the related business data
This concept is depicted on this figure:
The assignment of the front-end is described here and is out of scope now. Now we are focusing on bullet 2.
Every Fiori app has its role model and one should follow the implementation given in app description. Let's consider how it is done based on Sales Order creation app (F0018) sample:
OData service that returns business-data is SRA017_SALESORDER_CREATE_SRV, so to run it one needs frontend role SAP_SD_BCR_FIELDSALESREP_X1 and backend role SAP_SD_SO_CRE_APP
Also app description give us the following prerequisits:
Before implementing the Create Sales Order app, you must ensure the following:
That an employee master record is created with the following attributes:
If you have implemented SAP ERP HCM and maintained employees in the HCM personnel records, ensure that the employee personnel record has the infotype Communication, with a subtype of System User Name (SY-UNAME) (Infotype 0105, Subtype 0001).
If you have not implemented SAP ERP HCM, implement the Sales and Distribution configuration around Use Sales Employees with HR (Tcode: PULT). This IMG setting copies the appropriate HCM tables from the 000 Client and allows the setup of the employee record with the Infotype Communication and a Subtype of System User Name (SY-UNAME) (Infotype 0105, Subtype 0001).
It associates the USERID of the employee with the personnel number assigned as a partner function sales employee in the customer master.
After implementing the above customer SAP user id will be bound to his employee ID (PERNR), and his employee ID consequently will be bound to partner function in XD02.
And that's not all, what comes next?
THe following order parameters should be maintained in in SIMGH tcode in order customer to see his orders and can create the new ones.
Call transaction SIMGH to open the Create Sales Orders node and configure user information in Customizing activity Define Configuration Parameters using the parameters listed below. For more information, see the documentation available for the Customizing activity.
Document Type (DOCTYPE)
By default, the app uses the standard order document type (technical key TA resp. OR). Changing this to something other than a sales order may significantly impact the functionality of the application.
Order Period (ORDPERIOD)
This defines how many days into the past sales orders are retrieved. The suggested value is 30 days.
Search Period (SEAPERIOD)
This defines how many days into the past a search must look for sales orders that match the search criteria. The suggested value is 90 days.
Ship To Party (SHIP_TO/PARTNER_ROLE)
This defines which partner role in the customer master is used for the ship-to party. The suggested value is WE.
Forwarding Agent (FORWARDING_AGENT/PARTNER_ROLE)
This defines which partner role in the customer master is used for the forwarding agent. The suggested value is SP.
and even that's not all
App description gives the following BADIs to implement in order to enable such linking
Implement the following BAdIs:
Customer Association to Employee
You can use this BAdI to associate employees with specific customers.
Only after all the above steps the customer will be able to order and/or view his sales items.
The moral: always check the app description thoroughly because the role model varies per-app.
Have a look at the standard Fiori applications. For example, in Create Sales Order, there is a BADI provided to implement the relation you are looking for (but for an employee to a customer). In the standard setup, the partner functions of the customer master is used to map what customers are visible to an employee.
Most likely, you have a similar setup already in place if your customers actually have user accounts in your system. If could be as a parameter of the user or as a (custom?) partner role.
http://help.sap.com/saphelp_fiorierpx1_100/helpdata/en/6d/135652f9c21457e10000000a445394/content.htm

How to update target list dynamically?

I am using the Community Edition. Daily I add new leads to the Sugar CRM database. We send newsletters using target lists. How can I update the target lists automatically before to start the emailing process? Ideally I would like to use a SQL statement or a report as a source of e-mail addresses for the emailing process. Is it possible?
The workflow is:
The user fill a order in our web. I need to add the record to the SugarCRM database.
According the user profile, he/she is assigned to a different target list. There are 4 target lists according the user profile.
Then, according the profile, the user will receive a different group of emails at 7, 15, 30 and 90 days from the registration date.
As I explain, a static target list does not work here because each day different users enroll in the system and the emailing schedule for each user depends on the date of registration.
I am trying to discover how to add directly via php to create dynamically a target list and then to launch the campaign but I am not sure if there is a better way.
I have found the solution. It is pretty simple. I only need to fill via sql the emailman table. I do not need to fill targets lists or similar.

How can we send a follow up email for Wishlist?

How can we send a email to the user reminding them that some products are available in their wishlist?
I have seen this functionality on many sites and I wish someone would have Implemented it by now.
There should be a way to Do this program way.
Also There is no way available in magento to see wishlist report,like which item is most available in wishlist or top 5 wishlist products.Is there a way to Implement Both the things
Thanks in advance
Unfortunately there is no out of the box solution for both of your issues.
There does exist a $14.99 module that will give you more insight on wishlisted items and the relative customers: http://www.magentocommerce.com/magento-connect/admin-global-customer-wishlist-viewer.html
As for sending emails to those customers, this type of functionality exists in Magento Enterprise Edition. You have the ability to automatically send emails to customers with wishlisted items - unless you are willing to shell out $15,000 for the enterprise version, you are a bit out of luck here.
You can either utilize a email blast service like MailChimp which integrates directly into magento to send focused email blasts OR do some custom development work.
You can do this with MageMail. (Full disclosure: I'm the founder of MageMail).
In case you're looking to build this custom, you basically just want to pull in the wishlist_item table and join on the customer table to get the customer associated with the wishlist item.
One gotcha to keep in mind is that all of the wishlist items are included in the same wishlist, regardless of when they were added (they're not like quotes in that regard). So if you're building this custom, you'll want to make sure to build it in such a way that it will follow-up based on the date the wishlist item was added and not the date of the wishlist record itself.
I think that Enterprise has support for multiple wishlists but I haven't seen it in use much in the wild.
I think you can do exactly what you need the following way:
1. Segment your customers according to their wishlist records with Market Segmentation Suite extension. You can put users with particular wishlist item into a group or form a customer group of all users with non-empty wishlists. You can then export those segmented lists for future use.
2. Follow up your customers according to segmented lists you made with emails tailored to specific customer groups with Follow Up Email.
As for wishlist reports you can track which products have been added to customers’ wishlists, when the product has been added, how many days this item is in the wishlist with Advanced reports unit named Users Wishlists by aheadWorks.
So, these are 3 different extensions, but they definitely cope with the task you describe.