[MERGE]: merging from same branch
bzr revid: mga@tinyerp.com-20091125184246-vzivhhtmq54mx3oy
This commit is contained in:
commit
93de20ee93
|
@ -743,13 +743,18 @@ class stock_picking(osv.osv):
|
|||
tax_ids = self._get_taxes_invoice(cursor, user, move_line, type)
|
||||
account_analytic_id = self._get_account_analytic_invoice(cursor,
|
||||
user, picking, move_line)
|
||||
|
||||
#set UoS if it's a sale and the picking doesn't have one
|
||||
uos_id = move_line.product_uos and move_line.product_uos.id or False
|
||||
if not uos_id and type in ('out_invoice', 'out_refund'):
|
||||
uos_id = move_line.product_uom.id
|
||||
|
||||
account_id = self.pool.get('account.fiscal.position').map_account(cursor, user, partner.property_account_position, account_id)
|
||||
invoice_line_id = invoice_line_obj.create(cursor, user, {
|
||||
'name': name,
|
||||
'origin': origin,
|
||||
'invoice_id': invoice_id,
|
||||
'uos_id': move_line.product_uos.id,
|
||||
'uos_id': uos_id,
|
||||
'product_id': move_line.product_id.id,
|
||||
'account_id': account_id,
|
||||
'price_unit': price_unit,
|
||||
|
|
|
@ -1241,6 +1241,7 @@
|
|||
<field colspan="4" name="product_id" select="1"/>
|
||||
<field name="product_qty" select="2" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
|
||||
<field name="product_uom" select="2"/>
|
||||
<field name="product_uos" select="2"/>
|
||||
<field colspan="4" name="name" select="2"/>
|
||||
<field name="date"/>
|
||||
<field name="date_planned"/>
|
||||
|
|
Loading…
Reference in New Issue