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] [MIG] delivery_ups_oca #989

Open
wants to merge 25 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cf16fa6
[ADD] delivery_carrier_label_ups
hbrunn Sep 18, 2020
b19c8f1
[RFR] Extract Test classes from Case classes for easier overriding
StefanRijnhart Apr 2, 2021
64d762b
[FIX] access to ir.config_parameter
astirpe Jul 7, 2021
826ab48
[IMP] delivery_carrier_label_ups: black, isort, prettier
victoralmau Aug 3, 2021
da423a4
[MIG] delivery_ups_oca: Migration to 13.0 + Refactor
victoralmau Aug 4, 2021
974faa4
[FIX] delivery_ups_oca: Prevent error when convert price in different…
victoralmau Sep 28, 2021
83621e2
[FIX] delivery_ups_oca: Define the total weight correctly in an order.
victoralmau Oct 21, 2021
9005031
[REF] delivery_ups_oca: Code refactor.
victoralmau Oct 22, 2021
6bb7e3c
[FIX] delivery_ups_oca: Pevent errors in tests.
victoralmau Apr 25, 2022
5254fed
[FIX] delivery_ups_oca: Show the errors to avoid the error of access …
victoralmau Jun 6, 2022
d6c4dcb
[FIX] delivery_ups_oca: Create label from create_shipping response to…
victoralmau Jun 9, 2022
a6db5ac
[FIX] delivery_ups_oca: Set the correct URLs.
victoralmau Jun 17, 2022
383fa76
[FIX] delivery_ups_oca: Apply domain to ups_default_packaging_id fiel…
victoralmau Jun 20, 2022
41f2ff8
[FIX] delivery_ups_oca: Set the correct weight if we use packages.
victoralmau Jun 22, 2022
ca8f2f0
[FIX] delivery_ups_oca: Fix packages when package_ids is not set.
victoralmau Jun 22, 2022
6303d85
[FIX] delivery_ups_oca: Set correct ShipFrom (warehouse or company ad…
victoralmau Jul 1, 2022
943a53b
[IMP] delivery_ups_oca: Improve tests to allow inheritance.
victoralmau Aug 10, 2022
3b941b0
[FIX] delivery_ups_oca: Fix cancel_shipment method
victoralmau Dec 12, 2022
7660c36
[IMP] delivery_ups_oca: black, isort, prettier
manuelregidor Feb 29, 2024
95bfed2
[MIG-IMP] delivery_ups_oca: Migration to 14.0 and oauth
manuelregidor Feb 29, 2024
e8a3e13
[UPD] Update delivery_ups_oca.pot
May 27, 2024
e3c8239
[FIX]delivery_ups_oca: update delivery state
manuelregidor Jun 10, 2024
d85ef02
Added translation using Weblate (Italian)
mymage Jan 9, 2025
c791c36
[IMP] delivery_ups_oca: pre-commit auto fixes
Tisho99 Feb 20, 2025
bd6834b
[MIG] delivery_ups_oca: Migration to 17.0
Tisho99 Feb 20, 2025
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
143 changes: 143 additions & 0 deletions delivery_ups_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
================
Delivery UPS OCA
================

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

.. |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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-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_ups_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_ups_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 adds `UPS <https://ups.com>`__ to the available carriers.

It allows you to register shippings, generate labels, get rates from
order, read shipping states and cancel shipments using UPS webservice,
so no need of exchanging any kind of file.

When a sales order is created in Odoo and the UPS carrier is assigned,
the shipping price that will be obtained will be the price that the UPS
webservice estimates according to the order information (address and
products).

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to:

1. Add a Shipping Method with Provider ``UPS`` and fill in your UPS
credentials (Client ID and Client Secret)
2. Configure in Odoo all required fields of the UPS tab with your
account data https://wwwapps.ups.com/ppc/ppc.html (Shipper number,
Default Packaging, Package Dimension Code, Package Weight Code and
File Format).
3. If yo have "Tracking state update sync" checked all delivery orders
state check will be done querying UPS services.
4. It is possible to create a UPS carrier for cash on delivery parcels.
Select the ``ups`` delivery type and check the "Cash on Delivery"
checkbox under the "UPS" tab. It is required to select the "UPS COD
Funds Code" when the "Cash on Delivery" option is selected.

**NOTE** You need to add an APP from https://developer.ups.com/ for
using the webservice.

Usage
=====

You have to set the created shipping method in the delivery order to
ship:

