Commit Graph

11 Commits

Author SHA1 Message Date
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 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