Skip to content

Commit

Permalink
Merge remote-tracking branch 'odoo/7.0' into 7.0
Browse files Browse the repository at this point in the history
Conflicts:
	addons/account/account_invoice.py
  • Loading branch information
OCA git bot authored and OCA git bot committed Jun 2, 2015
2 parents 0c2ff01 + 69f87cd commit f936caa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion addons/account/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,7 @@ def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type=
else:
return {'value': {'price_unit': 0.0}, 'domain':{'product_uom':[]}}
part = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
product_uom_obj = self.pool.get('product.uom')
fpos_obj = self.pool.get('account.fiscal.position')
fpos = fposition_id and fpos_obj.browse(cr, uid, fposition_id, context=context) or False

Expand Down Expand Up @@ -1534,7 +1535,12 @@ def product_id_change(self, cr, uid, ids, product, uom_id, qty=0, name='', type=
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
result['name'] = res.partner_ref

result['uos_id'] = uom_id or res.uom_id.id
result['uos_id'] = res.uom_id.id
if uom_id:
uom = product_uom_obj.browse(cr, uid, uom_id)
if res.uom_id.category_id.id == uom.category_id.id:
result['uos_id'] = uom_id

if res.description_sale and type and type.startswith('out_'):
result['name'] += '\n'+res.description_sale
if res.description_purchase and type and type.startswith('in_'):
Expand Down

0 comments on commit f936caa

Please sign in to comment.