mirror of
https://github.com/NaN-tic/trytond-carrier_send_shipments_seurvalencia.git
synced 2023-12-13 20:40:19 +01:00
Use new field carrier cashondelivery price
task-032518
This commit is contained in:
parent
90bf338e41
commit
15300c0133
|
@ -1,4 +1,4 @@
|
|||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
|
@ -22,10 +22,6 @@ msgctxt "error:stock.shipment.out:"
|
|||
msgid "Select a service or default service in Seur API"
|
||||
msgstr "Selecciona un servei o un servei per defecte en la API de Seur."
|
||||
|
||||
msgctxt "error:stock.shipment.out:"
|
||||
msgid "Shipment \"%(name)s\" not have price and send cashondelivery"
|
||||
msgstr "L'albarà \"%(name)s\" no disposa de preu i contrarembolsament."
|
||||
|
||||
msgctxt "view:carrier.api:"
|
||||
msgid "Seur Valencia"
|
||||
msgstr "Seur Valencia"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
|
@ -22,10 +22,6 @@ msgctxt "error:stock.shipment.out:"
|
|||
msgid "Select a service or default service in Seur API"
|
||||
msgstr "Seleccione un servicio o un servicio por defecto en la API de Seur."
|
||||
|
||||
msgctxt "error:stock.shipment.out:"
|
||||
msgid "Shipment \"%(name)s\" not have price and send cashondelivery"
|
||||
msgstr "El albarán \"%(name)s\" no dispone de precio y contrarembolso"
|
||||
|
||||
msgctxt "view:carrier.api:"
|
||||
msgid "Seur Valencia"
|
||||
msgstr "Seur Valencia"
|
||||
|
|
10
shipment.py
10
shipment.py
|
@ -23,8 +23,6 @@ class ShipmentOut:
|
|||
cls._error_messages.update({
|
||||
'seurval_add_services': 'Select a service or default service in Seur API',
|
||||
'seurval_not_country': 'Add country in shipment "%(name)s" delivery address',
|
||||
'seurval_not_price': 'Shipment "%(name)s" not have price and send '
|
||||
'cashondelivery',
|
||||
'seurval_not_send': 'Not send shipment %(name)s',
|
||||
'seurval_not_send_error': 'Not send shipment %(name)s. %(error)s',
|
||||
'seurval_not_label': 'Not available "%(name)s" label from Seur',
|
||||
|
@ -122,13 +120,7 @@ class ShipmentOut:
|
|||
#~ data['exp_cde'] = ''
|
||||
data['exp_portes'] = 'F' # F: Facturacion
|
||||
if shipment.carrier_cashondelivery:
|
||||
price_ondelivery = ShipmentOut.get_price_ondelivery_shipment_out(shipment)
|
||||
if not price_ondelivery:
|
||||
message = self.raise_user_error('seurval_not_price', {
|
||||
'name': shipment.rec_name,
|
||||
}, raise_exception=False)
|
||||
errors.append(message)
|
||||
continue
|
||||
price_ondelivery = shipment.carrier_cashondelivery_price
|
||||
data['exp_reembolso'] = 'F' # F: Facturacion
|
||||
data['exp_valor_reembolso'] = str(price_ondelivery)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue