Commit Graph

37 Commits

Author SHA1 Message Date
Harald Welte c8ec521f9a fix obtaining a quote (no picking yet)
when we obtain a shipping quote from an SO in quote state, we do
not yet have a picking and hence cannot unconditionally dereference
the picking object in the build_sc_pkg() method.

Related: SYS#6648
2023-11-29 17:46:27 +01:00
Harald Welte 38c2442567 Add ability to add 'description' field to package, not just shipment
seit Januar 2023 muss für den Versand nach Mexiko eine Paketbeschreibung übergeben werden.

UPS schreibt dazu:

Hide quoted text

    However, as of January of 2023, the Mexican Tax Authority adopted the Carta Porte requirements, which mandate that all shipments to and within Mexico include a Package Description field that accurately describes the contents of the shipment.

Sie übergeben die Beschreibung derzeit auf der shipment-Ebene:

},
"carrier": "ups",
"package": {
"type": "parcel",
"width": 20,
"height": 4,
"length": 27,
"weight": 0.48
},
"service": "one_day",
"incoterm": "dap",
"description": "sim cards",
"reference_number": "AM93\\OUT\\07008",
"notification_mail": "roman.rohleder@gmail.com",
"create_shipping_label": true
}

Sie müssen aber sowohl auf shipment-Ebene, als auch auf package-Ebene eine description angeben, damit ein Label erstellt wird.
Z.B.:

},
"carrier": "ups",
"package": {
"type": "parcel",
"width": 20,
"height": 4,
"length": 27,
"weight": 0.48",
"description": "sim cards"
},
"service": "one_day",
"incoterm": "dap",
"description": "sim cards",
"reference_number": "AM93\\OUT\\07008",
"notification_mail": "roman.rohleder@gmail.com",
"create_shipping_label": true
}
2023-11-28 20:58:00 +01:00
Harald Welte b8decb3ec8 Only 'available' moves in the picking when generating customs info
If we perform a partial shipment, we must only generate customs
information for those items which we are actually going to transfer.
2022-05-03 08:25:13 +02:00
Harald Welte fb5e942d45 Include transport insurance cost in shipping estimates
Add 0.35% of the net base currency (EUR) value and add it to the
shipping cost quote from the shipcloud API.
2022-03-16 18:54:40 +01:00
Harald Welte 05a867cc55 Print string formatted ApiError on error
Make sure the user actually sees the error message in the UI

Related: SYS#5736
2022-01-19 22:10:12 +01:00
Harald Welte b6bc9b5dd3 don't copy UPS tracking URL + shipment ID when copying picking 2022-01-19 21:57:25 +01:00
Harald Welte cf9f30057f shipcloud: fix customs value representation
* per-item value_amount should be a string, not a float value
* total_value_amount should be an integer, not a float value

"Error in Shipment Data: Bitte geben Sie die Versandkosten für die
Zollabfertigung an. Der eingegebene Wert ist zu lang und wurde gekürzt."

Closes: SYS#5510
2021-11-22 21:35:36 +01:00
Harald Welte 06ab659ff1 pickup: try to print string formatted ApiError on error
Related: SYS#5452
2021-11-11 20:02:59 +01:00
Harald Welte 843fd694f4 actually store carrier pickup number in correct field 2021-11-11 20:02:59 +01:00
Harald Welte bfb5030701 pickup: actually use current time of record creation
if we use 'default=fields.Datetime.now' it will use the time of the
odoo server start/load,and not the time when the record is created.

Also, use the 'now' time for bot earliest and latest pickup time,
let the user modify it as needed.
2021-06-01 23:51:24 +02:00
Harald Welte 75f5e374fb store UPS pickup number in delivery.carrier.pickup
When following-up with UPS, we need their pickup number, not the UUID of shipcloud.

The returned json looks like this:

{u'shipments': [{u'id': u'a23d961097526050d1f75c2ceef0ec4988e99487'}, {u'id': u'03bca49429ee181f473d8fa7c27cc0166afb6e62'}, {u'id': u'8785ef61d5254726ecb0084a6234ec1ab943cfca'}], u'pickup_time': {u'earliest': u'2021-05-07T08:00:24+02:00', u'latest': u'2021-05-07T14:00:09+02:00'}, u'carrier': u'ups', u'carrier_pickup_number': u'29E4A3S0I71', u'id': u'0360d24d-ce69-49fc-9938-0ec818eb6d54', u'pickup_address': {u'city': u'Berlin', u'first_name': u'Maike', u'last_name': u'Welte', u'country': u'DE', u'company': u'sysmocom GmbH (LRW34a)', u'street_no': u'34a', u'care_of': None, u'id': u'81128c61-b6ba-458e-a7e7-817f2c094f40', u'phone': u'030609871280', u'state': None, u'street': u'Landreiterweg', u'email': None, u'zip_code': u'12353'}}

