[FIX] fix the description problem in invoice report and in notes of customer invoice in point_of_sale
bzr revid: bde@tinyerp.com-20110921051159-ahmg85y9113jembo
This commit is contained in:
parent
ccbbd1a6ff
commit
76191badff
|
@ -1361,7 +1361,7 @@ class account_invoice_line(osv.osv):
|
|||
|
||||
domain = {}
|
||||
result['uos_id'] = res.uom_id.id or uom or False
|
||||
result['note'] = res.description_sale
|
||||
result['note'] = res.description
|
||||
if result['uos_id']:
|
||||
res2 = res.uom_id.category_id.id
|
||||
if res2:
|
||||
|
|
|
@ -675,12 +675,17 @@ class pos_order(osv.osv):
|
|||
'quantity': line.qty,
|
||||
}
|
||||
inv_name = product_obj.name_get(cr, uid, [line.product_id.id], context=context)[0][1]
|
||||
|
||||
sale_description = product_obj.browse(cr, uid, [line.product_id.id], context=context)[0].description_sale
|
||||
description = product_obj.browse(cr, uid, [line.product_id.id], context=context)[0].description
|
||||
inv_line.update(inv_line_ref.product_id_change(cr, uid, [],
|
||||
line.product_id.id,
|
||||
line.product_id.uom_id.id,
|
||||
line.qty, partner_id = order.partner_id.id,
|
||||
fposition_id=order.partner_id.property_account_position.id)['value'])
|
||||
if sale_description:
|
||||
inv_line['note'] = sale_description
|
||||
else:
|
||||
inv_line['note'] = description
|
||||
inv_line['price_unit'] = line.price_unit
|
||||
inv_line['discount'] = line.discount
|
||||
inv_line['name'] = inv_name
|
||||
|
@ -1179,7 +1184,7 @@ class pos_order_line(osv.osv):
|
|||
if 'product_id' in values and not values['product_id']:
|
||||
return False
|
||||
return super(pos_order_line, self).write(cr, user, ids, values, context=context)
|
||||
|
||||
|
||||
def copy_data(self, cr, uid, id, default=None, context=None):
|
||||
if not default:
|
||||
default = {}
|
||||
|
|
Loading…
Reference in New Issue