Contribution Showcase: Delivery Service Tour

Our contribution is making progress, it is still a some work. We are now continuing to clean up the code and writing tests.

Since there are a lot of good discussions here and since you have asked to see code we have made our code available at frappe/frappe branch:delivery and frappe/erpnext branch:delivery. Please check it out and help improve through pull requests.

We have separated the google maps configuration which is needed for calculating the distances into a Setup DocType (Integrations) in Frappe so it can be used at other places within the framework at a later stage. This adds a requirement for googlemaps in frappe’s requirements.txt. It was also necessary to change the way Standard Reply works in order to being able to have Jinja variables in the subject of the email (e.g. “Delivery for you on January 1st at 10 AM”).

We now have a new Driver DocType and Driving License Categories for that driver as a child table. These live under HR. The Delivery and it’s Delivery Stops are in the ERPNext Stock module.

In order to test this. You will need to check out both the frappe and erpnext delivery branch and you will have to set the googlemaps API key in integrations. You will also have to configure a standard reply “Delivery Notification”.

1 Like

You may already know this, but Google Maps in this context would require a paid Premium Plan, which is not cheap. OpenStreetMap may be more appropriate, but that’s your call!

1 Like

That’s right, GoogleMaps isn’t cheap and open.

Another alternative with a good API can be Mapzen (https://mapzen.com/).
It relies on Leaflet and OpenStreetMap and their free tier is interesting.

But as @felix says, it’s your call :wink:

1 Like

I thought that the standard use model (1000 free calls) included our use case but it doesn’t. This means that the google maps API is not a good idea because it doesn’t provide basic free use.

So we have two suggestions now:

  • OpenStreetMap
  • Mapzen
  • Mapbox

Any more suggestions and any strong favorites?

I we use something like Mapzen we could use their Time-Distance Service which automatically calculates the best route.

1 Like

Hello,

I have checked branch delivery, but code is not available in delivery branch.
https://github.com/frappe/erpnext/tree/delivery

Thanks,
Sam

should be there now

1 Like

Thanks

Yes that’s the main advantage of Mapzen: you can use their Time-Distance Matrix calculator, which can have a lot of applications.

Hi,

Sorry about this is a bit offtopic

This is why I think that’s very important the existence of a Party Doctype. All community Frappe/Erpnext should join efforts to join all this separated doctypes into one. It should be a Party doctype and you can select the roles for all driver,employee, customer, supplier, doctor, student, user, etc etc. for instance, how many times we have to enter the name of the same person in erpnext/frappe?

1 Like

Mapzen and Mapbox are both built on top of OpenStreetMap, so the list can effectively look like

  • Mapzen
  • Mapbox

Has anybody successfully integrated either Mapzen or Mapbox and would you be willing to contribute to this by replacing Google Maps in the code and config?

Hi @dominik

Thanks a lot for this awesome contribution. Could we still keep Google Maps as an option for those who might prefer/need it? We tried building a feature with OpenStreetMap a little while back but the level of detailing in our region was too poor and generally unusable

Kind regards,

Data reliability in different regions is an important point. Google Maps works about everywhere (outside of mainland China).

Maybe we could implement it with Google Maps for now and then work on a Mapzen or Mapbox integration. We would have to think how we can make this configurable. This is also something that could be implemented by someone else who has experience with Mapzen or Mapbox and could be done at a later stage.

2 Likes

This is a quick update on the progress. We are planning on having the feature ready on Nov 3, 2017. We still have to:

  1. Code review and fixes of frappe/frappe:delivery
  2. Code review and fixes of frappe/erpnext:delivery
  3. Writing tests for frappe/frappe:delivery
  4. Writing tests for frappe/erpnext:delivery
  5. Create a default standard reply in the system with a patch
  6. Delivery and Driver configurable through Naming Series DocType
  7. Final Testing of Delivery before Contribution
  8. Documentation for Delivery

Is there anything anyone from the community would like to contribute?

4 Likes

PR is sent in GH [New Feature] Delivery by creamdory · Pull Request #11483 · frappe/erpnext · GitHub . Anyone can add something within the scope or fix something if you see anything that needs fixes. :slight_smile:

5 Likes

Sent PR to frappe https://github.com/frappe/frappe/pull/4454 for googlemaps integration setup.

1 Like

How do you handle Customer mentioned in the delivery note ? Because actual delivery is made to the customers in a Delivery Stop .

Also,how do the customers delivery and payments and invoice link up ?

Hi @Savad_Ibrahim! Current design is this:

  • When Delivery Note is created and submitted, it can be linked to a Delivery Trip.
  • Currently, no direct link from Delivery Trip to Sales Invoice except for the Delivery Note.

You can add a custom field in the Delivery Stop table for Sales Invoice. More for reference only. Doesn’t do much else.