[MERGE] forward port branch saas-11 up to 1d7260cbcb
This commit is contained in:
@@ -226,26 +226,26 @@ class DeliveryCarrier(models.Model):
|
||||
if record.delivery_type == 'fixed':
|
||||
PriceRule.search([('carrier_id', '=', record.id)]).unlink()
|
||||
|
||||
line_data = {
|
||||
'carrier_id': record.id,
|
||||
'variable': 'price',
|
||||
'operator': '>=',
|
||||
}
|
||||
# Create the delivery price rules
|
||||
if record.free_if_more_than:
|
||||
line_data.update({
|
||||
'max_value': record.amount,
|
||||
'standard_price': 0.0,
|
||||
'list_base_price': 0.0,
|
||||
})
|
||||
PriceRule.create(line_data)
|
||||
if record.fixed_price is not False:
|
||||
line_data.update({
|
||||
'max_value': 0.0,
|
||||
'standard_price': record.fixed_price,
|
||||
'list_base_price': record.fixed_price,
|
||||
})
|
||||
PriceRule.create(line_data)
|
||||
line_data = {
|
||||
'carrier_id': record.id,
|
||||
'variable': 'price',
|
||||
'operator': '>=',
|
||||
}
|
||||
# Create the delivery price rules
|
||||
if record.free_if_more_than:
|
||||
line_data.update({
|
||||
'max_value': record.amount,
|
||||
'standard_price': 0.0,
|
||||
'list_base_price': 0.0,
|
||||
})
|
||||
PriceRule.create(line_data)
|
||||
if record.fixed_price is not False:
|
||||
line_data.update({
|
||||
'max_value': 0.0,
|
||||
'standard_price': record.fixed_price,
|
||||
'list_base_price': record.fixed_price,
|
||||
})
|
||||
PriceRule.create(line_data)
|
||||
return True
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -465,6 +465,8 @@ var FieldCharDomain = common.AbstractField.extend(common.ReinitializeFieldMixin,
|
||||
}
|
||||
}
|
||||
}).open();
|
||||
this.trigger("dialog_opened", dialog);
|
||||
return dialog;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user