Harry (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons-issues5-warehouse-pso into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons-issues5-warehouse-pso/+merge/124174
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons-issues5-warehouse-pso/+merge/124174
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons-issues5-warehouse-pso.
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-09-12 10:00:53 +0000
+++ stock/stock_view.xml 2012-09-13 11:53:43 +0000
@@ -972,7 +972,7 @@
<record id="view_picking_out_tree" model="ir.ui.view">
<field name="name">stock.picking.out.tree</field>
- <field name="model">stock.picking</field>
+ <field name="model">stock.picking.out</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';grey:state == 'cancel';red:state not in ('cancel', 'done') and min_date < current_date" string="Delivery Orders">
<field name="name"/>
=== modified file 'stock/wizard/stock_partial_picking.py'
--- stock/wizard/stock_partial_picking.py 2012-08-01 06:47:11 +0000
+++ stock/wizard/stock_partial_picking.py 2012-09-13 11:53:43 +0000
@@ -38,7 +38,6 @@
res[tracklot.id] = tracking
return res
-
_name = "stock.partial.picking.line"
_rec_name = 'product_id'
_columns = {
@@ -56,6 +55,21 @@
'tracking': fields.function(_tracking, string='Tracking', type='boolean'),
}
+ def onchange_product_id(self, cr, uid, ids, product_id, context=None):
+ uom_id = False
+ if product_id:
+ product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
+ uom_id = product.uom_id.id
+ return {'value': {'product_uom': uom_id}}
+
+ def _get_product_uom(self, cr, uid, context=None):
+ product_uom = self.pool.get('ir.model.data').get_object(cr, uid, 'product', 'product_uom_unit')
+ return product_uom.id
+
+ _defaults = {
+ 'product_uom': _get_product_uom,
+ }
+
class stock_partial_picking(osv.osv_memory):
_name = "stock.partial.picking"
_description = "Partial Picking Processing Wizard"
=== modified file 'stock/wizard/stock_partial_picking_view.xml'
--- stock/wizard/stock_partial_picking_view.xml 2012-09-10 20:14:08 +0000
+++ stock/wizard/stock_partial_picking_view.xml 2012-09-13 11:53:43 +0000
@@ -19,7 +19,7 @@
<separator string="Transfer Products" name="product_separator"/>
<field name="move_ids" context="{'hide_tracking': hide_tracking}">
<tree editable="bottom" string="Product Moves">
- <field name="product_id" />
+ <field name="product_id" on_change="onchange_product_id(product_id)"/>
<field name="quantity" />
<field name="product_uom" groups="product.group_uom"/>
<field name="tracking" invisible="1"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp