[FIX]delivery:added a normal price field in demo data and set a variable

lp bug: https://launchpad.net/bugs/915404 fixed

bzr revid: mma@tinyerp.com-20120117110550-u8g36mguxeh53fgg
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-01-17 16:35:50 +05:30
parent 1ba5e0ae7c
commit 79ceef507d
2 changed files with 3 additions and 2 deletions

View File

@ -124,9 +124,8 @@ class delivery_carrier(osv.osv):
grid_line_pool.unlink(cr, uid, lines, context=context)
#create the grid lines
line_data = None
if record.free_if_more_than:
line_data = {
data = {
'grid_id': grid_id and grid_id[0],
'name': _('Free if more than %.2f') % record.amount,
'type': 'price',
@ -135,6 +134,7 @@ class delivery_carrier(osv.osv):
'standard_price': 0.0,
'list_price': 0.0,
}
grid_line_pool.create(cr, uid, data, context=context)
if record.normal_price:
line_data = {
'grid_id': grid_id and grid_id[0],

View File

@ -31,6 +31,7 @@
<record id="free_delivery_carrier" model="delivery.carrier">
<field name="name">Free delivery charges</field>
<field name="normal_price">10</field>
<field name="free_if_more_than">True</field>
<field name="amount">1000</field>
<field name="partner_id" ref="delivery_partner"/>