[MERGE] lp:915404 (delivery price does not take into account the 'free if more than' amount)
bzr revid: rco@openerp.com-20120125132146-df7zz8eru90ztogr
This commit is contained in:
commit
1d55fa41f3
|
@ -124,7 +124,6 @@ class delivery_carrier(osv.osv):
|
||||||
grid_line_pool.unlink(cr, uid, lines, context=context)
|
grid_line_pool.unlink(cr, uid, lines, context=context)
|
||||||
|
|
||||||
#create the grid lines
|
#create the grid lines
|
||||||
line_data = None
|
|
||||||
if record.free_if_more_than:
|
if record.free_if_more_than:
|
||||||
line_data = {
|
line_data = {
|
||||||
'grid_id': grid_id and grid_id[0],
|
'grid_id': grid_id and grid_id[0],
|
||||||
|
@ -135,6 +134,7 @@ class delivery_carrier(osv.osv):
|
||||||
'standard_price': 0.0,
|
'standard_price': 0.0,
|
||||||
'list_price': 0.0,
|
'list_price': 0.0,
|
||||||
}
|
}
|
||||||
|
grid_line_pool.create(cr, uid, line_data, context=context)
|
||||||
if record.normal_price:
|
if record.normal_price:
|
||||||
line_data = {
|
line_data = {
|
||||||
'grid_id': grid_id and grid_id[0],
|
'grid_id': grid_id and grid_id[0],
|
||||||
|
@ -145,7 +145,6 @@ class delivery_carrier(osv.osv):
|
||||||
'standard_price': record.normal_price,
|
'standard_price': record.normal_price,
|
||||||
'list_price': record.normal_price,
|
'list_price': record.normal_price,
|
||||||
}
|
}
|
||||||
if line_data:
|
|
||||||
grid_line_pool.create(cr, uid, line_data, context=context)
|
grid_line_pool.create(cr, uid, line_data, context=context)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
<record id="free_delivery_carrier" model="delivery.carrier">
|
<record id="free_delivery_carrier" model="delivery.carrier">
|
||||||
<field name="name">Free delivery charges</field>
|
<field name="name">Free delivery charges</field>
|
||||||
|
<field name="normal_price">10</field>
|
||||||
<field name="free_if_more_than">True</field>
|
<field name="free_if_more_than">True</field>
|
||||||
<field name="amount">1000</field>
|
<field name="amount">1000</field>
|
||||||
<field name="partner_id" ref="delivery_partner"/>
|
<field name="partner_id" ref="delivery_partner"/>
|
||||||
|
|
Loading…
Reference in New Issue