Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][ADD] delivery_sendcloud_oca #852

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
337 changes: 337 additions & 0 deletions delivery_sendcloud_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,337 @@
==================
Sendcloud Shipping
==================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dbe01d1d34d6b43fe7239a4179838085ee43b5a8e5eef4ad0a384761109282be
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fdelivery--carrier-lightgray.png?logo=github
:target: https://github.com/OCA/delivery-carrier/tree/17.0/delivery_sendcloud_oca
:alt: OCA/delivery-carrier
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/delivery-carrier-17-0/delivery-carrier-17-0-delivery_sendcloud_oca
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/delivery-carrier&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides sendcloud shipping integration with Odoo

This module mostly implements what's described in
https://docs.sendcloud.sc/api/v2/shipping/

Full documentation for developers is in https://docs.sendcloud.sc/.

This module works for the Community Edition as well as the Enterprise
Edition.

**Table of contents**

.. contents::
:local:

Installation
============

Create an account on sendcloud.com and choose a plan. Go to integrations
and select Odoo integration to use the Odoo integration or select api
integration if you only want to use the api integration (see readme for
more information).

Odoo Integration
----------------

Verify that the value of "web.base.url" parameter in System Parameters
is set with the correct url (eg.: "https://demo.onestein.eu" instead of
"http://localhost:8069").

Go to Sendcloud > Configuration > Wizards > Setup the Sendcloud
Integration. A wizard will pop up.

|image1|

Select Odoo Integration. Start Setup. You will be redirected to a
Sendcloud page asking you to authorize OdooShop to access your Sendcloud
account. Click on Connect in the Sendcloud page.

|image2|

Go back to the Odoo Integration configuration. An integration "OdooShop"
is now present in the Integration list view. Open the OdooShop
Integration form. Edit the OdooShop Integration. The changes you make
will be in sync, Sendcloud side, with the integration configuration.

|image3|

In case multiple integrations are present, sort the integrations by
sequence, to allow Odoo to choose the default one that will be used.
Please note that when using the Odoo integration an "incoming order" is
created in Sendcloud as soon as you validate the salesorder. The
“incoming order” has status “in process” in Sendcloud and is not
forwarded to the carrier yet.

|image4|

When you validate the delivery in Odoo the label is created and the
pick-up assignment is send to the carrier.

|image5|

In previous version there was a possibility to connect to the API
integration instead of the Odoo integration. To benefit from Sendcloud
support we highly recommend you to upgrade to the latest version of this
module with the Odoo integration.

Sendcloud panel settings
------------------------

When you configure the Integration settings in the online Sendcloud
panel (https://panel.sendcloud.sc/) those settings are also sync-ed with
the Integration settings Odoo side.

Synchronize Sendcloud objects
-----------------------------

After the setup of the integration with Sendcloud server is completed,
second step is to synchronize the objects present in Sendcloud server to
Odoo. To synchronize Sendcloud objects for the first time:

- Go to Sendcloud > Configuration > Wizards > Sync the Sendcloud
Objects. A wizard will pop up.

|image6|

- Select all the objects. Confirm. This will retrieve the required data
from Sendcloud server.

|image7|

Some Sendcloud objects will be automatically synchronized from the
Sendcloud server to Odoo. Those Sendcloud objects are:

- Parcel Statuses
- Invoices
- Shipping Methods
- Sender Addresses

To configure how often those objects should be retrieved from the
Sendcloud server:

- Go to Settings > Technical > Automation > Scheduled Actions. Search
Scheduled Actions for "Sendcloud".

|image8|

- Set the "Execute Every" value according to your needs.

Sender Addresses and Warehouses

In case of multiple warehouses configured in Odoo (eg.: user belongs to
group "Manage multiple Warehouse"):

Go to Sendcloud > Configuration > Integration. Click on Configure
Warehouse Addresses. A wizard will pop up. Set the corresponding
Sendcloud Sender Address for each of the warehouse addresses.

|image9|

Alternatively, in Inventory > Configuration > Warehouses, select an
address. In the address form, go to Sales and Purchase tab and set the
Sencloud Sender Address. In Sale Order > Delivery: select the Warehouse.
Check that the address of the Warehouse has a Sendcloud Senser Address.

|image10|

Initial sync of past orders
---------------------------

Once all the previous configuration steps are completed, it is possible
to synchronize all the past Odoo outgoing shipments to Sendcloud. Those
shipments are the ones already setup with a Sendcloud shipping method.

Go to Sendcloud > Configuration > Wizards > Sync past orders to
Sendcloud. A wizard will pop up. Select the date (by default set to 30
days back from today) from which the shipments must be synchronized.

Click on Confirm button: the shipments will be displayed in the Incoming
Order View tab of the Sendcloud panel. They will contain a status “Ready
to Process” if they are ready to generate a label and the order
fulfillment will continue.

Auto create invoice
-------------------

When sending a product outside the EU, Sendcloud requires an invoice
number. In case shipment is made with a product that can be invoiced
based on delivered quantities, this combination of factors prevents the
label being created in Sendcloud when confirming the SO.

A possible solution is to automatically create a 100% down-payment
invoice when shipping to outside the EU. To enable this feature, go to
the "General Settings": under the Sendcloud section you can find the
"Auto create invoice" flag. Notice: this feature is still in beta
testing.

Test Mode
---------

To enable the Test Mode, go to the "General Settings": under the
Sendcloud section you can find the "Enable Test Mode" flag. Enabling the
Test Mode allows you to access extra functionalities that are useful to
test the connector.

There is no seperate test environment available on the Sendcloud portal.
This means that as soon as you create labels the carries is given the
order to pickup the goods. You can use carrier "unstamped letter" for
testing. When testing with other carriers make sure that you cancel the
labels in the Sendcloud portal within a couple of hours otherwise the
label will be billed and picked up.

Since there is no test environment it's very important to know that
Sendcloud stores it records based on the delivery number, for instance
WH/OUT/0001, this field is idempotent. So when you start testing and you
will use delivery number WH/OUT/00001 this number is stored in
Sendcloud. When you go live and use the same delivery numbers, in this
case WH/OUT/00001, Sendcloud will treat this as an update of the
existing record and will send back the shipping-address that was already
stored (created while testing). To avoid this problem you should set a
different prefix on the sequence out in your testenvironment. In debug
mode, Technical/Sequences Identifiers/Sequences, select the sequence out
and adjust this to WH/OUT/TEST for instance.

|image11|

.. |image1| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_10.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_20.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_30.png
.. |image4| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_40.png
.. |image5| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_50.png
.. |image6| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_70.png
.. |image7| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_80.png
.. |image8| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_90.png
.. |image9| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_100.png
.. |image10| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_110.png
.. |image11| image:: https://raw.githubusercontent.com/OCA/delivery-carrier/17.0/delivery_sendcloud_oca/static/description/Image_120.png

Usage
=====

In short this is how the module works:

- the user creates a sale order in Odoo; the user clicks on "Add
shipping" button and selects one of the shipping methods provided by
Sendcloud
- when confirming the sale order, a delivery document is generated
(stock.picking)
- when confirming the picking, a parcel (or multiple parcels) for the
specific sales order are created in Sendcloud under Shipping >
Created labels
- the picking is updated with the information from Sendcloud (tracking
number, tracking url, label etc...)

Map of Sendcloud-Odoo data models
---------------------------------

========= ====
Sendcloud Odoo
========= ====
========= ====

\| \| Brand \| Website Shop \| \| Order \| Sales Order \| \| Shipment \|
Picking \| \| Parcel (colli) \| Picking packs \| \| Sender address \|
Warehouse address \| \| Shipping Method \| Shipping Method \|

Multicollo parcels
------------------

In Inventory > Configuration > Delivery Packages, set the carrier to
Sendcloud. In the out picking, put the products in different Sendcloud
packages to create Multicollo parcels.

Service Point Picker
--------------------

The module contains a widget, the Service Point Picker, that allows the
selection of the service point. The widget is placed in the "Sendcloud
Shipping" tab of the picking. The widget is visible in case the
following is true:

- the configuration in the Sendcloud panel has the Service Point flag
to True (in the Sendcloud integration config)
- the Shipping Method selected in the picking is provided by Sendcloud
- the Shipping Method has field sendcloud_service_point_input ==
"required"
- all the criteria (from country, to country, weight) match with the
current order

Cancel parcels
--------------

When canceling parcels a confirmation popup will ask for confirmation.

Delivery outside EU
-------------------

Install either OCA module 'product_harmonized_system' or Enterprise
module 'account_intrastat' for delivery outside of EU. Both include
extra field 'country of origin'.

Troubleshooting
---------------

If the communication to the Sendcloud server fails (eg.: while creating
a parcel), the exchanged message is stored in a Log section, under
Logging > Actions.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/delivery-carrier/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/delivery-carrier/issues/new?body=module:%20delivery_sendcloud_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Onestein

Contributors
------------

- ``Onestein <https://www.onestein.nl>``\ \_\_

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/delivery-carrier <https://github.com/OCA/delivery-carrier/tree/17.0/delivery_sendcloud_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions delivery_sendcloud_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizards
from . import controllers
Loading
Loading