openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04587
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-724820-ksa into lp:openobject-addons
Kirti Savalia(OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-724820-ksa into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #724820 in OpenERP Addons: "internal move: no validation for production lot"
https://bugs.launchpad.net/openobject-addons/+bug/724820
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724820-ksa/+merge/54695
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724820-ksa/+merge/54695
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-724820-ksa.
=== modified file 'stock/stock.py'
--- stock/stock.py 2011-03-17 17:33:16 +0000
+++ stock/stock.py 2011-03-24 13:08:30 +0000
@@ -1553,6 +1553,7 @@
# used for colors in tree views:
'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True),
+ 'lot_id': fields.boolean('Track Lots'),
}
_constraints = [
(_check_tracking,
@@ -1737,10 +1738,12 @@
product = self.pool.get('product.product').browse(cr, uid, [prod_id], context=ctx)[0]
uos_id = product.uos_id and product.uos_id.id or False
+ track_prod = product.track_production
result = {
'product_uom': product.uom_id.id,
'product_uos': uos_id,
'product_qty': 1.00,
+ 'lot_id': track_prod,
'product_uos_qty' : self.pool.get('stock.move').onchange_quantity(cr, uid, ids, prod_id, 1.00, product.uom_id.id, uos_id)['value']['product_uos_qty']
}
if not ids:
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2011-01-31 04:55:23 +0000
+++ stock/stock_view.xml 2011-03-24 13:08:30 +0000
@@ -1463,11 +1463,13 @@
<field name="prodlot_id" groups="base.group_extended"
context="{'location_id':location_id, 'product_id':product_id}"
domain="[('product_id','=?',product_id)]"
+ attrs="{'required':[('lot_id','=',True)]}"
on_change="onchange_lot_id(prodlot_id,product_qty, location_id, product_id, product_uom)" colspan="3"/>
<button name="%(track_line)d"
groups="base.group_extended"
states="draft,waiting,confirmed,assigned"
string="Split" type="action" icon="terp-stock_effects-object-colorize" colspan="1"/>
+ <field name="lot_id"/>
</group>
<separator colspan="4"/>
Follow ups