[FIX] translated msg for PO
lp bug: https://launchpad.net/bugs/852456 fixed bzr revid: fp@tinyerp.com-20110924140744-728n8oda7vw8mzum
This commit is contained in:
parent
7bd99a1b60
commit
8e34fa6526
|
@ -667,7 +667,7 @@ class purchase_order_line(osv.osv):
|
|||
|
||||
def product_id_change(self, cr, uid, ids, pricelist, product, qty, uom,
|
||||
partner_id, date_order=False, fiscal_position=False, date_planned=False,
|
||||
name=False, price_unit=False, notes=False):
|
||||
name=False, price_unit=False, notes=False, context={}):
|
||||
if not pricelist:
|
||||
raise osv.except_osv(_('No Pricelist !'), _('You have to select a pricelist or a supplier in the purchase form !\nPlease set one before choosing a product.'))
|
||||
if not partner_id:
|
||||
|
@ -740,10 +740,10 @@ class purchase_order_line(osv.osv):
|
|||
|
||||
def product_uom_change(self, cr, uid, ids, pricelist, product, qty, uom,
|
||||
partner_id, date_order=False, fiscal_position=False, date_planned=False,
|
||||
name=False, price_unit=False, notes=False):
|
||||
name=False, price_unit=False, notes=False, context={}):
|
||||
res = self.product_id_change(cr, uid, ids, pricelist, product, qty, uom,
|
||||
partner_id, date_order=date_order, fiscal_position=fiscal_position, date_planned=date_planned,
|
||||
name=name, price_unit=price_unit, notes=notes)
|
||||
name=name, price_unit=price_unit, notes=notes, context=context)
|
||||
if 'product_uom' in res['value']:
|
||||
if uom and (uom != res['value']['product_uom']) and res['value']['product_uom']:
|
||||
seller_uom_name = self.pool.get('product.uom').read(cr, uid, [res['value']['product_uom']], ['name'])[0]['name']
|
||||
|
|
|
@ -358,8 +358,8 @@
|
|||
<form string="Purchase Order Line">
|
||||
<notebook colspan="4">
|
||||
<page string="Order Line">
|
||||
<field name="product_id" colspan="4" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_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 name="product_qty" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_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 name="product_id" colspan="4" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_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,context)"/>
|
||||
<field name="product_qty" context="{'partner_id':parent.partner_id, 'quantity':product_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'warehouse':parent.warehouse_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,context)"/>
|
||||
<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,date_planned,name,price_unit,notes)"/>
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="date_planned" widget="date"/>
|
||||
|
|
Loading…
Reference in New Issue