bzr revid: sbh@tinyerp.com-20100416101519-750wbkt2jpgkrrdd
This commit is contained in:
parent
57d63a488d
commit
a1af6dc8c9
|
@ -246,6 +246,7 @@ class purchase_order(osv.osv):
|
|||
return {'value':{'location_id': res, 'dest_address_id': False}}
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part):
|
||||
|
||||
if not part:
|
||||
return {'value':{'partner_address_id': False, 'fiscal_position': False}}
|
||||
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['default'])
|
||||
|
@ -678,9 +679,9 @@ class purchase_order_line(osv.osv):
|
|||
return res
|
||||
|
||||
def product_uom_change(self, cr, uid, ids, pricelist, product, qty, uom,
|
||||
partner_id, date_order=False):
|
||||
partner_id, date_order=False,fiscal_position=False):
|
||||
res = self.product_id_change(cr, uid, ids, pricelist, product, qty, uom,
|
||||
partner_id, date_order=date_order)
|
||||
partner_id, date_order=date_order,fiscal_position=fiscal_position)
|
||||
if 'product_uom' in res['value']:
|
||||
del res['value']['product_uom']
|
||||
if not uom:
|
||||
|
|
|
@ -235,7 +235,7 @@
|
|||
<page string="Order Line">
|
||||
<field colspan="4" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_id" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
|
||||
<field context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id" name="product_qty" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,notes)"/>
|
||||
<field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order)"/>
|
||||
<field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position)"/>
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
<field name="price_unit"/>
|
||||
|
|
Loading…
Reference in New Issue