so in the above example, we want to store u'carrier_pickup_number': u'29E4A3S0I71'

Closes: SYS#5422
2021-06-01 23:36:26 +02:00
Harald Welte d6ab23e8a1 strip all leading + trailing spaces from address elements
Related: OS#5414
2021-04-18 16:45:44 +02:00
Harald Welte 9437a7c005 pickup: more logging 2021-03-18 14:33:29 +01:00
Harald Welte 8c01c30a40 pickup: fix _get_config(); must be issued on delivery.carrier model 2021-03-18 14:32:10 +01:00
Harald Welte b52818b41a pickup: Fix datetime / timezone conversion 2021-03-18 14:31:55 +01:00
Harald Welte 0a4df5f71a pickup: modification of earliest/latest only in draft state
once shipcloud has confirmed the pick-up, we cannot modify the times.
2021-03-18 14:01:55 +01:00
Harald Welte 7c39cf76b6 pickup: Fix conversion from Datetime field to datetimme instance
Quite odd that one has to call a static method providing the value
of the field as argument, but well...
2021-03-18 13:59:37 +01:00
Harald Welte 7f530376ec fix pick-up address
odoo_1                |   File "/opt/odoo/v8_addons/odoo-ext-sysmo/odoo_shipcloud/models/shipcloud_pickup.py", line 51, in button_request
odoo_1                |     sc_addr = build_sc_addr(p.address)
2021-03-18 13:53:38 +01:00
Harald Welte 870281afd0 Add new model for shipment pick-ups
Using this model, the user can select a number of pickings and
request them to be picked up from a user-specified address.
2021-03-16 18:52:59 +01:00
Harald Welte 85aae33280 shipcloud: Mark some fields 'readonly' if UI shouldn't write them 2021-03-15 21:17:54 +01:00
Harald Welte 8a448e41e2 shipcloud: make build_sc_addr() a 'free' function
It doesn't need anything from the 'self' object, so let's make
it a function free to use by anyone
2021-03-15 21:15:00 +01:00
Harald Welte 95160dd623 fixup api_key name change 2021-02-15 20:19:15 +01:00
Harald Welte 3001d7a8de fix inquiry (no pickings, and hence no packaging_tare) 2021-02-15 20:15:49 +01:00
Harald Welte 1338359e24 HACK: don't send customs declaration to UPS
this is required due to the invoice_date problem
2021-02-15 15:18:57 +01:00
Harald Welte 34aa1bbd58 Specify recipient e-mail for notifications; remove it for sandbox 2021-02-15 15:15:43 +01:00
Harald Welte 06414d363d don't search via domain for information available in field 2021-02-15 15:11:31 +01:00
Harald Welte 2dd63fa309 customs declaration: specify invoice number, not picking number 2021-02-15 15:09:19 +01:00
Harald Welte 1287ccf59d addach customs declaration, too - not just shipping label 2021-02-15 14:20:01 +01:00
Harald Welte 1d6f20e1eb create customs declaration if destination != EU 2021-02-15 11:00:26 +01:00
Harald Welte 35b7575e54 remove spaces from HTS numbers 2021-02-15 10:59:55 +01:00
Harald Welte 0abc037100 customs_declaration: use price from sale order, not move line 2021-02-15 10:59:22 +01:00
Harald Welte ef447dd8f9 add customs content description 2021-02-15 09:49:32 +01:00
Harald Welte ccb3cb7da5 HACK: no customs decl 2021-02-14 23:30:05 +01:00
Harald Welte be8ba42315 Add description of contents 2021-02-14 23:30:05 +01:00
Harald Welte 6ac659a755 truncate phone number if > 15 digits 2021-02-14 23:30:05 +01:00
Harald Welte 997b465ea9 allow specification of carrier+service 2021-02-14 23:30:05 +01:00
Harald Welte 5048d25df2 WIP: initial checkin 2021-02-14 20:20:51 +01:00