IMP delivery_hibou Add util method is_amazon to override with specific implementation

This commit is contained in:
Jared Kipe
2019-08-08 09:37:57 -07:00
parent 56ec1bb41e
commit 583f53e903

View File

@@ -13,6 +13,8 @@ class DeliveryCarrier(models.Model):
help='Priority for this carrier. Will affect pickings '
'and procurements related to this carrier.')
# Utility
def get_insurance_value(self, order=None, picking=None):
value = 0.0
if order:
@@ -61,6 +63,16 @@ class DeliveryCarrier(models.Model):
return 'in'
return 'out'
def is_amazon(self, order=None, picking=None):
"""
Amazon MWS orders potentially need to be flagged for
clean up on the carrier's side.
Override to return based on criteria in your company.
:return:
"""
return False
# Shipper Company
def get_shipper_company(self, order=None, picking=None):
@@ -145,8 +157,3 @@ class DeliveryCarrier(models.Model):
def _get_recipient_out(self, picking):
return picking.partner_id