- When the picking is 'Transferred', a *Create Shipping Label* button
appears. Just click on it, and if all went well, the label will be
'attached'.
- If the shipment creation process fails, a validation error will
appear displaying UPS error.
- When the delivery order is cancelled, it's automatically cancelled
too in UPS.
- If you have "Tracking state update sync" checked in the shipping
method, a periodical state check will be done querying UPS services.

Known issues / Roadmap
======================

- Support international forms
- Support package service options

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_ups_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
-------

* Hunki Enterprises BV
* Tecnativa
* ForgeFlow

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

- Holger Brunn <mail@hunki-enterprises.nl>
(https://hunki-enterprises.nl)
- `Tecnativa <https://www.tecnativa.com>`__:

- Víctor Martínez
- Pedro M. Baeza

- `ForgeFlow <https://www.forgeflow.com>`__:

- Jordi Ballester

- `Sygel <https://www.sygel.es>`__:

- Manuel Regidor

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_ups_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_ups_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
26 changes: 26 additions & 0 deletions delivery_ups_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2020 Hunki Enterprises BV
# Copyright 2021-2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Delivery UPS OCA",
"summary": "Integrate UPS webservice",
"version": "17.0.1.0.0",
"development_status": "Beta",
"category": "Delivery",
"website": "https://github.com/OCA/delivery-carrier",
"author": """Hunki Enterprises BV, Tecnativa, ForgeFlow,
Odoo Community Association (OCA)""",
"license": "AGPL-3",
"excludes": ["delivery_ups"],
"depends": [
"stock_delivery",
"delivery_package_number",
"delivery_price_method",
"delivery_state",
],
"data": [
"data/stock_package_type_data.xml",
"views/delivery_carrier_view.xml",
"views/stock_picking_view.xml",
],
}
120 changes: 120 additions & 0 deletions delivery_ups_oca/data/stock_package_type_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Tecnativa - Víctor Martínez
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="product_packaging_ups_01" model="stock.package.type">
<field name="shipper_package_code">01</field>
<field name="name">UPS Letter</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_02" model="stock.package.type">
<field name="shipper_package_code">02</field>
<field name="name">Customer Supplied Package</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_03" model="stock.package.type">
<field name="shipper_package_code">03</field>
<field name="name">Tube</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_04" model="stock.package.type">
<field name="shipper_package_code">04</field>
<field name="name">PAK</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_21" model="stock.package.type">
<field name="shipper_package_code">21</field>
<field name="name">UPS Express Box</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_24" model="stock.package.type">
<field name="shipper_package_code">24</field>
<field name="name">UPS 25KG Box</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_25" model="stock.package.type">
<field name="shipper_package_code">25</field>
<field name="name">UPS 10KG Box</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_30" model="stock.package.type">
<field name="shipper_package_code">30</field>
<field name="name">Pallet</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_2a" model="stock.package.type">
<field name="shipper_package_code">2a</field>
<field name="name">Small Express Box</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_2b" model="stock.package.type">
<field name="shipper_package_code">2b</field>
<field name="name">Medium Express Box</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_2c" model="stock.package.type">
<field name="shipper_package_code">2c</field>
<field name="name">Large Express Box</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_56" model="stock.package.type">
<field name="shipper_package_code">56</field>
<field name="name">Flats</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_57" model="stock.package.type">
<field name="shipper_package_code">57</field>
<field name="name">Parcels</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_58" model="stock.package.type">
<field name="shipper_package_code">58</field>
<field name="name">BPM</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_59" model="stock.package.type">
<field name="shipper_package_code">59</field>
<field name="name">First Class</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_60" model="stock.package.type">
<field name="shipper_package_code">60</field>
<field name="name">Priority</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_61" model="stock.package.type">
<field name="shipper_package_code">61</field>
<field name="name">Machineables</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_62" model="stock.package.type">
<field name="shipper_package_code">62</field>
<field name="name">Irregulars</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_63" model="stock.package.type">
<field name="shipper_package_code">63</field>
<field name="name">Parcel Post</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_64" model="stock.package.type">
<field name="shipper_package_code">64</field>
<field name="name">BPM Parcel</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_65" model="stock.package.type">
<field name="shipper_package_code">65</field>
<field name="name">Media Mail</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_66" model="stock.package.type">
<field name="shipper_package_code">66</field>
<field name="name">BPM Flat</field>
<field name="package_carrier_type">ups</field>
</record>
<record id="product_packaging_ups_67" model="stock.package.type">
<field name="shipper_package_code">67</field>
<field name="name">Standard Flat</field>
<field name="package_carrier_type">ups</field>
</record>
</odoo>
Loading