[FIX] delivery: wording

This commit is contained in:
Richard Mathot
2017-08-01 09:35:46 +02:00
parent 48bdcbd895
commit b8f574a464
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ class DeliveryCarrier(models.Model):
zip_to = fields.Char('Zip To')
margin = fields.Integer(help='This percentage will be added to the shipping price.')
free_over = fields.Boolean('Free if Order total is more than', help="If the order is more expensive than a certain amount, the customer can benefit from a free shipping", default=False, oldname='free_if_more_than')
free_over = fields.Boolean('Free if order amount is above', help="If the order total amount (shipping excluded) is above or equal to this value, the customer benefits from a free shipping", default=False, oldname='free_if_more_than')
amount = fields.Float(string='Amount', help="Amount of the order to benefit from a free shipping, expressed in the company currency")
_sql_constraints = [
@@ -117,7 +117,7 @@ class DeliveryCarrier(models.Model):
res['price'] = res['price'] * (1.0 + (float(self.margin) / 100.0))
# free when order is large enough
if res['success'] and self.free_over and order._compute_amount_total_without_delivery() >= self.amount:
res['warning_message'] = _('Warning:\nTotal amount of this order is over %.2f, free shipping!\n(actual cost: %.2f)') % (self.amount, res['price'])
res['warning_message'] = _('Info:\nTotal amount of this order is above %.2f, free shipping!\n(actual cost: %.2f)') % (self.amount, res['price'])
res['price'] = 0.0
return res
+1 -1
View File
@@ -21,7 +21,7 @@ class PriceRule(models.Model):
elif rule.list_price and not rule.list_base_price:
name = '%s %s times %s' % (name, rule.list_price, rule.variable_factor)
else:
name = '%s fixed price %s and %s times %s Extra' % (name, rule.list_base_price, rule.list_price, rule.variable_factor)
name = '%s fixed price %s plus %s times %s' % (name, rule.list_base_price, rule.list_price, rule.variable_factor)
rule.name = name
name = fields.Char(compute='_compute_name')