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
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
}
* 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
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.
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