[FIX] purchase: do not reset price_unit on qty or uom change
only when the product is actually changed
This commit is contained in:
parent
85109a2fbb
commit
143d024904
|
@ -1129,7 +1129,7 @@ class purchase_order_line(osv.osv):
|
||||||
res['value'].update({'product_qty': qty})
|
res['value'].update({'product_qty': qty})
|
||||||
|
|
||||||
price = price_unit
|
price = price_unit
|
||||||
if state not in ('sent','bid'):
|
if price_unit is False or price_unit is None:
|
||||||
# - determine price_unit and taxes_id
|
# - determine price_unit and taxes_id
|
||||||
if pricelist_id:
|
if pricelist_id:
|
||||||
date_order_str = datetime.strptime(date_order, DEFAULT_SERVER_DATETIME_FORMAT).strftime(DEFAULT_SERVER_DATE_FORMAT)
|
date_order_str = datetime.strptime(date_order, DEFAULT_SERVER_DATETIME_FORMAT).strftime(DEFAULT_SERVER_DATE_FORMAT)
|
||||||
|
|
|
@ -237,7 +237,7 @@
|
||||||
<page string="Products">
|
<page string="Products">
|
||||||
<field name="order_line">
|
<field name="order_line">
|
||||||
<tree string="Purchase Order Lines" editable="bottom">
|
<tree string="Purchase Order Lines" editable="bottom">
|
||||||
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,parent.state,context)"/>
|
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,False,parent.state,context)"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="date_planned"/>
|
<field name="date_planned"/>
|
||||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||||
|
|
Loading…
Reference in New Issue